use id2url closes #480

This commit is contained in:
Juke 2011-02-09 01:50:46 +01:00 committed by Romain Bignon
commit 85c7cf3093
4 changed files with 55 additions and 19 deletions

View file

@ -18,10 +18,9 @@
from .pages.article import ArticlePage
from .pages.minutes20 import Minutes20Page
from weboob.tools.browser import BaseBrowser
from .tools import id2url
__all__ = ['Newspaper20minutesBrowser']
class Newspaper20minutesBrowser(BaseBrowser):
PAGES = {
'http://www.20minutes.fr/article/?.*': ArticlePage,
@ -33,6 +32,6 @@ class Newspaper20minutesBrowser(BaseBrowser):
def is_logged(self):
return False
def get_content(self, url):
self.location(url)
def get_content(self, _id):
self.location(id2url(_id))
return self.page.article