diff options
author | Stefano <l.stickell@yahoo.it> | 2013-09-27 22:54:06 +0200 |
---|---|---|
committer | Stefano <l.stickell@yahoo.it> | 2013-10-07 11:22:41 +0200 |
commit | d22a070170c5db2e9c4134aafd887eb23faf7645 (patch) | |
tree | 5a20f527221cd3ab3a33844c1bdf9ff3e3d417cf | |
parent | IfolderRu: fixed #267 (diff) | |
download | pyload-d22a070170c5db2e9c4134aafd887eb23faf7645.tar.xz |
Merge pull request #284 from anderi/patch-1
Zippyshare: fixed #281
(cherry picked from commit 5569a1419d56b495b9b06527501108bfaa52795a)
-rw-r--r-- | pyload/plugins/hoster/ZippyshareCom.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/pyload/plugins/hoster/ZippyshareCom.py b/pyload/plugins/hoster/ZippyshareCom.py index 3c7b68bb6..875a247a9 100644 --- a/pyload/plugins/hoster/ZippyshareCom.py +++ b/pyload/plugins/hoster/ZippyshareCom.py @@ -26,7 +26,7 @@ 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>' - DOWNLOAD_URL_PATTERN = r"<script type=\"text/javascript\">([^<]*?)document\.getElementById\('dlbutton'\).href = ([^;]+);" + 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\("([^"]+)"' CAPTCHA_SHORTENCODE_PATTERN = r"shortencode: '([^']+)'" @@ -69,10 +69,11 @@ class ZippyshareCom(SimpleHoster): if found: #Method #1: JS eval js = "\n".join(found.groups()) - regex = r"document.getElementById\(\\*'dlbutton\\*'\).omg" - omg = re.search(regex + r" = ([^;]+);", js).group(1) - js = re.sub(regex + r" = ([^;]+);", '', js) - js = re.sub(regex, omg, js) + d = re.search(r'span id="omg" class="(\d*)"', self.html).group(1) + regex = r"document.getElementById\('omg'\).getAttribute\('class'\)" + js = re.sub(regex, d, js) + regex = r"document.getElementById\(\\*'dlbutton\\*'\).href = " + js = re.sub(regex, '', js) url = self.js.eval(js) else: #Method #2: SWF eval |