summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster
diff options
context:
space:
mode:
authorGravatar Stefano <l.stickell@yahoo.it> 2013-10-13 17:19:32 +0200
committerGravatar Stefano <l.stickell@yahoo.it> 2013-10-13 17:19:32 +0200
commit376e56dd2cc73734a056c7fc577c83b0731c928f (patch)
treebd2a0df872da0139f5fb9cd8ad4a9e9285b64f5e /module/plugins/hoster
parentSimpleHoster: improved 0.4.9 cookie bug workaround (diff)
downloadpyload-376e56dd2cc73734a056c7fc577c83b0731c928f.tar.xz
Zippyshare: little improvements.
Diffstat (limited to 'module/plugins/hoster')
-rw-r--r--module/plugins/hoster/ZippyshareCom.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/module/plugins/hoster/ZippyshareCom.py b/module/plugins/hoster/ZippyshareCom.py
index a3b1cf783..c98679a22 100644
--- a/module/plugins/hoster/ZippyshareCom.py
+++ b/module/plugins/hoster/ZippyshareCom.py
@@ -1,6 +1,9 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
+# Test links (random.bin):
+# http://www29.zippyshare.com/v/55578602/file.html
+
import re
import subprocess
import tempfile
@@ -26,6 +29,8 @@ class ZippyshareCom(SimpleHoster):
FILE_INFO_PATTERN = r'document\.getElementById\(\'dlbutton\'\)\.href = "[^;]*/(?P<N>[^"]+)";'
FILE_OFFLINE_PATTERN = r'>File does not exist on this server</div>'
+ SH_COOKIES = [('zippyshare.com', 'ziplocale', 'en')]
+
DOWNLOAD_URL_PATTERN = r"<script type=\"text/javascript\">([^<]*?)(document\.getElementById\('dlbutton'\).href = [^;]+;)"
SEED_PATTERN = r'swfobject.embedSWF\("([^"]+)".*?seed: (\d+)'
CAPTCHA_KEY_PATTERN = r'Recaptcha.create\("([^"]+)"'
@@ -35,16 +40,14 @@ class ZippyshareCom(SimpleHoster):
LAST_KNOWN_VALUES = (9, 2374755) # time = (seed * multiply) % modulo
def setup(self):
- self.html = None
- self.wantReconnect = False
self.multiDL = True
def handleFree(self):
url = self.get_file_url()
if not url:
self.fail("Download URL not found.")
- self.logDebug("Download URL %s" % url)
- self.download(url, cookies=True)
+ self.logDebug("Download URL: %s" % url)
+ self.download(url)
check = self.checkDownload({
"swf_values": re.compile(self.SEED_PATTERN)