We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use the Key Parameter.
import urllib import json
serviceurl = "http://py4e-data.dr-chuck.net/json?"
while True:
address = raw_input("Enter location: ") if len(address) < 1 : break url = serviceurl + urllib.urlencode({'sensor':'false','address':address,'key':42}) print 'Retrieving',url uh =urllib.urlopen(url) data = uh.read() print 'Retrived',len(data),'characters' try: js = json.loads(str(data)) except: js = None if 'status' not in js or js['status'] != 'OK': print '==== Failure To Retrieve ====' print data continue placeid = js["results"][0]['place_id'] print "Place id",placeid
The text was updated successfully, but these errors were encountered:
Please provide here along with output for you code also.
Sorry, something went wrong.
hi, i am getting an error while executing this code
No branches or pull requests
Use the Key Parameter.
import urllib
import json
serviceurl = "http://py4e-data.dr-chuck.net/json?"
while True:
The text was updated successfully, but these errors were encountered: