diff options
author | Walter Purcaro <vuolter@gmail.com> | 2014-11-10 01:06:30 +0100 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2014-11-10 01:06:30 +0100 |
commit | 76b087986aa90967918ec52b459a857c11743203 (patch) | |
tree | 43f8e0a9b19e48c2da7d2a850316ae8a035d9d7f /module/plugins/hoster/ZippyshareCom.py | |
parent | [AccountManager] Don't break pyload if account load fails (diff) | |
download | pyload-76b087986aa90967918ec52b459a857c11743203.tar.xz |
[ZippyshareCom] Update patterns
Diffstat (limited to 'module/plugins/hoster/ZippyshareCom.py')
-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")) |