diff options
Diffstat (limited to 'module/plugins/hoster')
-rw-r--r-- | module/plugins/hoster/CloudzerNet.py | 17 | ||||
-rw-r--r-- | module/plugins/hoster/UnrestrictLi.py | 4 |
2 files changed, 14 insertions, 7 deletions
diff --git a/module/plugins/hoster/CloudzerNet.py b/module/plugins/hoster/CloudzerNet.py index 7608b193d..2701752ce 100644 --- a/module/plugins/hoster/CloudzerNet.py +++ b/module/plugins/hoster/CloudzerNet.py @@ -1,9 +1,10 @@ # -*- coding: utf-8 -*- import re -from module.plugins.internal.SimpleHoster import SimpleHoster, parseFileInfo +from module.plugins.internal.SimpleHoster import SimpleHoster from module.common.json_layer import json_loads from module.plugins.ReCaptcha import ReCaptcha from module.network.RequestFactory import getURL +from module.utils import parseFileSize def getInfo(urls): @@ -12,7 +13,13 @@ def getInfo(urls): if 'Location: http://cloudzer.net/404' in header: file_info = (url, 0, 1, url) else: - file_info = parseFileInfo(CloudzerNet, url, getURL(url, decode=True)) + if url.endswith('/'): + api_data = getURL(url + 'status') + else: + api_data = getURL(url + '/status') + name, size = api_data.splitlines() + size = parseFileSize(size) + file_info = (name, size, 2, url) yield file_info @@ -20,10 +27,10 @@ class CloudzerNet(SimpleHoster): __name__ = "CloudzerNet" __type__ = "hoster" __pattern__ = r"http://(www\.)?(cloudzer\.net/file/|clz\.to/(file/)?)(?P<ID>\w+).*" - __version__ = "0.02" + __version__ = "0.03" __description__ = """Cloudzer.net hoster plugin""" - __author_name__ = ("gs", "z00nx") - __author_mail__ = ("I-_-I-_-I@web.de", "z00nx0@gmail.com") + __author_name__ = ("gs", "z00nx", "stickell") + __author_mail__ = ("I-_-I-_-I@web.de", "z00nx0@gmail.com", "l.stickell@yahoo.it") FILE_SIZE_PATTERN = '<span class="size">(?P<S>[^<]+)</span>' WAIT_PATTERN = '<meta name="wait" content="(\d+)">' diff --git a/module/plugins/hoster/UnrestrictLi.py b/module/plugins/hoster/UnrestrictLi.py index e866a9269..084c2beff 100644 --- a/module/plugins/hoster/UnrestrictLi.py +++ b/module/plugins/hoster/UnrestrictLi.py @@ -35,7 +35,7 @@ def secondsToMidnight(): class UnrestrictLi(Hoster): __name__ = "UnrestrictLi" - __version__ = "0.03" + __version__ = "0.04" __type__ = "hoster" __pattern__ = r"https?://.*(unrestrict|unr)\.li" __description__ = """Unrestrict.li hoster plugin""" @@ -43,7 +43,7 @@ class UnrestrictLi(Hoster): __author_mail__ = ("l.stickell@yahoo.it") def init(self): - self.chunkLimit = -1 + self.chunkLimit = 16 self.resumeDownload = True def process(self, pyfile): |