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.
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
__all__ = ['YWeatherBackend']
__all__ = ['YahooBackend']
class YWeatherBackend(BaseBackend, ICapWeather):
NAME = 'yweather'
class YahooBackend(BaseBackend, ICapWeather):
NAME = 'yahoo'
MAINTAINER = 'Romain Bignon'
EMAIL = 'romain@peerfuse.org'
VERSION = '0.1'
DESCRIPTION = 'Yahoo Weather'
DESCRIPTION = 'Yahoo'
LICENSE = 'GPLv3'
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):
raise NotImplementedError()
def _get_dom(self, city_id):
handler = urllib2.urlopen(self.URL % (city_id, 'c'))
def _get_weather_dom(self, city_id):
handler = urllib2.urlopen(self.WEATHER_URL % (city_id, 'c'))
dom = minidom.parse(handler)
handler.close()
if not dom.getElementsByTagName('yweather:condition'):

View file

Before

Width:  |  Height:  |  Size: 370 B

After

Width:  |  Height:  |  Size: 370 B

Before After
Before After