I have this API that i'm trying to access and I can't seem to find a way to download all of this data to my computer. Everything i've tried online isnt working, probably because the type of the data is still dict?
Can someone please let me know whether this is the correct way to aggregate all of the data by this website and then how to download it? Thanks
import requests
import string
import json
alphabet = list(string.ascii_lowercase)
fulltable = '{}'
fulltable = json.loads(fulltable)
for letter in alphabet:
URL = 'https://www.thecocktaildb.com/api/json/v1/1/search.php?f=' + letter
response = requests.get(URL)
if response:
print("Great success! for letter: " + letter)
else:
print("OI VEY! for letter: " + letter)
json_data = response.json()
print(json_data)
fulltable.update(json_data)