diff options
-rw-r--r-- | module/plugins/hoster/ZippyshareCom.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/module/plugins/hoster/ZippyshareCom.py b/module/plugins/hoster/ZippyshareCom.py index 1b2b9bce2..72bdf3171 100644 --- a/module/plugins/hoster/ZippyshareCom.py +++ b/module/plugins/hoster/ZippyshareCom.py @@ -21,7 +21,7 @@ class ZippyshareCom(SimpleHoster): __authors__ = [("Walter Purcaro", "vuolter@gmail.com")] - NAME_PATTERN = r'("/[di]/\d+/".+?"/|<title>Zippyshare.com - )(?P<N>.+?)("|</title>)' + NAME_PATTERN = r'("\d{6,}/"[ ]*\+.+?"/|<title>Zippyshare.com - )(?P<N>.+?)("|</title>)' SIZE_PATTERN = r'>Size:.+?">(?P<S>[\d.,]+) (?P<U>[\w^_]+)' OFFLINE_PATTERN = r'>File does not exist on this server<' @@ -48,8 +48,13 @@ class ZippyshareCom(SimpleHoster): def get_checksum(self): try: - 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()) + m = re.search(r'\+[ ]*\((\d+)[ ]*\%[ ]*(\d+)[ ]*\+[ ]*(\d+)[ ]*\%[ ]*(\d+)\)[ ]*\+', self.html) + if m: + a1, a2, c1, c2 = map(int, m.groups()) + 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) except: self.error(_("Unable to calculate checksum")) |