summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar anderi <andreas@apocrypha.se> 2013-09-27 11:30:24 +0200
committerGravatar anderi <andreas@apocrypha.se> 2013-09-27 11:30:24 +0200
commit5401e18dfd406c2a8ed35c4b72c9df9f7dc3e436 (patch)
tree6012b2274ae039d07b89caab35a953544dd04ae7
parentIfolderRu: fixed #267 (diff)
downloadpyload-5401e18dfd406c2a8ed35c4b72c9df9f7dc3e436.tar.xz
fixes #281
-rw-r--r--module/plugins/hoster/ZippyshareCom.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/module/plugins/hoster/ZippyshareCom.py b/module/plugins/hoster/ZippyshareCom.py
index 3c7b68bb6..875a247a9 100644
--- a/module/plugins/hoster/ZippyshareCom.py
+++ b/module/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