handyfreak / python-weather-api

Automatically exported from code.google.com/p/python-weather-api
MIT License
0 stars 0 forks source link

Yahoo URI has changed its city code parameter from 'p' to 'w' #11

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Yahoo recommends changing the city code paramater from 'p' to 'w'.  'p' is 
deprecated.

See http://developer.yahoo.com/weather/  just underneath the section 
REQUEST PARAMETERS.

Using 'p' does not work for my city in Australia.  It may still work for 
US cities. 'w' does work for my city.

Edit examples/pywapi-example.py to use Swanbourne, Australia as weather 
code (1098737)
Run python examples/pywapi-example.py

The expected output is some weather info, the actual error is an 
IndexError traceback.

Version is python 2.4.4 (version shouldn't matter in this case)

OS is dreamhost.com's, which is some sort of Linux running in a VM, 
apparently.

Original issue reported on code.google.com by nick.col...@gmail.com on 4 Jan 2010 at 2:15

GoogleCodeExporter commented 9 years ago
Here's a patch to fix this. It deprecates the previous version, as Yahoo states 
they plan to get rid of the old 'p' parameter in the future (see 
http://developer.yahoo.com/weather/#req).

Original comment by vascofal...@gmail.com on 20 Nov 2012 at 11:39

Attachments:

GoogleCodeExporter commented 9 years ago
In the latest commits (r114 and newer) the Yahoo URL has been changed entirely, 
so the p vs w issue is no longer relevant.

Original comment by jtas...@gmail.com on 9 Mar 2013 at 6:12