Pastebin: handle user pages

Not used for anything (for now), but you can be redirected to them after login.
This commit is contained in:
Laurent Bachelier 2011-12-03 14:29:36 +01:00
commit a37359807a
2 changed files with 5 additions and 1 deletions

View file

@ -23,7 +23,7 @@ from weboob.tools.browser.decorators import id2url, check_url
from weboob.capabilities.paste import PasteNotFound
from .pages import PastePage, PostPage
from .pages import PastePage, PostPage, UserPage
from .paste import PastebinPaste
import urllib
@ -41,6 +41,7 @@ class PastebinBrowser(BaseBrowser):
PASTE_URL = 'http://%s/(?P<id>\w+)' % DOMAIN
API_URL = 'http://%s/api/api_post.php' % DOMAIN
PAGES = {PASTE_URL: PastePage,
'http://%s/u/(?P<username>.+)' % DOMAIN: UserPage,
'http://%s/' % DOMAIN: PostPage}
def __init__(self, api_key, *args, **kwargs):

View file

@ -79,3 +79,6 @@ class PostPage(BasePastebinPage):
if expiration:
self.browser['paste_expire_date'] = [expiration]
self.browser.submit()
class UserPage(BasePastebinPage):
pass