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 weboob.tools.browser import BasePage
|
||||||
|
|
||||||
from urlparse import urlparse
|
|
||||||
import re
|
import re
|
||||||
|
|
||||||
__all__ = ['PastePage', 'PostPage', 'CaptchaPage']
|
__all__ = ['PastePage', 'PostPage', 'CaptchaPage']
|
||||||
|
|
@ -38,8 +37,7 @@ class PastePage(BasePage):
|
||||||
"""
|
"""
|
||||||
Find out the ID from the URL
|
Find out the ID from the URL
|
||||||
"""
|
"""
|
||||||
path = urlparse(self.url).path
|
return self.group_dict['id']
|
||||||
return path[1:]
|
|
||||||
|
|
||||||
class PostPage(BasePage):
|
class PostPage(BasePage):
|
||||||
def post(self, paste):
|
def post(self, paste):
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,6 @@
|
||||||
|
|
||||||
|
|
||||||
from weboob.tools.browser import BasePage
|
from weboob.tools.browser import BasePage
|
||||||
from urlparse import urlparse
|
|
||||||
|
|
||||||
__all__ = ['PastePage', 'PostPage']
|
__all__ = ['PastePage', 'PostPage']
|
||||||
|
|
||||||
|
|
@ -37,8 +36,7 @@ class PastePage(BasePage):
|
||||||
"""
|
"""
|
||||||
Find out the ID from the URL
|
Find out the ID from the URL
|
||||||
"""
|
"""
|
||||||
path = urlparse(self.url).path
|
return self.group_dict['id']
|
||||||
return path[1:]
|
|
||||||
|
|
||||||
|
|
||||||
class PostPage(BasePage):
|
class PostPage(BasePage):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue