From adc9ab75ce58712afecf92c87f985fa00e783337 Mon Sep 17 00:00:00 2001 From: saintego Date: Thu, 26 Mar 2015 21:50:54 +0100 Subject: rghost issue #1289 add rghost.ru and fix link_free_patern --- module/plugins/hoster/RgHostNet.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins') diff --git a/module/plugins/hoster/RgHostNet.py b/module/plugins/hoster/RgHostNet.py index 9a8a340ec..9f08cf740 100644 --- a/module/plugins/hoster/RgHostNet.py +++ b/module/plugins/hoster/RgHostNet.py @@ -10,7 +10,7 @@ class RgHostNet(SimpleHoster): __type__ = "hoster" __version__ = "0.03" - __pattern__ = r'http://(?:www\.)?rghost\.net/\d+(?:r=\d+)?' + __pattern__ = r'http://(?:www\.)?rghost\.(?:net|ru)/\d+(?:r=\d+)?' __config__ = [("use_premium", "bool", "Use premium account if available", True)] __description__ = """RgHost.net hoster plugin""" @@ -21,7 +21,7 @@ class RgHostNet(SimpleHoster): INFO_PATTERN = r'

\s+(]+>)?(?P[^<]+)()?\s+]+>\s+\((?P[^)]+)\)\s+\s+

' OFFLINE_PATTERN = r'File is deleted|this page is not found' - LINK_FREE_PATTERN = r']+>Download' + LINK_FREE_PATTERN = r']+>Download' getInfo = create_getInfo(RgHostNet) -- cgit v1.2.3 From bc1af83376498c87ea8141a2e61c9d0ecb9dd5b5 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Thu, 26 Mar 2015 11:16:59 +0100 Subject: Tiny code cosmetics --- module/plugins/crypter/LinkdecrypterCom.py | 2 +- module/plugins/crypter/SexuriaCom.py | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'module/plugins') diff --git a/module/plugins/crypter/LinkdecrypterCom.py b/module/plugins/crypter/LinkdecrypterCom.py index 01db87011..c2e3ed91d 100644 --- a/module/plugins/crypter/LinkdecrypterCom.py +++ b/module/plugins/crypter/LinkdecrypterCom.py @@ -37,7 +37,7 @@ class LinkdecrypterCom(Crypter): self.html = self.load('http://linkdecrypter.com/', post=post_dict, decode=True) while retries: - m = re.search(self.TEXTAREA_PATTERN, self.html, flags=re.S) + m = re.search(self.TEXTAREA_PATTERN, self.html, re.S) if m: self.urls = [x for x in m.group(1).splitlines() if '[LINK-ERROR]' not in x] diff --git a/module/plugins/crypter/SexuriaCom.py b/module/plugins/crypter/SexuriaCom.py index fc69a693f..06dcf547e 100644 --- a/module/plugins/crypter/SexuriaCom.py +++ b/module/plugins/crypter/SexuriaCom.py @@ -19,13 +19,13 @@ class SexuriaCom(Crypter): __authors__ = [("NETHead", "NETHead.AT.gmx.DOT.net")] - PATTERN_SUPPORTED_MAIN = re.compile(r'http://(www\.)?sexuria\.com/(v1/)?Pornos_Kostenlos_.+?_(\d+)\.html', flags=re.I) - PATTERN_SUPPORTED_CRYPT = re.compile(r'http://(www\.)?sexuria\.com/(v1/)?dl_links_\d+_(?P\d+)\.html', flags=re.I) - PATTERN_SUPPORTED_REDIRECT = re.compile(r'http://(www\.)?sexuria\.com/out\.php\?id=(?P\d+)\&part=\d+\&link=\d+', flags=re.I) - PATTERN_TITLE = re.compile(r' - (?P<TITLE>.*) Sexuria - Kostenlose Pornos - Rapidshare XXX Porn', flags=re.I) - PATTERN_PASSWORD = re.compile(r'Passwort: .*?bgcolor="#EFEFEF">(?P.*?)', flags=re.I | re.S) - PATTERN_DL_LINK_PAGE = re.compile(r'"(dl_links_\d+_\d+\.html)"', flags=re.I) - PATTERN_REDIRECT_LINKS = re.compile(r'value="(http://sexuria\.com/out\.php\?id=\d+\&part=\d+\&link=\d+)" readonly', flags=re.I) + PATTERN_SUPPORTED_MAIN = re.compile(r'http://(www\.)?sexuria\.com/(v1/)?Pornos_Kostenlos_.+?_(\d+)\.html', re.I) + PATTERN_SUPPORTED_CRYPT = re.compile(r'http://(www\.)?sexuria\.com/(v1/)?dl_links_\d+_(?P\d+)\.html', re.I) + PATTERN_SUPPORTED_REDIRECT = re.compile(r'http://(www\.)?sexuria\.com/out\.php\?id=(?P\d+)\&part=\d+\&link=\d+', re.I) + PATTERN_TITLE = re.compile(r' - (?P<TITLE>.*) Sexuria - Kostenlose Pornos - Rapidshare XXX Porn', re.I) + PATTERN_PASSWORD = re.compile(r'Passwort: .*?bgcolor="#EFEFEF">(?P.*?)', re.I | re.S) + PATTERN_DL_LINK_PAGE = re.compile(r'"(dl_links_\d+_\d+\.html)"', re.I) + PATTERN_REDIRECT_LINKS = re.compile(r'value="(http://sexuria\.com/out\.php\?id=\d+\&part=\d+\&link=\d+)" readonly', re.I) def decrypt(self, pyfile): -- cgit v1.2.3 From 075311e5dd1ba263d3860752a339d88eb596bc4e Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Thu, 26 Mar 2015 22:17:51 +0100 Subject: [RgHostNet] Update --- module/plugins/hoster/RgHostNet.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'module/plugins') diff --git a/module/plugins/hoster/RgHostNet.py b/module/plugins/hoster/RgHostNet.py index 9f08cf740..1a45def44 100644 --- a/module/plugins/hoster/RgHostNet.py +++ b/module/plugins/hoster/RgHostNet.py @@ -8,9 +8,9 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class RgHostNet(SimpleHoster): __name__ = "RgHostNet" __type__ = "hoster" - __version__ = "0.03" + __version__ = "0.04" - __pattern__ = r'http://(?:www\.)?rghost\.(?:net|ru)/\d+(?:r=\d+)?' + __pattern__ = r'http://(?:www\.)?rghost\.(net|ru)/[\d-]+' __config__ = [("use_premium", "bool", "Use premium account if available", True)] __description__ = """RgHost.net hoster plugin""" @@ -18,10 +18,11 @@ class RgHostNet(SimpleHoster): __authors__ = [("z00nx", "z00nx0@gmail.com")] - INFO_PATTERN = r'

\s+(]+>)?(?P[^<]+)()?\s+]+>\s+\((?P[^)]+)\)\s+\s+

' - OFFLINE_PATTERN = r'File is deleted|this page is not found' + INFO_PATTERN = r'data-share42-text="(?P.+?) \((?P[\d.,]+) (?P[\w^_]+)' + HASHSUM_PATTERN = r'
(?P\w+)
\s*
(?P\w+)' + OFFLINE_PATTERN = r'>(File is deleted|page not found)' - LINK_FREE_PATTERN = r']+>Download' + LINK_FREE_PATTERN = r'\d+)' + __pattern__ = r'http://(?:www|files\.)?(?:ifolder\.ru|metalarea\.org|rusfolder\.(?:com|net|ru))/(?:files/)?(?P\d+)' __config__ = [("use_premium", "bool", "Use premium account if available", True)] __description__ = """Ifolder.ru hoster plugin""" @@ -24,11 +24,11 @@ class IfolderRu(SimpleHoster): SIZE_PATTERN = ur'(?:
)?Размер:(?:)? (?P[^<]+)<(?:/div|br)>' OFFLINE_PATTERN = ur'

Файл номер [^<]* (не найден|удален) !!!

' - SESSION_ID_PATTERN = r'
]+)>' + SESSION_ID_PATTERN = r'неверный код,
введите еще раз
' @@ -39,26 +39,15 @@ class IfolderRu(SimpleHoster): def handleFree(self, pyfile): + url = "http://rusfolder.com/%s" % self.info['pattern']['ID'] self.html = self.load("http://rusfolder.com/%s" % self.info['pattern']['ID'], decode=True) self.getFileInfo() - url = re.search(r"location\.href = '(http://ints\..*?=)'", self.html).group(1) - self.html = self.load(url, decode=True) - - url, session_id = re.search(self.SESSION_ID_PATTERN, self.html).groups() - self.html = self.load(url, decode=True) - - url = "http://ints.rusfolder.com/ints/frame/?session=%s" % session_id - self.html = self.load(url) - - self.wait(31, False) + session_id = re.search(self.SESSION_ID_PATTERN, self.html).groups() captcha_url = "http://ints.rusfolder.com/random/images/?session=%s" % session_id for _i in xrange(5): - self.html = self.load(url) - action, inputs = self.parseHtmlForm('ID="Form1"') - inputs['ints_session'] = re.search(self.INTS_SESSION_PATTERN, self.html).group(1) - inputs[re.search(self.HIDDEN_INPUT_PATTERN, self.html).group(1)] = '1' + action, inputs = self.parseHtmlForm('id="download-step-one-form"') inputs['confirmed_number'] = self.decryptCaptcha(captcha_url, cookies=True) inputs['action'] = '1' self.logDebug(inputs) @@ -71,7 +60,8 @@ class IfolderRu(SimpleHoster): else: self.fail(_("Invalid captcha")) - self.link = re.search(self.LINK_PATTERN, self.html).group(1) + self.link = re.search(self.LINK_FREE_PATTERN, self.html).group(1) getInfo = create_getInfo(IfolderRu) + -- cgit v1.2.3 From 43c335536e8703103850b367ac3dcfbe7da650a9 Mon Sep 17 00:00:00 2001 From: ludoviclehmann Date: Fri, 27 Mar 2015 16:14:30 +0100 Subject: Fix issue #1042 https://github.com/pyload/pyload/issues/1042 --- module/plugins/hoster/OneFichierCom.py | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'module/plugins') diff --git a/module/plugins/hoster/OneFichierCom.py b/module/plugins/hoster/OneFichierCom.py index 2586fb622..0a49084cf 100644 --- a/module/plugins/hoster/OneFichierCom.py +++ b/module/plugins/hoster/OneFichierCom.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- import re +import urllib2 from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo @@ -8,7 +9,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class OneFichierCom(SimpleHoster): __name__ = "OneFichierCom" __type__ = "hoster" - __version__ = "0.79" + __version__ = "0.80" __pattern__ = r'https?://(?:www\.)?(?:(?P\w+)\.)?(?P1fichier\.com|alterupload\.com|cjoint\.net|d(es)?fichiers\.com|dl4free\.com|megadl\.fr|mesfichiers\.org|piecejointe\.net|pjointe\.com|tenvoi\.com)(?:/\?(?P\w+))?' __config__ = [("use_premium", "bool", "Use premium account if available", True)] @@ -54,6 +55,21 @@ class OneFichierCom(SimpleHoster): self.download(url, post=inputs) + def handleDirect(self, pyfile): + link = self.directLink(pyfile.url, self.resumeDownload) + + if link: + self.logInfo(_("Direct download link detected")) + remote = urllib2.urlopen(link) + name = remote.info()['Content-Disposition'].split(';') + filename = name[1].split('filename=')[1] + filename = filename[1:-1] + self.logDebug("filename=" + filename) + pyfile.name = filename + self.link = link + else: + self.logDebug("Direct download link not found") + def handlePremium(self, pyfile): self.download(pyfile.url, post={'dl': "Download", 'did': 0}) -- cgit v1.2.3 From e60aecc0973c21a22807b3eb16023e64efcbb503 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 28 Mar 2015 00:45:36 +0100 Subject: [MultiHook] Periodically loadAccount --- module/plugins/internal/MultiHook.py | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'module/plugins') diff --git a/module/plugins/internal/MultiHook.py b/module/plugins/internal/MultiHook.py index 5855f7ece..291063268 100644 --- a/module/plugins/internal/MultiHook.py +++ b/module/plugins/internal/MultiHook.py @@ -10,7 +10,7 @@ from module.utils import decode, remove_chars class MultiHook(Hook): __name__ = "MultiHook" __type__ = "hook" - __version__ = "0.40" + __version__ = "0.41" __config__ = [("pluginmode" , "all;listed;unlisted", "Use for plugins" , "all"), ("pluginlist" , "str" , "Plugin list (comma separated)", "" ), @@ -66,10 +66,10 @@ class MultiHook(Hook): self.pluginname = None self.plugintype = None - self._initPlugin() + self.initPlugin() - def _initPlugin(self): + def initPlugin(self): plugin, type = self.core.pluginManager.findPlugin(self.__name__) if not plugin: @@ -82,7 +82,7 @@ class MultiHook(Hook): self.pluginclass = getattr(self.pluginmodule, self.__name__) - def _loadAccount(self): + def loadAccount(self): self.account = self.core.accountManager.getAccountPlugin(self.pluginname) if self.account and not self.account.canUse(): @@ -93,10 +93,6 @@ class MultiHook(Hook): self.setConfig('activated', False) - def coreReady(self): - self._loadAccount() - - def getURL(self, *args, **kwargs): #@TODO: Remove in 0.4.10 """ see HTTPRequest for argument list """ h = pyreq.getHTTPRequest(timeout=120) @@ -199,6 +195,8 @@ class MultiHook(Hook): def periodical(self): """reload plugin list periodically""" + self.loadAccount() + if self.getConfig("reload", True): self.interval = max(self.getConfig("reloadinterval", 12) * 60 * 60, self.MIN_RELOAD_INTERVAL) else: -- cgit v1.2.3 From ba93d07b55a937553d9913813eff6af398bb2f45 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 28 Mar 2015 01:55:37 +0100 Subject: [UlozTo] Update hoster --- module/plugins/hoster/UlozTo.py | 96 +++++++++++++++++++++-------------------- 1 file changed, 49 insertions(+), 47 deletions(-) (limited to 'module/plugins') diff --git a/module/plugins/hoster/UlozTo.py b/module/plugins/hoster/UlozTo.py index 89596512e..3a6e69c45 100644 --- a/module/plugins/hoster/UlozTo.py +++ b/module/plugins/hoster/UlozTo.py @@ -15,7 +15,7 @@ def convertDecimalPrefix(m): class UlozTo(SimpleHoster): __name__ = "UlozTo" __type__ = "hoster" - __version__ = "1.04" + __version__ = "1.05" __pattern__ = r'http://(?:www\.)?(uloz\.to|ulozto\.(cz|sk|net)|bagruj\.cz|zachowajto\.pl)/(?:live/)?(?P\w+/[^/?]*)' __config__ = [("use_premium", "bool", "Use premium account if available", True)] @@ -33,9 +33,12 @@ class UlozTo(SimpleHoster): URL_REPLACEMENTS = [(r"(?<=http://)([^/]+)", "www.ulozto.net")] SIZE_REPLACEMENTS = [('([\d.]+)\s([kMG])B', convertDecimalPrefix)] - ADULT_PATTERN = r'
' + CHECK_TRAFFIC = True + DISPOSITION = False #: Remove in 0.4.10 + + ADULT_PATTERN = r'' PASSWD_PATTERN = r'
' - VIPLINK_PATTERN = r'' + VIPLINK_PATTERN = r'' TOKEN_PATTERN = r' Date: Sat, 28 Mar 2015 01:59:01 +0100 Subject: Spare code cosmetics --- module/plugins/accounts/FilerNet.py | 2 +- module/plugins/accounts/FshareVn.py | 4 ++-- module/plugins/accounts/MegaRapidoNet.py | 14 +++++++------- module/plugins/accounts/MultishareCz.py | 2 +- module/plugins/accounts/UlozTo.py | 2 +- module/plugins/captcha/LinksaveIn.py | 2 +- module/plugins/crypter/CrockoComFolder.py | 2 +- module/plugins/crypter/CzshareComFolder.py | 2 +- module/plugins/crypter/DepositfilesComFolder.py | 2 +- module/plugins/crypter/EmbeduploadCom.py | 2 +- module/plugins/crypter/FileserveComFolder.py | 2 +- module/plugins/crypter/FourChanOrg.py | 2 +- module/plugins/crypter/FreakhareComFolder.py | 2 +- module/plugins/crypter/FshareVnFolder.py | 2 +- module/plugins/crypter/LetitbitNetFolder.py | 2 +- module/plugins/crypter/LinkCryptWs.py | 6 +++--- module/plugins/crypter/MegaRapidCzFolder.py | 2 +- module/plugins/crypter/MultiloadCz.py | 4 ++-- module/plugins/crypter/NCryptIn.py | 4 ++-- module/plugins/crypter/PastebinCom.py | 2 +- module/plugins/crypter/QuickshareCzFolder.py | 2 +- module/plugins/crypter/UlozToFolder.py | 4 ++-- module/plugins/hooks/DeleteFinished.py | 5 ++--- module/plugins/hooks/ExtractArchive.py | 2 +- module/plugins/hooks/MultishareCz.py | 2 +- module/plugins/hoster/CrockoCom.py | 12 ++++++------ module/plugins/hoster/CzshareCom.py | 6 +++--- module/plugins/hoster/DataHu.py | 2 +- module/plugins/hoster/DepositfilesCom.py | 2 +- module/plugins/hoster/DlFreeFr.py | 4 ++-- module/plugins/hoster/EdiskCz.py | 2 +- module/plugins/hoster/ExtabitCom.py | 2 +- module/plugins/hoster/FilejungleCom.py | 2 +- module/plugins/hoster/FilepostCom.py | 2 +- module/plugins/hoster/FileserveCom.py | 2 +- module/plugins/hoster/HugefilesNet.py | 2 +- module/plugins/hoster/IfolderRu.py | 10 +++++----- module/plugins/hoster/Keep2ShareCc.py | 4 ++-- module/plugins/hoster/MegaRapidCz.py | 4 ++-- module/plugins/hoster/MegaRapidoNet.py | 8 ++++---- module/plugins/hoster/MegasharesCom.py | 8 ++++---- module/plugins/hoster/MovReelCom.py | 2 +- module/plugins/hoster/NovafileCom.py | 4 ++-- module/plugins/hoster/NowDownloadSx.py | 2 +- module/plugins/hoster/OneFichierCom.py | 25 ++++++++++--------------- module/plugins/hoster/PornhubCom.py | 2 +- module/plugins/hoster/PromptfileCom.py | 6 +++--- module/plugins/hoster/QuickshareCz.py | 2 +- module/plugins/hoster/RapidgatorNet.py | 2 +- module/plugins/hoster/SendspaceCom.py | 6 +++--- module/plugins/hoster/StreamCz.py | 4 ++-- module/plugins/hoster/UloziskoSk.py | 8 ++++---- module/plugins/hoster/UnibytesCom.py | 4 ++-- module/plugins/hoster/UploadedTo.py | 2 +- module/plugins/hoster/UpstoreNet.py | 2 +- module/plugins/hoster/VeehdCom.py | 4 ++-- module/plugins/internal/CaptchaService.py | 6 +++--- 57 files changed, 112 insertions(+), 118 deletions(-) (limited to 'module/plugins') diff --git a/module/plugins/accounts/FilerNet.py b/module/plugins/accounts/FilerNet.py index 4067445af..ac5fd11da 100644 --- a/module/plugins/accounts/FilerNet.py +++ b/module/plugins/accounts/FilerNet.py @@ -16,7 +16,7 @@ class FilerNet(Account): __authors__ = [("stickell", "l.stickell@yahoo.it")] - TOKEN_PATTERN = r'_csrf_token" value="([^"]+)" />' + TOKEN_PATTERN = r'_csrf_token" value="(.+?)" />' WALID_UNTIL_PATTERN = r'Der Premium-Zugang ist gültig bis (.+)\.\s*' TRAFFIC_PATTERN = r'Traffic\s*([^<]+)' FREE_PATTERN = r'Account Status\s*\s*Free' diff --git a/module/plugins/accounts/FshareVn.py b/module/plugins/accounts/FshareVn.py index 0c76e2824..7fcf88f20 100644 --- a/module/plugins/accounts/FshareVn.py +++ b/module/plugins/accounts/FshareVn.py @@ -18,8 +18,8 @@ class FshareVn(Account): VALID_UNTIL_PATTERN = ur'
Thời hạn dùng:
\s*
([^<]+)
' - LIFETIME_PATTERN = ur'
Lần đăng nhập trước:
\s*
[^<]+
' - TRAFFIC_LEFT_PATTERN = ur'
Tổng Dung Lượng Tài Khoản
\s*]*>([\d.]+) ([kKMG])B
' + LIFETIME_PATTERN = ur'
Lần đăng nhập trước:
\s*
.+?
' + TRAFFIC_LEFT_PATTERN = ur'
Tổng Dung Lượng Tài Khoản
\s*([\d.]+) ([kKMG])B' DIRECT_DOWNLOAD_PATTERN = ur']*)[^>]*/>Kích hoạt download trực tiếp' diff --git a/module/plugins/accounts/MegaRapidoNet.py b/module/plugins/accounts/MegaRapidoNet.py index 80e066244..d061d02bc 100644 --- a/module/plugins/accounts/MegaRapidoNet.py +++ b/module/plugins/accounts/MegaRapidoNet.py @@ -16,8 +16,8 @@ class MegaRapidoNet(Account): __authors__ = [("Kagenoshin", "kagenoshin@gmx.ch")] - VALID_UNTIL_PATTERN = r'<\s*?div[^>]*?class\s*?=\s*?[\'"]premium_index[\'"][^>]*>[^<]*?<[^>]*?b[^>]*>\s*?TEMPO\s*?PREMIUM[^<]*<[^>]*?/b[^>]*>\s*?(\d*)[^\d]*?DIAS[^\d]*?(\d*)[^\d]*?HORAS[^\d]*?(\d*)[^\d]*?MINUTOS[^\d]*?(\d*)[^\d]*?SEGUNDOS' - USER_ID_PATTERN = r'<\s*?div[^>]*?class\s*?=\s*?["\']checkbox_compartilhar["\'][^>]*>[^<]*<\s*?input[^>]*?name\s*?=\s*?["\']usar["\'][^>]*>[^<]*<\s*?input[^>]*?name\s*?=\s*?["\']user["\'][^>]*?value\s*?=\s*?["\'](.*?)\s*?["\']' + VALID_UNTIL_PATTERN = r'<\s*?div[^>]*?class\s*?=\s*?[\'"]premium_index[\'"].*?>[^<]*?<[^>]*?b.*?>\s*?TEMPO\s*?PREMIUM.*?<[^>]*?/b.*?>\s*?(\d*)[^\d]*?DIAS[^\d]*?(\d*)[^\d]*?HORAS[^\d]*?(\d*)[^\d]*?MINUTOS[^\d]*?(\d*)[^\d]*?SEGUNDOS' + USER_ID_PATTERN = r'<\s*?div[^>]*?class\s*?=\s*?["\']checkbox_compartilhar["\'].*?>.*?<\s*?input[^>]*?name\s*?=\s*?["\']usar["\'].*?>.*?<\s*?input[^>]*?name\s*?=\s*?["\']user["\'][^>]*?value\s*?=\s*?["\'](.*?)\s*?["\']' def loadAccountInfo(self, user, req): @@ -50,8 +50,8 @@ class MegaRapidoNet(Account): if "sair" not in html.lower(): self.wrongPassword() else: - m = re.search(self.USER_ID_PATTERN, html) - if m: - data['uid'] = m.group(1) - else: - self.fail("Couldn't find the user ID") + m = re.search(self.USER_ID_PATTERN, html) + if m: + data['uid'] = m.group(1) + else: + self.fail("Couldn't find the user ID") diff --git a/module/plugins/accounts/MultishareCz.py b/module/plugins/accounts/MultishareCz.py index 0ac764ee1..3488e3288 100644 --- a/module/plugins/accounts/MultishareCz.py +++ b/module/plugins/accounts/MultishareCz.py @@ -16,7 +16,7 @@ class MultishareCz(Account): TRAFFIC_LEFT_PATTERN = r'Kredit:\s*(?P[\d.,]+) (?P[\w^_]+)' - ACCOUNT_INFO_PATTERN = r'' + ACCOUNT_INFO_PATTERN = r'' def loadAccountInfo(self, user, req): diff --git a/module/plugins/accounts/UlozTo.py b/module/plugins/accounts/UlozTo.py index 7236a4fa8..6ddb34385 100644 --- a/module/plugins/accounts/UlozTo.py +++ b/module/plugins/accounts/UlozTo.py @@ -18,7 +18,7 @@ class UlozTo(Account): ("pulpe", None)] - TRAFFIC_LEFT_PATTERN = r'
  • ' + LINK_PATTERN = r'
  • ' getInfo = create_getInfo(FshareVnFolder) diff --git a/module/plugins/crypter/LetitbitNetFolder.py b/module/plugins/crypter/LetitbitNetFolder.py index f5cc5fa78..b60d754a7 100644 --- a/module/plugins/crypter/LetitbitNetFolder.py +++ b/module/plugins/crypter/LetitbitNetFolder.py @@ -20,7 +20,7 @@ class LetitbitNetFolder(Crypter): FOLDER_PATTERN = r'(.*)
    ' - LINK_PATTERN = r'
    ' + LINK_PATTERN = r'' def decrypt(self, pyfile): diff --git a/module/plugins/crypter/LinkCryptWs.py b/module/plugins/crypter/LinkCryptWs.py index 018ed90ba..d3e75aad4 100644 --- a/module/plugins/crypter/LinkCryptWs.py +++ b/module/plugins/crypter/LinkCryptWs.py @@ -131,7 +131,7 @@ class LinkCryptWs(Crypter): def unlockCaptchaProtection(self): - captcha_url = re.search(r']*?>.*?<\s*?input.*?src="([^"]*?)"', self.html, re.I | re.S).group(1) + captcha_url = re.search(r']*?>.*?<\s*?input.*?src="(.+?)"', self.html, re.I | re.S).group(1) captcha_code = self.decryptCaptcha(captcha_url, forceUser=True, imgtype="gif", result_type='positional') self.html = self.load(self.pyfile.url, post={"x": captcha_code[0], "y": captcha_code[1]}) @@ -190,7 +190,7 @@ class LinkCryptWs(Crypter): self.logDebug("Search for Web links ") package_links = [] - pattern = r']*?>.*?]*?value="([^"]*?)"[^>]*?name="file"' + pattern = r']*?>.*?]*?value="(.+?)"[^>]*?name="file"' ids = re.findall(pattern, self.html, re.I | re.S) self.logDebug("Decrypting %d Web links" % len(ids)) @@ -244,7 +244,7 @@ class LinkCryptWs(Crypter): for line in self.container_html: if type in line: jseval = self.handle_javascript(line) - clink = re.search(r'href=["\']([^"\']*?)["\']',jseval,re.I) + clink = re.search(r'href=["\'](["\']+)', jseval, re.I) if not clink: continue diff --git a/module/plugins/crypter/MegaRapidCzFolder.py b/module/plugins/crypter/MegaRapidCzFolder.py index 63d41982d..fadd6dbed 100644 --- a/module/plugins/crypter/MegaRapidCzFolder.py +++ b/module/plugins/crypter/MegaRapidCzFolder.py @@ -18,7 +18,7 @@ class MegaRapidCzFolder(SimpleCrypter): __authors__ = [("zoidberg", "zoidberg@mujmail.cz")] - LINK_PATTERN = r']*>' + LINK_PATTERN = r'' getInfo = create_getInfo(MegaRapidCzFolder) diff --git a/module/plugins/crypter/MultiloadCz.py b/module/plugins/crypter/MultiloadCz.py index 2abb627c3..eea689a09 100644 --- a/module/plugins/crypter/MultiloadCz.py +++ b/module/plugins/crypter/MultiloadCz.py @@ -20,8 +20,8 @@ class MultiloadCz(Crypter): __authors__ = [("zoidberg", "zoidberg@mujmail.cz")] - FOLDER_PATTERN = r']*>([^>]*)' - LINK_PATTERN = r'

    ([^<]+)

    ' + FOLDER_PATTERN = r'

    ([^>]*)' + LINK_PATTERN = r'

    ([^<]+)

    ' def decrypt(self, pyfile): diff --git a/module/plugins/crypter/NCryptIn.py b/module/plugins/crypter/NCryptIn.py index 8e69a9323..7de2c0df7 100644 --- a/module/plugins/crypter/NCryptIn.py +++ b/module/plugins/crypter/NCryptIn.py @@ -27,7 +27,7 @@ class NCryptIn(Crypter): JK_KEY = "jk" CRYPTED_KEY = "crypted" - NAME_PATTERN = r'(https?://[^ <]+)(?:[^<]*)' - NAME_PATTERN = r'

    ' + NAME_PATTERN = r'
    ' getInfo = create_getInfo(PastebinCom) diff --git a/module/plugins/crypter/QuickshareCzFolder.py b/module/plugins/crypter/QuickshareCzFolder.py index 0ccba2a5e..3e38d36b4 100644 --- a/module/plugins/crypter/QuickshareCzFolder.py +++ b/module/plugins/crypter/QuickshareCzFolder.py @@ -18,7 +18,7 @@ class QuickshareCzFolder(Crypter): __authors__ = [("zoidberg", "zoidberg@mujmail.cz")] - FOLDER_PATTERN = r']*>(.*?)' + FOLDER_PATTERN = r'(.*?)' LINK_PATTERN = r'(http://www\.quickshare\.cz/\S+)' diff --git a/module/plugins/crypter/UlozToFolder.py b/module/plugins/crypter/UlozToFolder.py index a9a6117c0..3f2a60cf7 100644 --- a/module/plugins/crypter/UlozToFolder.py +++ b/module/plugins/crypter/UlozToFolder.py @@ -19,8 +19,8 @@ class UlozToFolder(Crypter): FOLDER_PATTERN = r'
      (.*?)
    ' - LINK_PATTERN = r'
    [^<]+' - NEXT_PAGE_PATTERN = r'' + LINK_PATTERN = r'
    .+?' + NEXT_PAGE_PATTERN = r'' def decrypt(self, pyfile): diff --git a/module/plugins/hooks/DeleteFinished.py b/module/plugins/hooks/DeleteFinished.py index 75cb33e96..bde4ca259 100644 --- a/module/plugins/hooks/DeleteFinished.py +++ b/module/plugins/hooks/DeleteFinished.py @@ -9,9 +9,8 @@ class DeleteFinished(Hook): __type__ = "hook" __version__ = "1.12" - __config__ = [("activated" , "bool", "Activated" , "False"), - ("interval" , "int" , "Delete every (hours)" , "72" ), - ("deloffline", "bool", "Delete packages with offline links", "False")] + __config__ = [("interval" , "int" , "Check interval in hours" , 72 ), + ("deloffline", "bool", "Delete package with offline links", False)] __description__ = """Automatically delete all finished packages from queue""" __license__ = "GPLv3" diff --git a/module/plugins/hooks/ExtractArchive.py b/module/plugins/hooks/ExtractArchive.py index c5f842fdd..8c40667c2 100644 --- a/module/plugins/hooks/ExtractArchive.py +++ b/module/plugins/hooks/ExtractArchive.py @@ -175,7 +175,7 @@ class ExtractArchive(Hook): print_exc() if self.extractors: - self.logInfo(_("Activated") + " " + "|".join("%s %s" % (Extractor.__name__,Extractor.VERSION) for Extractor in self.extractors)) + self.logInfo(_("Activated") + " " + "|".join("%s %s" % (Extractor.__name__, Extractor.VERSION) for Extractor in self.extractors)) self.extractQueued() #: Resume unfinished extractions else: self.logInfo(_("No Extract plugins activated")) diff --git a/module/plugins/hooks/MultishareCz.py b/module/plugins/hooks/MultishareCz.py index e696d3fef..6ead88c34 100644 --- a/module/plugins/hooks/MultishareCz.py +++ b/module/plugins/hooks/MultishareCz.py @@ -21,7 +21,7 @@ class MultishareCz(MultiHook): __authors__ = [("zoidberg", "zoidberg@mujmail.cz")] - HOSTER_PATTERN = r']*?alt="([^"]+)">\s*[^>]*?alt="OK"' + HOSTER_PATTERN = r']*?alt="(.+?)">\s*[^>]*?alt="OK"' def getHosters(self): diff --git a/module/plugins/hoster/CrockoCom.py b/module/plugins/hoster/CrockoCom.py index 6a9715465..1d7468520 100644 --- a/module/plugins/hoster/CrockoCom.py +++ b/module/plugins/hoster/CrockoCom.py @@ -19,16 +19,16 @@ class CrockoCom(SimpleHoster): __authors__ = [("zoidberg", "zoidberg@mujmail.cz")] - NAME_PATTERN = r'Download:\s*(?P.*)' - SIZE_PATTERN = r'(?P[^<]+)' + NAME_PATTERN = r'Download:\s*(?P.*)' + SIZE_PATTERN = r'(?P[^<]+)' OFFLINE_PATTERN = r'

    Sorry,
    the page you\'re looking for
    isn\'t here.

    |File not found' - CAPTCHA_PATTERN = re.compile(r"u='(/file_contents/captcha/\w+)';\s*w='(\d+)';") + CAPTCHA_PATTERN = r"u='(/file_contents/captcha/\w+)';\s*w='(\d+)';" - FORM_PATTERN = r'
    (.*?)
    ' - FORM_INPUT_PATTERN = r']* name="?([^" ]+)"? value="?([^" ]+)"?[^>]*>' + FORM_PATTERN = r'
    (.*?)
    ' + FORM_INPUT_PATTERN = r']* name="?([^" ]+)"? value="?([^" ]+)"?.*?>' - NAME_REPLACEMENTS = [(r'<[^>]*>', '')] + NAME_REPLACEMENTS = [(r'<.*?>', '')] def handleFree(self, pyfile): diff --git a/module/plugins/hoster/CzshareCom.py b/module/plugins/hoster/CzshareCom.py index 6494ce0bd..8f72f2148 100644 --- a/module/plugins/hoster/CzshareCom.py +++ b/module/plugins/hoster/CzshareCom.py @@ -22,7 +22,7 @@ class CzshareCom(SimpleHoster): __authors__ = [("zoidberg", "zoidberg@mujmail.cz")] - NAME_PATTERN = r'
    \s*

    \s*Cel. n.zev: ]*>(?P[^<]+)' + NAME_PATTERN = r'

    \s*

    \s*Cel. n.zev: (?P[^<]+)' SIZE_PATTERN = r'

    (?:\s*

    [^\n]*

    )*\s*Velikost:\s*(?P[\d .,]+)(?P[\w^_]+)\s*
    ' OFFLINE_PATTERN = r'
    \s*

    ' @@ -31,10 +31,10 @@ class CzshareCom(SimpleHoster): CHECK_TRAFFIC = True - FREE_URL_PATTERN = r'[^>]*alt="([^"]+)" />' + FREE_URL_PATTERN = r'[^>]*alt="(.+?)" />' FREE_FORM_PATTERN = r'
    \s*(.*?)
    ' PREMIUM_FORM_PATTERN = r'
    (.*?)
    ' - FORM_INPUT_PATTERN = r']* name="([^"]+)" value="([^"]+)"[^>]*/>' + FORM_INPUT_PATTERN = r']* name="(.+?)" value="(.+?)"[^>]*/>' MULTIDL_PATTERN = r'

    Z[^<]*PROFI.

    ' USER_CREDIT_PATTERN = r'
    \s*kredit: ([\d .,]+)(\w+)\s*
    ' diff --git a/module/plugins/hoster/DataHu.py b/module/plugins/hoster/DataHu.py index 58e5b7e3e..955c94437 100644 --- a/module/plugins/hoster/DataHu.py +++ b/module/plugins/hoster/DataHu.py @@ -24,7 +24,7 @@ class DataHu(SimpleHoster): INFO_PATTERN = ur'(?P<N>.*) \((?P<S>[^)]+)\) let\xf6lt\xe9se' OFFLINE_PATTERN = ur'Az adott f\xe1jl nem l\xe9tezik' - LINK_FREE_PATTERN = r'

    ' + INFO_PATTERN = r'\s*.*?\((?P[\d.,]+) (?P[\w^_]+)\)' OFFLINE_PATTERN = r'

    This file does not exist due to one of the following: