diff options
Diffstat (limited to 'module/plugins')
| -rw-r--r-- | module/plugins/hoster/CatShareNet.py | 2 | ||||
| -rw-r--r-- | module/plugins/hoster/ZippyshareCom.py | 39 | 
2 files changed, 26 insertions, 15 deletions
diff --git a/module/plugins/hoster/CatShareNet.py b/module/plugins/hoster/CatShareNet.py index f148a878e..88ca6c927 100644 --- a/module/plugins/hoster/CatShareNet.py +++ b/module/plugins/hoster/CatShareNet.py @@ -13,7 +13,7 @@ class CatShareNet(SimpleHoster):      __type__ = "hoster"      __version__ = "0.03" -    __pattern__ = r'http://(?:www\.)?catshare\.net/\w+' +    __pattern__ = r'http://(?:www\.)?catshare\.net/\w{16}'      __description__ = """CatShare.net hoster plugin"""      __author_name__ = ("z00nx", "prOq") diff --git a/module/plugins/hoster/ZippyshareCom.py b/module/plugins/hoster/ZippyshareCom.py index 4724a2980..ef6b58c27 100644 --- a/module/plugins/hoster/ZippyshareCom.py +++ b/module/plugins/hoster/ZippyshareCom.py @@ -11,18 +11,18 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo  class ZippyshareCom(SimpleHoster):      __name__ = "ZippyshareCom"      __type__ = "hoster" -    __version__ = "0.50" +    __version__ = "0.51"      __pattern__ = r'(?P<HOST>http://www\d{0,2}\.zippyshare\.com)/v(?:/|iew\.jsp.*key=)(?P<KEY>\d+)' -    __description__ = """ Zippyshare.com hoster plugin """ -    __author_name__ = ("stickell", "skylab", "Walter Purcaro") -    __author_mail__ = ("l.stickell@yahoo.it", "development@sky-lab.de", "vuolter@gmail.com") +    __description__ = """Zippyshare.com hoster plugin""" +    __author_name__ = "Walter Purcaro" +    __author_mail__ = "vuolter@gmail.com" -    FILE_NAME_PATTERN = r'<title>Zippyshare\.com - (?P<N>[^<]+)</title>' -    FILE_SIZE_PATTERN = r'>Size:</font>\s*<font [^>]*>(?P<S>[0-9.,]+) (?P<U>[kKMG]+)i?B</font><br />' -    FILE_INFO_PATTERN = r'document\.getElementById\(\'dlbutton\'\)\.href = "[^;]*/(?P<N>[^"]+)";' +    FILE_NAME_PATTERN = r'>Name:.+?">(?P<N>.+?)<' +    FILE_SIZE_PATTERN = r'>Size:.+?">(?P<S>[\d.]+) (?P<U>\w+)' +      OFFLINE_PATTERN = r'>File does not exist on this server<'      COOKIES = [(".zippyshare.com", "ziplocale", "en")] @@ -30,6 +30,7 @@ class ZippyshareCom(SimpleHoster):      def setup(self):          self.multiDL = True +        self.chunkLimit = -1          self.resumeDownload = True @@ -40,15 +41,25 @@ class ZippyshareCom(SimpleHoster):      def get_checksum(self): -        m_a = re.search(r'var a = (\d+)\%(\d+);', self.html) -        m_b = re.search(r'var b = (\d+)\%(\d+);', self.html) -        if m_a is None or m_b is None: +        m = re.search(r'\(a\*b\+19\)', self.html) +        if m: +            m = re.findall(r'var \w = (\d+)\%(\d+);', self.html) +            c = lambda a,b: a * b + 19 +        else: +            m = re.findall(r'(\d+) \% (\d+)', self.html) +            c = lambda a,b: a + b + +        if not m:              self.parseError("Unable to calculate checksum") -        # Checksum is calculated as (a*b+19), where a and b are the result of modulo calculations -        a = map(lambda x: int(x), m_a.groups()) -        b = map(lambda x: int(x), m_b.groups()) -        return a[0] % a[1] * b[0] % b[1] + 19 +        a = map(lambda x: int(x), m[0]) +        b = map(lambda x: int(x), m[1]) + +        # Checksum is calculated as (a*b+19) or (a*b), where a and b are the result of modulo calculations +        a = a[0] % a[1] +        b = b[0] % b[1] + +        return c(a, b)      def get_link(self):  | 
