summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster/ZippyshareCom.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2014-11-10 01:06:30 +0100
committerGravatar Walter Purcaro <vuolter@gmail.com> 2014-11-10 01:06:30 +0100
commit76b087986aa90967918ec52b459a857c11743203 (patch)
tree43f8e0a9b19e48c2da7d2a850316ae8a035d9d7f /module/plugins/hoster/ZippyshareCom.py
parent[AccountManager] Don't break pyload if account load fails (diff)
downloadpyload-76b087986aa90967918ec52b459a857c11743203.tar.xz
[ZippyshareCom] Update patterns
Diffstat (limited to 'module/plugins/hoster/ZippyshareCom.py')
-rw-r--r--module/plugins/hoster/ZippyshareCom.py11
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"))