summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster/SendspaceCom.py
diff options
context:
space:
mode:
Diffstat (limited to 'module/plugins/hoster/SendspaceCom.py')
-rw-r--r--module/plugins/hoster/SendspaceCom.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/module/plugins/hoster/SendspaceCom.py b/module/plugins/hoster/SendspaceCom.py
index 8b6c9781a..e441a594d 100644
--- a/module/plugins/hoster/SendspaceCom.py
+++ b/module/plugins/hoster/SendspaceCom.py
@@ -30,17 +30,19 @@ class SendspaceCom(SimpleHoster):
__author_name__ = "zoidberg"
__author_mail__ = "zoidberg@mujmail.cz"
- DOWNLOAD_URL_PATTERN = r'<a id="download_button" href="([^"]+)"'
FILE_NAME_PATTERN = r'<h2 class="bgray">\s*<(?:b|strong)>(?P<N>[^<]+)</'
FILE_SIZE_PATTERN = r'<div class="file_description reverse margin_center">\s*<b>File Size:</b>\s*(?P<S>[0-9.]+)(?P<U>[kKMG])i?B\s*</div>'
OFFLINE_PATTERN = r'<div class="msg error" style="cursor: default">Sorry, the file you requested is not available.</div>'
+
+ LINK_PATTERN = r'<a id="download_button" href="([^"]+)"'
CAPTCHA_PATTERN = r'<td><img src="(/captchas/captcha.php?captcha=([^"]+))"></td>'
USER_CAPTCHA_PATTERN = r'<td><img src="/captchas/captcha.php?user=([^"]+))"></td>'
+
def handleFree(self):
params = {}
for _ in xrange(3):
- found = re.search(self.DOWNLOAD_URL_PATTERN, self.html)
+ found = re.search(self.LINK_PATTERN, self.html)
if found:
if 'captcha_hash' in params:
self.correctCaptcha()