diff options
Diffstat (limited to 'module')
-rw-r--r-- | module/plugins/accounts/NoPremiumPl.py | 4 | ||||
-rw-r--r-- | module/plugins/accounts/RapideoPl.py | 4 | ||||
-rw-r--r-- | module/plugins/accounts/RapidgatorNet.py | 6 | ||||
-rw-r--r-- | module/plugins/crypter/FilecryptCc.py | 7 | ||||
-rw-r--r-- | module/plugins/crypter/ShareLinksBiz.py | 15 | ||||
-rw-r--r-- | module/plugins/hooks/Checksum.py | 10 | ||||
-rw-r--r-- | module/plugins/hoster/MediafireCom.py | 2 | ||||
-rw-r--r-- | module/plugins/hoster/OneFichierCom.py | 4 | ||||
-rw-r--r-- | module/plugins/hoster/UploadedTo.py | 4 | ||||
-rw-r--r-- | module/plugins/hoster/YoutubeCom.py | 4 | ||||
-rw-r--r-- | module/plugins/internal/Hoster.py | 3 | ||||
-rw-r--r-- | module/plugins/internal/SimpleHoster.py | 1 |
12 files changed, 37 insertions, 27 deletions
diff --git a/module/plugins/accounts/NoPremiumPl.py b/module/plugins/accounts/NoPremiumPl.py index e9dad7647..97e58f5f0 100644 --- a/module/plugins/accounts/NoPremiumPl.py +++ b/module/plugins/accounts/NoPremiumPl.py @@ -11,7 +11,7 @@ from module.plugins.internal.Account import Account class NoPremiumPl(Account): __name__ = "NoPremiumPl" __type__ = "account" - __version__ = "0.03" + __version__ = "0.04" __status__ = "testing" __description__ = "NoPremium.pl account plugin" @@ -32,7 +32,7 @@ class NoPremiumPl(Account): _pwd = None - def parse_info(self, name, req): + def parse_info(self, user, password, data, req): self._req = req try: result = json_loads(self.run_auth_query()) diff --git a/module/plugins/accounts/RapideoPl.py b/module/plugins/accounts/RapideoPl.py index 42d084bdb..e9a483927 100644 --- a/module/plugins/accounts/RapideoPl.py +++ b/module/plugins/accounts/RapideoPl.py @@ -11,7 +11,7 @@ from module.plugins.internal.Account import Account class RapideoPl(Account): __name__ = "RapideoPl" __type__ = "account" - __version__ = "0.03" + __version__ = "0.04" __status__ = "testing" __description__ = "Rapideo.pl account plugin" @@ -32,7 +32,7 @@ class RapideoPl(Account): _pwd = None - def parse_info(self, name, req): + def parse_info(self, user, password, data, req): self._req = req try: result = json_loads(self.run_auth_query()) diff --git a/module/plugins/accounts/RapidgatorNet.py b/module/plugins/accounts/RapidgatorNet.py index 5ce51a1ec..acd7a547b 100644 --- a/module/plugins/accounts/RapidgatorNet.py +++ b/module/plugins/accounts/RapidgatorNet.py @@ -9,7 +9,7 @@ from module.common.json_layer import json_loads class RapidgatorNet(Account): __name__ = "RapidgatorNet" __type__ = "account" - __version__ = "0.11" + __version__ = "0.12" __status__ = "testing" __description__ = """Rapidgator.net account plugin""" @@ -30,7 +30,7 @@ class RapidgatorNet(Account): sid = self.get_data(user).get('sid', None) assert sid - html = self.load(urlparse.urljoin(self.API_URL, "info"), + html = self.load(urlparse.urljoin(self.API_URL, "user/info"), get={'sid': sid}) self.log_debug("API:USERINFO", html) @@ -58,7 +58,7 @@ class RapidgatorNet(Account): def login(self, user, password, data, req): try: - html = self.load(urlparse.urljoin(self.API_URL, "login"), + html = self.load(urlparse.urljoin(self.API_URL, "user/login"), post={'username': user, 'password': password}) diff --git a/module/plugins/crypter/FilecryptCc.py b/module/plugins/crypter/FilecryptCc.py index 9f4ad69aa..ac78e9aa8 100644 --- a/module/plugins/crypter/FilecryptCc.py +++ b/module/plugins/crypter/FilecryptCc.py @@ -16,7 +16,7 @@ from module.plugins.captcha.ReCaptcha import ReCaptcha class FilecryptCc(Crypter): __name__ = "FilecryptCc" __type__ = "crypter" - __version__ = "0.18" + __version__ = "0.19" __status__ = "testing" __pattern__ = r'https?://(?:www\.)?filecrypt\.cc/Container/\w+' @@ -140,8 +140,9 @@ class FilecryptCc(Crypter): for link in weblinks: res = self.load("%s/Link/%s.html" % (self.base_url, link)) link2 = re.search('<iframe noresize src="(.*)"></iframe>', res) - res2 = self.load(link2.group(1), just_header=True) - self.links.append(res2['location']) + if link2: + res2 = self.load(link2.group(1), just_header=True) + self.links.append(res2['location']) except Exception, e: self.log_debug("Error decrypting weblinks: %s" % e) diff --git a/module/plugins/crypter/ShareLinksBiz.py b/module/plugins/crypter/ShareLinksBiz.py index 6fbe59b38..712b4fff2 100644 --- a/module/plugins/crypter/ShareLinksBiz.py +++ b/module/plugins/crypter/ShareLinksBiz.py @@ -10,7 +10,7 @@ from module.plugins.internal.Crypter import Crypter class ShareLinksBiz(Crypter): __name__ = "ShareLinksBiz" __type__ = "crypter" - __version__ = "1.16" + __version__ = "1.17" __status__ = "testing" __pattern__ = r'http://(?:www\.)?(share-links|s2l)\.biz/(?P<ID>_?\w+)' @@ -68,8 +68,12 @@ class ShareLinksBiz(Crypter): url = pyfile.url if 's2l.biz' in url: url = self.load(url, just_header=True)['location'] - self.base_url = "http://www.%s.biz" % re.match(self.__pattern__, url).group(1) - self.file_id = re.match(self.__pattern__, url).group('ID') + if re.match(self.__pattern__, url): + self.base_url = "http://www.%s.biz" % re.match(self.__pattern__, url).group(1) + self.file_id = re.match(self.__pattern__, url).group('ID') + else: + self.log_debug("Could not initialize, URL [%s] does not match pattern [%s]" % (url, self.__pattern__)) + self.fail("Unsupported download link") self.package = pyfile.package() @@ -114,7 +118,10 @@ class ShareLinksBiz(Crypter): self.log_debug("Captcha map with [%d] positions" % len(captchaMap.keys())) #: Request user for captcha coords - m = re.search(r'<img src="/captcha.gif\?d=(.*?)&PHPSESSID=(.*?)&legend=1"', self.html) + m = re.search(r'<img src="/captcha.gif\?d=(.+?)&PHPSESSID=(.+?)&legend=1"', self.html) + if not m: + self.log_debug("Captcha url data not found, maybe plugin out of date?") + self.fail("Captcha url data not found") captchaUrl = self.base_url + '/captcha.gif?d=%s&PHPSESSID=%s' % (m.group(1), m.group(2)) self.log_debug("Waiting user for correct position") coords = self.captcha.decrypt(captchaUrl, input_type="gif", output_type='positional') diff --git a/module/plugins/hooks/Checksum.py b/module/plugins/hooks/Checksum.py index 6ecbfcda2..da4d35df1 100644 --- a/module/plugins/hooks/Checksum.py +++ b/module/plugins/hooks/Checksum.py @@ -38,7 +38,7 @@ def compute_checksum(local_file, algorithm): class Checksum(Addon): __name__ = "Checksum" __type__ = "hook" - __version__ = "0.19" + __version__ = "0.20" __status__ = "testing" __config__ = [("check_checksum", "bool" , "Check checksum? (If False only size will be verified)", True ), @@ -131,15 +131,15 @@ class Checksum(Addon): for key in self.algorithms: if key in data: - checksum = computeChecksum(local_file, key.replace("-", "").lower()) + checksum = compute_checksum(local_file, key.replace("-", "").lower()) if checksum: - if checksum is data[key].lower(): + if checksum == data[key].lower(): self.log_info(_('File integrity of "%s" verified by %s checksum (%s)') % (pyfile.name, key.upper(), checksum)) break else: self.log_warning(_("%s checksum for file %s does not match (%s != %s)") % - (key.upper(), pyfile.name, checksum, data[key])) + (key.upper(), pyfile.name, checksum, data[key].lower())) self.check_failed(pyfile, local_file, "Checksums do not match") else: self.log_warning(_("Unsupported hashing algorithm"), key.upper()) @@ -186,7 +186,7 @@ class Checksum(Addon): local_file = fs_encode(fs_join(download_folder, data['NAME'])) algorithm = self.methods.get(file_type, file_type) - checksum = computeChecksum(local_file, algorithm) + checksum = compute_checksum(local_file, algorithm) if checksum is data['HASH']: self.log_info(_('File integrity of "%s" verified by %s checksum (%s)') % (data['NAME'], algorithm, checksum)) diff --git a/module/plugins/hoster/MediafireCom.py b/module/plugins/hoster/MediafireCom.py index 3ba191160..5352e0261 100644 --- a/module/plugins/hoster/MediafireCom.py +++ b/module/plugins/hoster/MediafireCom.py @@ -11,7 +11,7 @@ class MediafireCom(SimpleHoster): __version__ = "0.90" __status__ = "testing" - __pattern__ = r'https?://(?:www\.)?mediafire\.com/(file/|view/\??|download(\.php\?|/)|\?)(?P<ID>\w{15})' + __pattern__ = r'https?://(?:www\.)?mediafire\.com/(file/|view/\??|download(\.php\?|/)|\?)(?P<ID>\w*)' __config__ = [("use_premium", "bool", "Use premium account if available", True)] __description__ = """Mediafire.com hoster plugin""" diff --git a/module/plugins/hoster/OneFichierCom.py b/module/plugins/hoster/OneFichierCom.py index c564dc677..04a00d572 100644 --- a/module/plugins/hoster/OneFichierCom.py +++ b/module/plugins/hoster/OneFichierCom.py @@ -8,7 +8,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class OneFichierCom(SimpleHoster): __name__ = "OneFichierCom" __type__ = "hoster" - __version__ = "0.86" + __version__ = "0.87" __status__ = "testing" __pattern__ = r'https?://(?:www\.)?(?:(?P<ID1>\w+)\.)?(?P<HOST>1fichier\.com|alterupload\.com|cjoint\.net|d(es)?fichiers\.com|dl4free\.com|megadl\.fr|mesfichiers\.org|piecejointe\.net|pjointe\.com|tenvoi\.com)(?:/\?(?P<ID2>\w+))?' @@ -28,7 +28,7 @@ class OneFichierCom(SimpleHoster): COOKIES = [("1fichier.com", "LG", "en")] - NAME_PATTERN = r'>FileName :</td>\s*<td.*>(?P<N>.+?)<' + NAME_PATTERN = r'>File\s*Name :</td>\s*<td.*>(?P<N>.+?)<' SIZE_PATTERN = r'>Size :</td>\s*<td.*>(?P<S>[\d.,]+) (?P<U>[\w^_]+)' OFFLINE_PATTERN = r'File not found !\s*<' diff --git a/module/plugins/hoster/UploadedTo.py b/module/plugins/hoster/UploadedTo.py index c90f2bb0f..890a1698a 100644 --- a/module/plugins/hoster/UploadedTo.py +++ b/module/plugins/hoster/UploadedTo.py @@ -12,7 +12,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class UploadedTo(SimpleHoster): __name__ = "UploadedTo" __type__ = "hoster" - __version__ = "0.96" + __version__ = "0.97" __status__ = "testing" __pattern__ = r'https?://(?:www\.)?(uploaded\.(to|net)|ul\.to)(/file/|/?\?id=|.*?&id=|/)(?P<ID>\w+)' @@ -31,6 +31,7 @@ class UploadedTo(SimpleHoster): OFFLINE_PATTERN = r'>Page not found' TEMP_OFFLINE_PATTERN = r'<title>uploaded\.net - Maintenance' + PREMIUM_ONLY_PATTERN = r'This file exceeds the max\. filesize which can be downloaded by free users\.' LINK_FREE_PATTERN = r"url:\s*'(.+?)'" LINK_PREMIUM_PATTERN = r'<div class="tfree".*\s*<form method="post" action="(.+?)"' @@ -77,6 +78,7 @@ class UploadedTo(SimpleHoster): self.html = self.load("http://uploaded.net/io/ticket/captcha/%s" % self.info['pattern']['ID'], post={'recaptcha_challenge_field': challenge, 'recaptcha_response_field' : response}) + self.check_errors() super(UploadedTo, self).handle_free(pyfile) self.check_errors() diff --git a/module/plugins/hoster/YoutubeCom.py b/module/plugins/hoster/YoutubeCom.py index 865eeef2e..86cca7cf1 100644 --- a/module/plugins/hoster/YoutubeCom.py +++ b/module/plugins/hoster/YoutubeCom.py @@ -33,7 +33,7 @@ def which(program): class YoutubeCom(Hoster): __name__ = "YoutubeCom" __type__ = "hoster" - __version__ = "0.44" + __version__ = "0.45" __status__ = "testing" __pattern__ = r'https?://(?:[^/]*\.)?(youtube\.com|youtu\.be)/watch\?(?:.*&)?v=.+' @@ -54,7 +54,7 @@ class YoutubeCom(Hoster): URL_REPLACEMENTS = [(r'youtu\.be/', 'youtube.com/')] #: Invalid characters that must be removed from the file name - invalidChars = u'\u2605:?><"|\\' + invalid_chars = u'\u2605:?><"|\\' #: name, width, height, quality ranking, 3D formats = {5 : (".flv" , 400 , 240 , 1 , False), diff --git a/module/plugins/internal/Hoster.py b/module/plugins/internal/Hoster.py index a0cdb1e2e..b397a92a6 100644 --- a/module/plugins/internal/Hoster.py +++ b/module/plugins/internal/Hoster.py @@ -3,6 +3,7 @@ from __future__ import with_statement import inspect +import mimetypes import os import random import time @@ -43,7 +44,7 @@ def create_getInfo(klass): class Hoster(Plugin): __name__ = "Hoster" __type__ = "hoster" - __version__ = "0.19" + __version__ = "0.20" __status__ = "testing" __pattern__ = r'^unmatchable$' diff --git a/module/plugins/internal/SimpleHoster.py b/module/plugins/internal/SimpleHoster.py index 9c310ca27..d50cbdf9b 100644 --- a/module/plugins/internal/SimpleHoster.py +++ b/module/plugins/internal/SimpleHoster.py @@ -2,7 +2,6 @@ from __future__ import with_statement -import mimetypes import os import re import time |