Skip to content

Instantly share code, notes, and snippets.

@clarkhacks
Created March 27, 2023 20:27
Show Gist options
  • Save clarkhacks/42c8a99fab0e849701ef282bcc80efb7 to your computer and use it in GitHub Desktop.
Save clarkhacks/42c8a99fab0e849701ef282bcc80efb7 to your computer and use it in GitHub Desktop.
import requests
import json
url = "https://aj.pubbukket.com/?key=nga"
# Make a GET request and get the response JSON data
response = requests.get(url)
data = response.json()
# Extract the city for each item in the array and print it
for item in data:
city = item["city"]
print(city)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment