summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster/ZippyshareCom.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2015-02-07 22:04:19 +0100
committerGravatar Walter Purcaro <vuolter@gmail.com> 2015-02-07 22:04:19 +0100
commit2f52964b45248e32cddcef0ac2f09477bec6c690 (patch)
treebbf35bbc0e3837ebc9290241e901f91838659fdb /module/plugins/hoster/ZippyshareCom.py
parent[CzshareCom] Account cleanup (diff)
downloadpyload-2f52964b45248e32cddcef0ac2f09477bec6c690.tar.xz
[ZippyshareCom] Fix https://github.com/pyload/pyload/issues/1150
Diffstat (limited to 'module/plugins/hoster/ZippyshareCom.py')
-rw-r--r--module/plugins/hoster/ZippyshareCom.py17
1 files changed, 7 insertions, 10 deletions
diff --git a/module/plugins/hoster/ZippyshareCom.py b/module/plugins/hoster/ZippyshareCom.py
index f32c5877f..ad4b49b44 100644
--- a/module/plugins/hoster/ZippyshareCom.py
+++ b/module/plugins/hoster/ZippyshareCom.py
@@ -9,7 +9,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class ZippyshareCom(SimpleHoster):
__name__ = "ZippyshareCom"
__type__ = "hoster"
- __version__ = "0.68"
+ __version__ = "0.69"
__pattern__ = r'http://www\d{0,2}\.zippyshare\.com/v(/|iew\.jsp.*key=)(?P<KEY>[\w^_]+)'
@@ -51,20 +51,17 @@ class ZippyshareCom(SimpleHoster):
def get_checksum(self):
try:
- m = re.search(r'\+[ ]*\((\d+)[ ]*\%[ ]*(\d+)[ ]*\+[ ]*(\d+)[ ]*\%[ ]*(\d+)\)[ ]*\+', self.html)
- if m:
- a1, a2, c1, c2 = map(int, m.groups())
- b = (a1 % a2) + (c1 % c2)
- else:
- a1, a2 = map(int, re.search(r'\(\'downloadB\'\).omg = (\d+)%(\d+)' , self.html).groups())
- c1, c2 = map(int, re.search(r'\(\'downloadB\'\).omg\) \* \((\d+)%(\d+)', self.html).groups())
- b = (a1 % a2) * (c1 % c2) + 18
+ z = re.search(r'var z = (\d+)', self.html).group(1)
+ n = (z - 3) % 2
+ b = (z - 3) % 3
+
+ checksum = n + b + z - 3
except Exception:
self.error(_("Unable to calculate checksum"))
else:
- return b
+ return checksum
getInfo = create_getInfo(ZippyshareCom)