diff options
-rw-r--r-- | module/plugins/accounts/UploadedTo.py | 6 | ||||
-rw-r--r-- | module/plugins/crypter/BitshareComFolder.py | 31 | ||||
-rw-r--r-- | module/plugins/hoster/CloudzerNet.py | 17 | ||||
-rw-r--r-- | module/plugins/hoster/UnrestrictLi.py | 4 |
4 files changed, 48 insertions, 10 deletions
diff --git a/module/plugins/accounts/UploadedTo.py b/module/plugins/accounts/UploadedTo.py index e10b93e8d..5fd86dd07 100644 --- a/module/plugins/accounts/UploadedTo.py +++ b/module/plugins/accounts/UploadedTo.py @@ -23,7 +23,7 @@ from time import time class UploadedTo(Account): __name__ = "UploadedTo" - __version__ = "0.23" + __version__ = "0.24" __type__ = "account" __description__ = """ul.net account plugin""" __author_name__ = ("mkaay") @@ -45,10 +45,10 @@ class UploadedTo(Account): if raw_valid == "unlimited": validuntil = -1 else: - raw_valid = re.findall(r"(\d+) (weeks|days|hours)", raw_valid) + raw_valid = re.findall(r"(\d+) (Week|weeks|days|hours)", raw_valid) validuntil = time() for n, u in raw_valid: - validuntil += 3600 * int(n) * {"weeks": 168, "days": 24, "hours": 1}[u] + validuntil += 3600 * int(n) * {"Week": 168, "weeks": 168, "days": 24, "hours": 1}[u] return {"validuntil":validuntil, "trafficleft":traffic, "maxtraffic":50*1024*1024} else: diff --git a/module/plugins/crypter/BitshareComFolder.py b/module/plugins/crypter/BitshareComFolder.py new file mode 100644 index 000000000..b77ddb9d9 --- /dev/null +++ b/module/plugins/crypter/BitshareComFolder.py @@ -0,0 +1,31 @@ +# -*- coding: utf-8 -*- + +############################################################################ +# This program is free software: you can redistribute it and/or modify # +# it under the terms of the GNU Affero General Public License as # +# published by the Free Software Foundation, either version 3 of the # +# License, or (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU Affero General Public License for more details. # +# # +# You should have received a copy of the GNU Affero General Public License # +# along with this program. If not, see <http://www.gnu.org/licenses/>. # +############################################################################ + +from module.plugins.internal.SimpleCrypter import SimpleCrypter + + +class BitshareComFolder(SimpleCrypter): + __name__ = "BitshareComFolder" + __type__ = "crypter" + __pattern__ = r"http://(?:www\.)?bitshare\.com/\?d=\w+" + __version__ = "0.01" + __description__ = """Bitshare.com Folder Plugin""" + __author_name__ = ("stickell") + __author_mail__ = ("l.stickell@yahoo.it") + + LINK_PATTERN = r'<a href="(http://bitshare.com/files/.+)">.+</a></td>' + TITLE_PATTERN = r'View public folder "(?P<title>.+)"</h1>' 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): |