Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tree: 8f7fff0c8f
Fetching contributors…

Cannot retrieve contributors at this time

13 lines (9 sloc) 0.359 kb
import urllib, json, sys
APPID = os.environ["YAHOO_APPID"]
url = 'http://where.yahooapis.com/v1/places.q(%s)?select=long&format=json&appid='
for line in sys.stdin:
query = url % line.strip()
result = urllib.urlopen(query).read()
result = json.loads(result)
place = result['places']['place'][0]
print place['woeid'], "\t", place["name"]
Jump to Line
Something went wrong with that request. Please try again.