From 2f52964b45248e32cddcef0ac2f09477bec6c690 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 7 Feb 2015 22:04:19 +0100 Subject: [ZippyshareCom] Fix https://github.com/pyload/pyload/issues/1150 --- module/plugins/hoster/ZippyshareCom.py | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) (limited to 'module') 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[\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) -- cgit v1.2.3