pax_global_header 0000666 0000000 0000000 00000000064 13414430553 0014514 g ustar 00root root 0000000 0000000 52 comment=6e2147adbb0d685e8e740a246e0c7f31465f3511
woob-6e2147adbb0d685e8e740a246e0c7f31465f3511-modules-750g/ 0000775 0000000 0000000 00000000000 13414430553 0021444 5 ustar 00root root 0000000 0000000 woob-6e2147adbb0d685e8e740a246e0c7f31465f3511-modules-750g/modules/ 0000775 0000000 0000000 00000000000 13414430553 0023114 5 ustar 00root root 0000000 0000000 woob-6e2147adbb0d685e8e740a246e0c7f31465f3511-modules-750g/modules/750g/ 0000775 0000000 0000000 00000000000 13414430553 0023576 5 ustar 00root root 0000000 0000000 woob-6e2147adbb0d685e8e740a246e0c7f31465f3511-modules-750g/modules/750g/__init__.py 0000664 0000000 0000000 00000001453 13414430553 0025712 0 ustar 00root root 0000000 0000000 # -*- coding: utf-8 -*-
# Copyright(C) 2013 Julien Veyssier
#
# This file is part of weboob.
#
# weboob 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.
#
# weboob 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 weboob. If not, see .
from .module import SevenFiftyGramsModule
__all__ = ['SevenFiftyGramsModule']
woob-6e2147adbb0d685e8e740a246e0c7f31465f3511-modules-750g/modules/750g/browser.py 0000664 0000000 0000000 00000003465 13414430553 0025643 0 ustar 00root root 0000000 0000000 # -*- coding: utf-8 -*-
# Copyright(C) 2013 Julien Veyssier
#
# This file is part of weboob.
#
# weboob 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.
#
# weboob 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 weboob. If not, see .
from weboob.browser.exceptions import BrowserHTTPNotFound
from weboob.browser import PagesBrowser, URL
from .pages import RecipePage, ResultsPage
__all__ = ['SevenFiftyGramsBrowser']
class SevenFiftyGramsBrowser(PagesBrowser):
BASEURL = 'https://www.750g.com'
search = URL('/recettes_(?P.*).htm', ResultsPage)
recipe = URL('/(?P.*).htm', RecipePage)
def iter_recipes(self, pattern):
try:
self.search.go(pattern=pattern.replace(' ', '_'))
except BrowserHTTPNotFound:
return []
if isinstance(self.page, ResultsPage):
return self.page.iter_recipes()
return [self.get_recipe_content()]
def get_recipe(self, id, recipe=None):
try:
self.recipe.go(id=id)
return self.get_recipe_content(recipe)
except BrowserHTTPNotFound:
return
def get_recipe_content(self, recipe=None):
recipe = self.page.get_recipe(obj=recipe)
comments = list(self.page.get_comments())
if comments:
recipe.comments = comments
return recipe
woob-6e2147adbb0d685e8e740a246e0c7f31465f3511-modules-750g/modules/750g/favicon.png 0000664 0000000 0000000 00000002625 13414430553 0025736 0 ustar 00root root 0000000 0000000 PNG
IHDR @ @ iq sRGB bKGD pHYs tIME: <&`M IDATxKEU=Oz(&j' ºAI؋H
xp\5K0
b`]!ȒQfg{ʃ5