summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster/SendspaceCom.py
diff options
context:
space:
mode:
authorGravatar zoidberg10 <zoidberg@mujmail.cz> 2011-11-22 00:26:08 +0100
committerGravatar zoidberg10 <zoidberg@mujmail.cz> 2011-11-22 00:26:08 +0100
commit9378237ddc39f8ee96e7a3ddb9cc37ce487c5f4d (patch)
tree325aba4194c29ee7869f662e1b8f8b5015afd283 /module/plugins/hoster/SendspaceCom.py
parentSimpleHoster fix (diff)
downloadpyload-9378237ddc39f8ee96e7a3ddb9cc37ce487c5f4d.tar.xz
fix filepost (#431), hellspy, ifolder, letitbit, change SimpleHoster patterns
Diffstat (limited to 'module/plugins/hoster/SendspaceCom.py')
-rw-r--r--module/plugins/hoster/SendspaceCom.py20
1 files changed, 6 insertions, 14 deletions
diff --git a/module/plugins/hoster/SendspaceCom.py b/module/plugins/hoster/SendspaceCom.py
index b28df29f9..22abaff56 100644
--- a/module/plugins/hoster/SendspaceCom.py
+++ b/module/plugins/hoster/SendspaceCom.py
@@ -17,29 +17,19 @@
"""
import re
-from module.plugins.internal.SimpleHoster import SimpleHoster, parseFileInfo
-from module.network.RequestFactory import getURL
-
-def getInfo(urls):
- result = []
-
- for url in urls:
- file_info = parseFileInfo(SendspaceCom, url, getURL(url, decode=True))
- result.append(file_info)
-
- yield result
+from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class SendspaceCom(SimpleHoster):
__name__ = "SendspaceCom"
__type__ = "hoster"
__pattern__ = r"http://(www\.)?sendspace.com/file/.*"
- __version__ = "0.12"
+ __version__ = "0.13"
__description__ = """sendspace.com plugin - free only"""
__author_name__ = ("zoidberg")
DOWNLOAD_URL_PATTERN = r'<a id="download_button" href="([^"]+)"'
- FILE_NAME_PATTERN = r'<h2 class="bgray">\s*<(?:b|strong)>([^<]+)</'
- FILE_SIZE_PATTERN = r'<div class="file_description reverse margin_center">\s*<b>File Size:</b>\s*([0-9.]+)([kKMG]i?B)\s*</div>'
+ 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>'
FILE_OFFLINE_PATTERN = r'<div class="msg error" style="cursor: default">Sorry, the file you requested is not available.</div>'
CAPTCHA_PATTERN = r'<td><img src="(/captchas/captcha.php?captcha=([^"]+))"></td>'
USER_CAPTCHA_PATTERN = r'<td><img src="/captchas/captcha.php?user=([^"]+))"></td>'
@@ -73,3 +63,5 @@ class SendspaceCom(SimpleHoster):
self.logDebug("Download URL: %s" % download_url)
self.download(download_url)
+
+create_getInfo(SendspaceCom) \ No newline at end of file