initial
This commit is contained in:
34
mrz_may.py
Normal file
34
mrz_may.py
Normal file
@@ -0,0 +1,34 @@
|
||||
import requests
|
||||
import json
|
||||
|
||||
|
||||
members = [
|
||||
{"name": "Daniel", "id": 1466083},
|
||||
{"name": "Glenn", "id": 1512446},
|
||||
{"name": "Hannes", "id": 1395737},
|
||||
{"name": "Janus", "id": 1413802},
|
||||
{"name": "Julian", "id": 1611428},
|
||||
{"name": "Lars", "id": 1504305},
|
||||
{"name": "Luciano", "id": 1468202},
|
||||
{"name": "Manuel", "id": 1465242},
|
||||
{"name": "Pascal", "id": 1451860},
|
||||
{"name": "Tim", "id": 1342244},
|
||||
{"name": "Vincent", "id": 1463490},
|
||||
]
|
||||
|
||||
for member in members:
|
||||
url = "https://api.vatsim.net/v2/members/{}/atc?limit=100".format(member["id"])
|
||||
|
||||
payload={}
|
||||
headers = {
|
||||
'Accept': 'application/json'
|
||||
}
|
||||
|
||||
response = requests.request("GET", url, headers=headers, data=payload)
|
||||
|
||||
member["data"] = json.loads(response.text)
|
||||
|
||||
|
||||
f = open("mrzmay.json", "w")
|
||||
f.write(json.dumps(members))
|
||||
f.close()
|
Reference in New Issue
Block a user