From f90475a3a0c74c87109157dd42e85c9010010168 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Wed, 11 Feb 2015 03:45:15 +0100 Subject: [ZippyshareCom] Update get_checksum --- module/plugins/hoster/ZippyshareCom.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'module/plugins/hoster/ZippyshareCom.py') diff --git a/module/plugins/hoster/ZippyshareCom.py b/module/plugins/hoster/ZippyshareCom.py index ac5e744a7..47a4acd03 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.70" + __version__ = "0.71" __pattern__ = r'http://www\d{0,2}\.zippyshare\.com/v(/|iew\.jsp.*key=)(?P[\w^_]+)' @@ -51,11 +51,9 @@ class ZippyshareCom(SimpleHoster): def get_checksum(self): try: - z = int(re.search(r'var z = (\d+)', self.html).group(1)) - n = (z - 3) % 2 - b = (z - 3) % 3 - - checksum = n + b + z - 3 + m = re.search(r'\+[ ]*\((\d+)[ ]*\%[ ]*(\d+)[ ]*\+[ ]*(\d+)[ ]*\%[ ]*(\d+)\)[ ]*\+', self.html) + a1, a2, c1, c2 = map(int, m.groups()) + checksum = (a1 % a2) + (c1 % c2) except Exception: self.error(_("Unable to calculate checksum")) -- cgit v1.2.3