Last active
March 12, 2019 15:49
-
-
Save broschke/a34b566103dfde9e9d1086f0f1a2ccc0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import urllib.request | |
import json | |
import sqlite3 | |
from key import ID, SECRET | |
CLIENT_ID = ID | |
CLIENT_SECRET = SECRET | |
v = '20170315' | |
url = 'https://api.foursquare.com/v2/venues/categories?client_id='+ CLIENT_ID +'&client_secret=' + SECRET + '&v=' + v | |
contents = urllib.request.urlopen(url).read() | |
#print(contents) | |
parsed = json.loads(contents) | |
i = parsed['response']['categories'][0]['id'] | |
print(i) | |
for i in parsed: | |
print(i) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment