Add informations for RSS feed of presseurop

This commit is contained in:
Florent 2012-03-08 12:09:13 +01:00 committed by Romain Bignon
commit 2ec85f0bfc
2 changed files with 5 additions and 3 deletions

View file

@ -23,7 +23,7 @@ from weboob.tools.capabilities.messages.GenericBackend import GenericNewspaperBa
from weboob.tools.backend import BackendConfig
from weboob.tools.value import Value
from .browser import NewspaperPresseuropBrowser
from .tools import rssid
from .tools import rssid, url2id
from weboob.tools.newsfeed import Newsfeed
@ -36,7 +36,9 @@ class NewspaperPresseuropBackend(GenericNewspaperBackend, ICapMessages):
NAME = 'presseurop'
DESCRIPTION = u'Presseurop website'
BROWSER = NewspaperPresseuropBrowser
RSSID = rssid
RSSID = staticmethod(rssid)
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'))

View file

@ -25,5 +25,5 @@ def url2id(url):
id = regexp.match(url).group(1)
return id
def rssid(self, entry):
def rssid(entry):
return url2id(entry.link)