pep8 on presseurop module
This commit is contained in:
parent
b0e8c10499
commit
a379396869
4 changed files with 11 additions and 8 deletions
|
|
@ -40,7 +40,7 @@ class NewspaperPresseuropBackend(GenericNewspaperBackend, ICapMessages):
|
|||
URL2ID = staticmethod(url2id)
|
||||
RSSSIZE = 50
|
||||
CONFIG = BackendConfig(Value('lang', label='Lang of articles',
|
||||
choices={'fr': 'fr', 'de': 'de', 'en': 'en', 'cs': 'cs', 'es' : 'es', 'it' : 'it', 'nl' : 'nl', 'pl' : 'pl', 'pt' : 'pt', 'ro' : 'ro'}, default='fr'))
|
||||
choices={'fr': 'fr', 'de': 'de', 'en': 'en', 'cs': 'cs', 'es': 'es', 'it': 'it', 'nl': 'nl', 'pl': 'pl', 'pt': 'pt', 'ro': 'ro'}, default='fr'))
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
GenericNewspaperBackend.__init__(self, *args, **kwargs)
|
||||
|
|
@ -52,4 +52,3 @@ class NewspaperPresseuropBackend(GenericNewspaperBackend, ICapMessages):
|
|||
thread.title = article.title
|
||||
thread.date = article.datetime
|
||||
yield(thread)
|
||||
|
||||
|
|
|
|||
|
|
@ -41,4 +41,3 @@ class NewspaperPresseuropBrowser(BaseBrowser):
|
|||
"return page article content"
|
||||
self.location(_id)
|
||||
return self.page.get_article(_id)
|
||||
|
||||
|
|
|
|||
|
|
@ -19,6 +19,8 @@
|
|||
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from weboob.tools.capabilities.messages.genericArticle import GenericNewsPage
|
||||
|
||||
|
||||
class ArticlePage(GenericNewsPage):
|
||||
"ArticlePage object for presseurop"
|
||||
|
||||
|
|
|
|||
|
|
@ -19,11 +19,14 @@
|
|||
|
||||
|
||||
import re
|
||||
|
||||
|
||||
def url2id(url):
|
||||
"return an id from an url"
|
||||
regexp = re.compile(".*/([0-9]+)-.*")
|
||||
id = regexp.match(url).group(1)
|
||||
return id
|
||||
|
||||
|
||||
def rssid(entry):
|
||||
return url2id(entry.link)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue