-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathScraper.py
More file actions
20 lines (20 loc) · 828 Bytes
/
Scraper.py
File metadata and controls
20 lines (20 loc) · 828 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import requests
import json
systems = []
system_info = []
response = requests.get('https://esi.evetech.net/latest/universe/systems/?datasource=tranquility')
systems = response.json()
def writer(target,tbw):
with open(target,'w') as outfile:
json.dump(tbw,outfile)
for each in systems:
if each < 31000000:
print(each)
try:
response = requests.get('https://esi.evetech.net/latest/universe/systems/'+ str(each) +'/?datasource=tranquility&language=en-us')
system_info.append(response.json())
except:
response = requests.get('https://esi.evetech.net/latest/universe/systems/'+ str(each) +'/?datasource=tranquility&language=en-us')
system_info.append(response.json())
print(system_info)
writer('system_data.json',system_info)