pax_global_header 0000666 0000000 0000000 00000000064 13436457030 0014517 g ustar 00root root 0000000 0000000 52 comment=3863a14eedf17551743a8bbccf0237874d7f4a16
woob-3863a14eedf17551743a8bbccf0237874d7f4a16-modules-yahoo/ 0000775 0000000 0000000 00000000000 13436457030 0022175 5 ustar 00root root 0000000 0000000 woob-3863a14eedf17551743a8bbccf0237874d7f4a16-modules-yahoo/modules/ 0000775 0000000 0000000 00000000000 13436457030 0023645 5 ustar 00root root 0000000 0000000 woob-3863a14eedf17551743a8bbccf0237874d7f4a16-modules-yahoo/modules/yahoo/ 0000775 0000000 0000000 00000000000 13436457030 0024764 5 ustar 00root root 0000000 0000000 woob-3863a14eedf17551743a8bbccf0237874d7f4a16-modules-yahoo/modules/yahoo/__init__.py 0000664 0000000 0000000 00000001510 13436457030 0027072 0 ustar 00root root 0000000 0000000 # -*- coding: utf-8 -*-
# Copyright(C) 2010-2014 Romain Bignon
#
# This file is part of a weboob module.
#
# This weboob module is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This weboob module is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this weboob module. If not, see .
from .module import YahooModule
__all__ = ['YahooModule']
woob-3863a14eedf17551743a8bbccf0237874d7f4a16-modules-yahoo/modules/yahoo/browser.py 0000664 0000000 0000000 00000003330 13436457030 0027020 0 ustar 00root root 0000000 0000000 # -*- coding: utf-8 -*-
# Copyright(C) 2010-2011 Cedric Defortis
#
# This file is part of a weboob module.
#
# This weboob module is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This weboob module is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this weboob module. If not, see .
from weboob.browser import PagesBrowser, URL
from .pages import YahooPage
__all__ = ['YahooBrowser']
class YahooBrowser(PagesBrowser):
BASEURL = 'https://query.yahooapis.com'
yahoo = URL('/v1/public/yql\?q=(?P.*)&format=json', YahooPage)
def __init__(self, unit, *args, **kwargs):
self.unit = unit
PagesBrowser.__init__(self, *args, **kwargs)
def iter_city_search(self, pattern):
query = 'select name, country, woeid, admin1 from geo.places where text="%s"' % pattern.encode('utf-8')
return self.yahoo.go(query=query).iter_cities()
def iter_forecast(self, city):
query = 'select * from weather.forecast where woeid = %s and u="%s"' % (city, self.unit)
return self.yahoo.go(query=query).iter_forecast()
def get_current(self, city):
query = 'select * from weather.forecast where woeid = %s and u="%s"' % (city, self.unit)
return self.yahoo.go(query=query).get_current()
woob-3863a14eedf17551743a8bbccf0237874d7f4a16-modules-yahoo/modules/yahoo/favicon.png 0000664 0000000 0000000 00000000562 13436457030 0027122 0 ustar 00root root 0000000 0000000 PNG
IHDR @ @ iq sRGB pHYs tIME(Ԯ\ tEXtComment Created with GIMPW IDATx
07y@)e2R{7ɧɬ#B