paste* backends: Use the page regexp to find out the id
This commit is contained in:
parent
4083f9030d
commit
c2abb12985
2 changed files with 2 additions and 6 deletions
|
|
@ -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):
|
||||
|
|
|
|||
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue