pastebin: Fix login without API

This commit is contained in:
Laurent Bachelier 2012-11-08 11:15:14 +01:00 committed by Romain Bignon
commit 400056c057
2 changed files with 3 additions and 2 deletions

View file

@ -24,7 +24,7 @@ from weboob.tools.ordereddict import OrderedDict
from weboob.capabilities.paste import PasteNotFound
from .pages import PastePage, PostPage, UserPage
from .pages import PastePage, PostPage, UserPage, LoginPage
from .paste import PastebinPaste
import urllib
@ -43,6 +43,7 @@ class PastebinBrowser(BaseBrowser):
PASTE_URL = 'http://%s/(?P<id>\w+)' % DOMAIN
API_URL = 'http://%s/api/api_post.php' % DOMAIN
PAGES = OrderedDict((
('http://%s/login' % DOMAIN, LoginPage),
('http://%s/u/(?P<username>.+)' % DOMAIN, UserPage),
('http://%s/' % DOMAIN, PostPage),
(PASTE_URL, PastePage),

View file

@ -20,7 +20,7 @@
from weboob.tools.browser import BasePage, BrokenPageError
__all__ = ['PastePage', 'PostPage']
__all__ = ['PastePage', 'PostPage', 'LoginPage']
class BasePastebinPage(BasePage):