paste* backends: Use the page regexp to find out the id

This commit is contained in:
Laurent Bachelier 2011-04-14 19:36:35 +02:00
commit c2abb12985
2 changed files with 2 additions and 6 deletions

View file

@ -20,7 +20,6 @@
from weboob.tools.browser import BasePage
from urlparse import urlparse
import re
__all__ = ['PastePage', 'PostPage', 'CaptchaPage']
@ -38,8 +37,7 @@ class PastePage(BasePage):
"""
Find out the ID from the URL
"""
path = urlparse(self.url).path
return path[1:]
return self.group_dict['id']
class PostPage(BasePage):
def post(self, paste):

View file

@ -19,7 +19,6 @@
from weboob.tools.browser import BasePage
from urlparse import urlparse
__all__ = ['PastePage', 'PostPage']
@ -37,8 +36,7 @@ class PastePage(BasePage):
"""
Find out the ID from the URL
"""
path = urlparse(self.url).path
return path[1:]
return self.group_dict['id']
class PostPage(BasePage):