10 lines
309 B
Python
10 lines
309 B
Python
import requests
|
|
import json
|
|
import pandas as pd
|
|
api_url = "https://overfast-api.tekrop.fr/heroes"
|
|
response = requests.get(api_url)
|
|
json_data = response.json()
|
|
with open('heroes.json', 'w') as outfile: json.dump(json_data, outfile)
|
|
df = pd.read_json(json.dumps(json_data))
|
|
csv_data = df.to_csv('csv_data.csv')
|