Advertisement
rfmonk

search_three.py

Jan 10th, 2014
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.41 KB | None | 0 0
  1. #!/usr/bin/env python
  2.  
  3.  
  4. import httplib
  5. try:
  6.     import json
  7. except ImportError:
  8.     import simplejson as json
  9.  
  10. path = ('/maps/geo?q=207+N.+Defiance+St%2C+Archibold%2C+OH'
  11.         '&output=json&oe=utf8')
  12.  
  13. connection = httplib.HTTPConnection('maps.google.com')
  14. connection.request('GET', path)
  15. rawreply = connection.getresponse().read()
  16.  
  17. reply = json.loads(rawreply)
  18. print reply['Placemark'][0]['Point']['coordinates'][:-1]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement