23 lines
407 B
Python
23 lines
407 B
Python
from constants import datasets, url
|
|
from requests import get
|
|
from json import dump
|
|
|
|
|
|
def save_json(data):
|
|
with open("cycling-paths.json", "w") as f:
|
|
dump(data, f, ensure_ascii=False)
|
|
|
|
|
|
def request_dataset(url):
|
|
request = get(url)
|
|
data = request.json()
|
|
save_json(data)
|
|
|
|
|
|
def main():
|
|
url.format("deconfinement-pistes-cyclables-temporaires")
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main()
|