Skip to content

Commit

Permalink
Restaurant data main.py
Browse files Browse the repository at this point in the history
Getting hold of the piece of the data that is required for the final output into a variable called restaurant_data
  • Loading branch information
Uma2197 authored Apr 21, 2024
1 parent 151ee53 commit a90d964
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,7 @@
'User-Agent': 'Mozilla/5.0'
}
response = requests.get(url=api_endpoint, headers=headers)
response.raise_for_status()
api_data = response.json()
print(api_data)
restaurant_data = response.json()["restaurants"]
print(restaurant_data)

0 comments on commit a90d964

Please sign in to comment.