pep8 on presseurop module
This commit is contained in:
parent
b0e8c10499
commit
a379396869
4 changed files with 11 additions and 8 deletions
|
|
@ -52,4 +52,3 @@ class NewspaperPresseuropBackend(GenericNewspaperBackend, ICapMessages):
|
||||||
thread.title = article.title
|
thread.title = article.title
|
||||||
thread.date = article.datetime
|
thread.date = article.datetime
|
||||||
yield(thread)
|
yield(thread)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -41,4 +41,3 @@ class NewspaperPresseuropBrowser(BaseBrowser):
|
||||||
"return page article content"
|
"return page article content"
|
||||||
self.location(_id)
|
self.location(_id)
|
||||||
return self.page.get_article(_id)
|
return self.page.get_article(_id)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,8 @@
|
||||||
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
|
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from weboob.tools.capabilities.messages.genericArticle import GenericNewsPage
|
from weboob.tools.capabilities.messages.genericArticle import GenericNewsPage
|
||||||
|
|
||||||
|
|
||||||
class ArticlePage(GenericNewsPage):
|
class ArticlePage(GenericNewsPage):
|
||||||
"ArticlePage object for presseurop"
|
"ArticlePage object for presseurop"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -19,11 +19,14 @@
|
||||||
|
|
||||||
|
|
||||||
import re
|
import re
|
||||||
|
|
||||||
|
|
||||||
def url2id(url):
|
def url2id(url):
|
||||||
"return an id from an url"
|
"return an id from an url"
|
||||||
regexp = re.compile(".*/([0-9]+)-.*")
|
regexp = re.compile(".*/([0-9]+)-.*")
|
||||||
id = regexp.match(url).group(1)
|
id = regexp.match(url).group(1)
|
||||||
return id
|
return id
|
||||||
|
|
||||||
|
|
||||||
def rssid(entry):
|
def rssid(entry):
|
||||||
return url2id(entry.link)
|
return url2id(entry.link)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue