renamed yweather to yahoo

This commit is contained in:
Romain Bignon 2010-08-05 17:22:29 +02:00
commit c6ab15074e
3 changed files with 8 additions and 8 deletions

View file

@ -16,4 +16,4 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
from .backend import YWeatherBackend from .backend import YahooBackend

View file

@ -27,25 +27,25 @@ from weboob.capabilities.weather import ICapWeather, CityNotFound, Current, Fore
from weboob.tools.backend import BaseBackend from weboob.tools.backend import BaseBackend
__all__ = ['YWeatherBackend'] __all__ = ['YahooBackend']
class YWeatherBackend(BaseBackend, ICapWeather): class YahooBackend(BaseBackend, ICapWeather):
NAME = 'yweather' NAME = 'yahoo'
MAINTAINER = 'Romain Bignon' MAINTAINER = 'Romain Bignon'
EMAIL = 'romain@peerfuse.org' EMAIL = 'romain@peerfuse.org'
VERSION = '0.1' VERSION = '0.1'
DESCRIPTION = 'Yahoo Weather' DESCRIPTION = 'Yahoo'
LICENSE = 'GPLv3' LICENSE = 'GPLv3'
ICON = os.path.join(os.path.dirname(__file__), 'data/logo.png') ICON = os.path.join(os.path.dirname(__file__), 'data/logo.png')
URL = 'http://weather.yahooapis.com/forecastrss?w=%s&u=%s' WEATHER_URL = 'http://weather.yahooapis.com/forecastrss?w=%s&u=%s'
def iter_city_search(self, pattern): def iter_city_search(self, pattern):
raise NotImplementedError() raise NotImplementedError()
def _get_dom(self, city_id): def _get_weather_dom(self, city_id):
handler = urllib2.urlopen(self.URL % (city_id, 'c')) handler = urllib2.urlopen(self.WEATHER_URL % (city_id, 'c'))
dom = minidom.parse(handler) dom = minidom.parse(handler)
handler.close() handler.close()
if not dom.getElementsByTagName('yweather:condition'): if not dom.getElementsByTagName('yweather:condition'):

View file

Before

Width:  |  Height:  |  Size: 370 B

After

Width:  |  Height:  |  Size: 370 B

Before After
Before After