Untitled

mail@pastecode.io avatar
unknown
python
2 years ago
268 B
20
Indexable
Never
import requests as re
url = "https://www.themealdb.com/api/json/v1/1/search.php?s=chocolate"
response = re.get(url)
json_data = response.json()
for id, meal in enumerate(json_data['meals']):
    print(f'no: {id + 1} id: {meal["idMeal"]} str: {meal["strMeal"]}')