From 93592862b520a862c01f80c019e5c4bc43746c19 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 5 Jul 2014 16:54:20 +0200 Subject: [SimpleHoster] Better inline docs + changed "FILE_OFFLINE_PATTERN" to "OFFLINE_PATTERN" --- module/plugins/hoster/LoadTo.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/hoster/LoadTo.py') diff --git a/module/plugins/hoster/LoadTo.py b/module/plugins/hoster/LoadTo.py index e52346274..5cad8b580 100644 --- a/module/plugins/hoster/LoadTo.py +++ b/module/plugins/hoster/LoadTo.py @@ -35,7 +35,7 @@ class LoadTo(SimpleHoster): FILE_INFO_PATTERN = r']+>(?P.+)\s*Size: (?P\d+) (?P[kKmMgG]?i?[bB])' URL_PATTERN = r'
Date: Wed, 9 Jul 2014 20:07:05 +0200 Subject: [LoadTo] Fixed 3 bugs --- module/plugins/hoster/LoadTo.py | 35 ++++++++++++++--------------------- 1 file changed, 14 insertions(+), 21 deletions(-) (limited to 'module/plugins/hoster/LoadTo.py') diff --git a/module/plugins/hoster/LoadTo.py b/module/plugins/hoster/LoadTo.py index 5cad8b580..5daf1b8e3 100644 --- a/module/plugins/hoster/LoadTo.py +++ b/module/plugins/hoster/LoadTo.py @@ -20,25 +20,25 @@ import re +from module.plugins.internal.CaptchaService import SolveMedia from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo -from module.plugins.internal.CaptchaService import ReCaptcha class LoadTo(SimpleHoster): __name__ = "LoadTo" __type__ = "hoster" __pattern__ = r'http://(?:www\.)?load\.to/\w+' - __version__ = "0.13" + __version__ = "0.14" __description__ = """Load.to hoster plugin""" __author_name__ = ("halfman", "stickell") __author_mail__ = ("Pulpan3@gmail.com", "l.stickell@yahoo.it") - FILE_INFO_PATTERN = r']+>(?P.+)\s*Size: (?P\d+) (?P[kKmMgG]?i?[bB])' + FILE_INFO_PATTERN = r'(?P<N>.+) \/\/ Load.to' + FILE_SIZE_PATTERN = r']+>(?P.+)\s*Size: (?P.*) (?P[kKmMgG]?i?[bB])' URL_PATTERN = r'404 Not Found")}) if check == "404": self.logWarning("The captcha you entered was incorrect. Please try again.") -- cgit v1.2.3 From 04038a2cf0c4c2d9cc9a0c8e8bf9beb6426afae8 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Thu, 10 Jul 2014 03:02:26 +0200 Subject: Use parseError instead PluginParseError + unified all download pattern attributes as LINK_PATTERN + removed some old patterns (not used anymore) + other code cosmetics --- module/plugins/hoster/LoadTo.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'module/plugins/hoster/LoadTo.py') diff --git a/module/plugins/hoster/LoadTo.py b/module/plugins/hoster/LoadTo.py index 5daf1b8e3..b5f0e4109 100644 --- a/module/plugins/hoster/LoadTo.py +++ b/module/plugins/hoster/LoadTo.py @@ -35,11 +35,13 @@ class LoadTo(SimpleHoster): FILE_INFO_PATTERN = r'(?P<N>.+) \/\/ Load.to' FILE_SIZE_PATTERN = r']+>(?P.+)\s*Size: (?P.*) (?P[kKmMgG]?i?[bB])' - URL_PATTERN = r'404 Not Found")}) if check == "404": self.logWarning("The captcha you entered was incorrect. Please try again.") -- cgit v1.2.3 From d211a0748a235562aa5be1b2f86679146669abb8 Mon Sep 17 00:00:00 2001 From: stickell Date: Fri, 11 Jul 2014 11:29:57 +0200 Subject: [LoadTo] renamed pattern --- module/plugins/hoster/LoadTo.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/hoster/LoadTo.py') diff --git a/module/plugins/hoster/LoadTo.py b/module/plugins/hoster/LoadTo.py index b5f0e4109..6cf633636 100644 --- a/module/plugins/hoster/LoadTo.py +++ b/module/plugins/hoster/LoadTo.py @@ -28,12 +28,12 @@ class LoadTo(SimpleHoster): __name__ = "LoadTo" __type__ = "hoster" __pattern__ = r'http://(?:www\.)?load\.to/\w+' - __version__ = "0.14" + __version__ = "0.15" __description__ = """Load.to hoster plugin""" __author_name__ = ("halfman", "stickell") __author_mail__ = ("Pulpan3@gmail.com", "l.stickell@yahoo.it") - FILE_INFO_PATTERN = r'(?P<N>.+) \/\/ Load.to' + FILE_NAME_PATTERN = r'(?P<N>.+) \/\/ Load.to' FILE_SIZE_PATTERN = r']+>(?P.+)\s*Size: (?P.*) (?P[kKmMgG]?i?[bB])' OFFLINE_PATTERN = r'Can\'t find file\. Please check URL' -- cgit v1.2.3 From 05d258d98dd8c2faf0b769840fa1e3c4acccdce8 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 20 Jul 2014 03:25:14 +0200 Subject: Fix and improve 5060e4c6374a5116d0d8b02528f910f8c5f8bcf9 --- module/plugins/hoster/LoadTo.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/hoster/LoadTo.py') diff --git a/module/plugins/hoster/LoadTo.py b/module/plugins/hoster/LoadTo.py index 6cf633636..780e42ac2 100644 --- a/module/plugins/hoster/LoadTo.py +++ b/module/plugins/hoster/LoadTo.py @@ -56,7 +56,7 @@ class LoadTo(SimpleHoster): # Search for Download URL m = re.search(self.LINK_PATTERN, self.html) - if not m: + if m is None: self.parseError("Unable to detect download URL") download_url = m.group(1) @@ -68,7 +68,7 @@ class LoadTo(SimpleHoster): # Load.to is using solvemedia captchas since ~july 2014: found = re.search(self.SOLVEMEDIA_PATTERN, self.html) - if not found: + if found is None: self.download(download_url) else: captcha_key = found.group(1) -- cgit v1.2.3 From a9f81c043c62abcb3ce38971237693736833fdbe Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 20 Jul 2014 03:28:23 +0200 Subject: Fix hosters SH_COOKIES syntax --- module/plugins/hoster/LoadTo.py | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'module/plugins/hoster/LoadTo.py') diff --git a/module/plugins/hoster/LoadTo.py b/module/plugins/hoster/LoadTo.py index 780e42ac2..14c071cc4 100644 --- a/module/plugins/hoster/LoadTo.py +++ b/module/plugins/hoster/LoadTo.py @@ -26,9 +26,11 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class LoadTo(SimpleHoster): __name__ = "LoadTo" + __version__ = "0.15" __type__ = "hoster" + __pattern__ = r'http://(?:www\.)?load\.to/\w+' - __version__ = "0.15" + __description__ = """Load.to hoster plugin""" __author_name__ = ("halfman", "stickell") __author_mail__ = ("Pulpan3@gmail.com", "l.stickell@yahoo.it") @@ -46,14 +48,7 @@ class LoadTo(SimpleHoster): self.multiDL = True self.chunkLimit = 1 - def process(self, pyfile): - self.html = self.load(pyfile.url, decode=True) - self.getFileInfo() - - # Check if File is online - if re.search(self.OFFLINE_PATTERN, self.html): - self.offline() - + def handleFree(self): # Search for Download URL m = re.search(self.LINK_PATTERN, self.html) if m is None: -- cgit v1.2.3 From 9395182da7afed55a29bde1c7cbefe4204e783f0 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 20 Jul 2014 03:02:09 +0200 Subject: Store all re.search/match object as "m" instead "found" --- module/plugins/hoster/LoadTo.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'module/plugins/hoster/LoadTo.py') diff --git a/module/plugins/hoster/LoadTo.py b/module/plugins/hoster/LoadTo.py index 14c071cc4..af86cd026 100644 --- a/module/plugins/hoster/LoadTo.py +++ b/module/plugins/hoster/LoadTo.py @@ -62,11 +62,11 @@ class LoadTo(SimpleHoster): self.wait(m.group(1)) # Load.to is using solvemedia captchas since ~july 2014: - found = re.search(self.SOLVEMEDIA_PATTERN, self.html) - if found is None: + m = re.search(self.SOLVEMEDIA_PATTERN, self.html) + if m is None: self.download(download_url) else: - captcha_key = found.group(1) + captcha_key = m.group(1) solvemedia = SolveMedia(self) captcha_challenge, captcha_response = solvemedia.challenge(captcha_key) self.download(download_url, post={"adcopy_challenge": captcha_challenge, "adcopy_response": captcha_response}) -- cgit v1.2.3 From ba916633f2bedb04c7358000b91aed69f52e8e43 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 1 Aug 2014 19:35:59 +0200 Subject: Remove trailing whitespaces + remove license headers + import urllib methods directly + sort and fix key attributes + use save_join instead join + sort some import declarations + other minor code cosmetics --- module/plugins/hoster/LoadTo.py | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) (limited to 'module/plugins/hoster/LoadTo.py') diff --git a/module/plugins/hoster/LoadTo.py b/module/plugins/hoster/LoadTo.py index af86cd026..a35712124 100644 --- a/module/plugins/hoster/LoadTo.py +++ b/module/plugins/hoster/LoadTo.py @@ -1,20 +1,6 @@ # -*- 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 . # -############################################################################ - -# Test links (random.bin): +# +# Test links: # http://www.load.to/JWydcofUY6/random.bin # http://www.load.to/oeSmrfkXE/random100.bin @@ -26,8 +12,8 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class LoadTo(SimpleHoster): __name__ = "LoadTo" - __version__ = "0.15" __type__ = "hoster" + __version__ = "0.15" __pattern__ = r'http://(?:www\.)?load\.to/\w+' -- cgit v1.2.3 From fa2b46b967b2f77c30334c28c3b6b437c762bab6 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Thu, 4 Sep 2014 22:30:52 +0200 Subject: [LoadTo] Fix patterns --- module/plugins/hoster/LoadTo.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'module/plugins/hoster/LoadTo.py') diff --git a/module/plugins/hoster/LoadTo.py b/module/plugins/hoster/LoadTo.py index a35712124..18398e905 100644 --- a/module/plugins/hoster/LoadTo.py +++ b/module/plugins/hoster/LoadTo.py @@ -13,27 +13,30 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class LoadTo(SimpleHoster): __name__ = "LoadTo" __type__ = "hoster" - __version__ = "0.15" + __version__ = "0.16" __pattern__ = r'http://(?:www\.)?load\.to/\w+' - __description__ = """Load.to hoster plugin""" + __description__ = """ Load.to hoster plugin """ __author_name__ = ("halfman", "stickell") __author_mail__ = ("Pulpan3@gmail.com", "l.stickell@yahoo.it") - FILE_NAME_PATTERN = r'(?P<N>.+) \/\/ Load.to' - FILE_SIZE_PATTERN = r']+>(?P.+)\s*Size: (?P.*) (?P[kKmMgG]?i?[bB])' - OFFLINE_PATTERN = r'Can\'t find file\. Please check URL' + FILE_NAME_PATTERN = r'

(?P.+)

' + FILE_SIZE_PATTERN = r'Size: (?P[\d.]+) (?P\w+)' + OFFLINE_PATTERN = r'>Can\'t find file' LINK_PATTERN = r' Date: Fri, 3 Oct 2014 09:06:05 +0200 Subject: Update plugins after CaptchaService and XFileSharingPro changes --- module/plugins/hoster/LoadTo.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'module/plugins/hoster/LoadTo.py') diff --git a/module/plugins/hoster/LoadTo.py b/module/plugins/hoster/LoadTo.py index 18398e905..377509050 100644 --- a/module/plugins/hoster/LoadTo.py +++ b/module/plugins/hoster/LoadTo.py @@ -27,7 +27,6 @@ class LoadTo(SimpleHoster): LINK_PATTERN = r'404 Not Found")}) -- cgit v1.2.3 From b0868ae6446078bacf1635dde5e4ab316b4a94cb Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 7 Oct 2014 18:57:59 +0200 Subject: New __authors__ key replaces __author_name__ and __author_mail__ + Whitespaces and EOF fixup --- module/plugins/hoster/LoadTo.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'module/plugins/hoster/LoadTo.py') diff --git a/module/plugins/hoster/LoadTo.py b/module/plugins/hoster/LoadTo.py index 377509050..74b892c9a 100644 --- a/module/plugins/hoster/LoadTo.py +++ b/module/plugins/hoster/LoadTo.py @@ -18,8 +18,9 @@ class LoadTo(SimpleHoster): __pattern__ = r'http://(?:www\.)?load\.to/\w+' __description__ = """ Load.to hoster plugin """ - __author_name__ = ("halfman", "stickell") - __author_mail__ = ("Pulpan3@gmail.com", "l.stickell@yahoo.it") + __authors__ = [("halfman", "Pulpan3@gmail.com"), + ("stickell", "l.stickell@yahoo.it")] + FILE_NAME_PATTERN = r'

(?P.+)

' FILE_SIZE_PATTERN = r'Size: (?P[\d.]+) (?P\w+)' -- cgit v1.2.3 From ae7a7e66981456e5bbe2b54006d79b6f907be7a4 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Wed, 8 Oct 2014 20:18:13 +0200 Subject: Add __license__ key attribute to plugins --- module/plugins/hoster/LoadTo.py | 1 + 1 file changed, 1 insertion(+) (limited to 'module/plugins/hoster/LoadTo.py') diff --git a/module/plugins/hoster/LoadTo.py b/module/plugins/hoster/LoadTo.py index 74b892c9a..dfd18b6ef 100644 --- a/module/plugins/hoster/LoadTo.py +++ b/module/plugins/hoster/LoadTo.py @@ -18,6 +18,7 @@ class LoadTo(SimpleHoster): __pattern__ = r'http://(?:www\.)?load\.to/\w+' __description__ = """ Load.to hoster plugin """ + __license__ = "GPLv3" __authors__ = [("halfman", "Pulpan3@gmail.com"), ("stickell", "l.stickell@yahoo.it")] -- cgit v1.2.3 From c5d1a4fd8943877c6d2eb3843e0de725dba5191e Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 11 Oct 2014 15:09:53 +0200 Subject: Pattern update 2 --- module/plugins/hoster/LoadTo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hoster/LoadTo.py') diff --git a/module/plugins/hoster/LoadTo.py b/module/plugins/hoster/LoadTo.py index dfd18b6ef..03ec6e71b 100644 --- a/module/plugins/hoster/LoadTo.py +++ b/module/plugins/hoster/LoadTo.py @@ -24,7 +24,7 @@ class LoadTo(SimpleHoster): FILE_NAME_PATTERN = r'

(?P.+)

' - FILE_SIZE_PATTERN = r'Size: (?P[\d.]+) (?P\w+)' + FILE_SIZE_PATTERN = r'Size: (?P[\d.,]+) (?P\w+)' OFFLINE_PATTERN = r'>Can\'t find file' LINK_PATTERN = r' Date: Tue, 14 Oct 2014 13:38:49 +0200 Subject: Improve unit detection in size pattern --- module/plugins/hoster/LoadTo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hoster/LoadTo.py') diff --git a/module/plugins/hoster/LoadTo.py b/module/plugins/hoster/LoadTo.py index 03ec6e71b..b0f974133 100644 --- a/module/plugins/hoster/LoadTo.py +++ b/module/plugins/hoster/LoadTo.py @@ -24,7 +24,7 @@ class LoadTo(SimpleHoster): FILE_NAME_PATTERN = r'

(?P.+)

' - FILE_SIZE_PATTERN = r'Size: (?P[\d.,]+) (?P\w+)' + FILE_SIZE_PATTERN = r'Size: (?P[\d.,]+) (?P[\w^_]+)' OFFLINE_PATTERN = r'>Can\'t find file' LINK_PATTERN = r' Date: Sun, 19 Oct 2014 14:52:42 +0200 Subject: Update hosters to self.error --- module/plugins/hoster/LoadTo.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/hoster/LoadTo.py') diff --git a/module/plugins/hoster/LoadTo.py b/module/plugins/hoster/LoadTo.py index b0f974133..6f1fdb575 100644 --- a/module/plugins/hoster/LoadTo.py +++ b/module/plugins/hoster/LoadTo.py @@ -13,7 +13,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class LoadTo(SimpleHoster): __name__ = "LoadTo" __type__ = "hoster" - __version__ = "0.16" + __version__ = "0.17" __pattern__ = r'http://(?:www\.)?load\.to/\w+' @@ -42,7 +42,7 @@ class LoadTo(SimpleHoster): # Search for Download URL m = re.search(self.LINK_PATTERN, self.html) if m is None: - self.parseError("Unable to detect download URL") + self.error("Unable to detect download URL") download_url = m.group(1) -- cgit v1.2.3 From f7b87385de7bb559422c5da1f9ef2ef768a6355b Mon Sep 17 00:00:00 2001 From: zapp-brannigan Date: Wed, 22 Oct 2014 10:11:51 +0200 Subject: LoadTo.py] Improve checkDownload Sometimes, files are not downloaded properly. You receive a html-page instead of the desired file. It happens mostly on small files, but it isn't reproducable. Restarting the link solves the issue. --- module/plugins/hoster/LoadTo.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'module/plugins/hoster/LoadTo.py') diff --git a/module/plugins/hoster/LoadTo.py b/module/plugins/hoster/LoadTo.py index 6f1fdb575..a28428b73 100644 --- a/module/plugins/hoster/LoadTo.py +++ b/module/plugins/hoster/LoadTo.py @@ -13,7 +13,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class LoadTo(SimpleHoster): __name__ = "LoadTo" __type__ = "hoster" - __version__ = "0.17" + __version__ = "0.18" __pattern__ = r'http://(?:www\.)?load\.to/\w+' @@ -60,11 +60,14 @@ class LoadTo(SimpleHoster): else: captcha_challenge, captcha_response = solvemedia.challenge(captcha_key) self.download(download_url, post={"adcopy_challenge": captcha_challenge, "adcopy_response": captcha_response}) - check = self.checkDownload({"404": re.compile("\A

404 Not Found

")}) + check = self.checkDownload({'404': re.compile("\A

404 Not Found

"), 'html': re.compile("html")}) if check == "404": self.logWarning("The captcha you entered was incorrect. Please try again.") self.invalidCaptcha() self.retry() + elif check == "html": + self.logWarning("Downloaded file is an html page, will retry") + self.retry() getInfo = create_getInfo(LoadTo) -- cgit v1.2.3 From 4da90891eb2544ac15a7d512aba8cb357f68ee5f Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 25 Oct 2014 01:11:29 +0200 Subject: Spare code cosmetics --- module/plugins/hoster/LoadTo.py | 1 - 1 file changed, 1 deletion(-) (limited to 'module/plugins/hoster/LoadTo.py') diff --git a/module/plugins/hoster/LoadTo.py b/module/plugins/hoster/LoadTo.py index a28428b73..53227baf1 100644 --- a/module/plugins/hoster/LoadTo.py +++ b/module/plugins/hoster/LoadTo.py @@ -62,7 +62,6 @@ class LoadTo(SimpleHoster): self.download(download_url, post={"adcopy_challenge": captcha_challenge, "adcopy_response": captcha_response}) check = self.checkDownload({'404': re.compile("\A

404 Not Found

"), 'html': re.compile("html")}) if check == "404": - self.logWarning("The captcha you entered was incorrect. Please try again.") self.invalidCaptcha() self.retry() elif check == "html": -- cgit v1.2.3 From 9f2ebe486a3e155fb6a60e07cccb77ab6a772eb2 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 26 Oct 2014 02:31:54 +0200 Subject: Extend translation support in plugins + a lot of code cosmetics and typo fixes --- module/plugins/hoster/LoadTo.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/hoster/LoadTo.py') diff --git a/module/plugins/hoster/LoadTo.py b/module/plugins/hoster/LoadTo.py index 53227baf1..c289ddf3c 100644 --- a/module/plugins/hoster/LoadTo.py +++ b/module/plugins/hoster/LoadTo.py @@ -42,7 +42,7 @@ class LoadTo(SimpleHoster): # Search for Download URL m = re.search(self.LINK_PATTERN, self.html) if m is None: - self.error("Unable to detect download URL") + self.error(_("LINK_PATTERN not found")) download_url = m.group(1) @@ -65,7 +65,7 @@ class LoadTo(SimpleHoster): self.invalidCaptcha() self.retry() elif check == "html": - self.logWarning("Downloaded file is an html page, will retry") + self.logWarning(_("Downloaded file is an html page, will retry")) self.retry() -- cgit v1.2.3 From 34984dae733c3f3d47b41a0acfba3724d53c65a1 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 28 Oct 2014 16:52:10 +0100 Subject: Code cosmetics: plugin class attributes --- module/plugins/hoster/LoadTo.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'module/plugins/hoster/LoadTo.py') diff --git a/module/plugins/hoster/LoadTo.py b/module/plugins/hoster/LoadTo.py index c289ddf3c..405f1d667 100644 --- a/module/plugins/hoster/LoadTo.py +++ b/module/plugins/hoster/LoadTo.py @@ -11,16 +11,16 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class LoadTo(SimpleHoster): - __name__ = "LoadTo" - __type__ = "hoster" + __name__ = "LoadTo" + __type__ = "hoster" __version__ = "0.18" __pattern__ = r'http://(?:www\.)?load\.to/\w+' __description__ = """ Load.to hoster plugin """ - __license__ = "GPLv3" - __authors__ = [("halfman", "Pulpan3@gmail.com"), - ("stickell", "l.stickell@yahoo.it")] + __license__ = "GPLv3" + __authors__ = [("halfman", "Pulpan3@gmail.com"), + ("stickell", "l.stickell@yahoo.it")] FILE_NAME_PATTERN = r'

(?P.+)

' -- cgit v1.2.3 From 772e47ef806d18fd209e910be0535bce7c07dc7b Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 2 Nov 2014 22:47:07 +0100 Subject: Update all other plugins --- module/plugins/hoster/LoadTo.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'module/plugins/hoster/LoadTo.py') diff --git a/module/plugins/hoster/LoadTo.py b/module/plugins/hoster/LoadTo.py index 405f1d667..4fad6f147 100644 --- a/module/plugins/hoster/LoadTo.py +++ b/module/plugins/hoster/LoadTo.py @@ -23,14 +23,14 @@ class LoadTo(SimpleHoster): ("stickell", "l.stickell@yahoo.it")] - FILE_NAME_PATTERN = r'

(?P.+)

' - FILE_SIZE_PATTERN = r'Size: (?P[\d.,]+) (?P[\w^_]+)' + NAME_PATTERN = r'

(?P.+)

' + SIZE_PATTERN = r'Size: (?P[\d.,]+) (?P[\w^_]+)' OFFLINE_PATTERN = r'>Can\'t find file' LINK_PATTERN = r' Date: Wed, 3 Dec 2014 14:38:22 +0100 Subject: Fix https://github.com/pyload/pyload/issues/943 --- module/plugins/hoster/LoadTo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hoster/LoadTo.py') diff --git a/module/plugins/hoster/LoadTo.py b/module/plugins/hoster/LoadTo.py index 4fad6f147..4e55496c6 100644 --- a/module/plugins/hoster/LoadTo.py +++ b/module/plugins/hoster/LoadTo.py @@ -49,7 +49,7 @@ class LoadTo(SimpleHoster): # Set Timer - may be obsolete m = re.search(self.WAIT_PATTERN, self.html) if m: - self.wait(m.group(1)) + self.wait(int(m.group(1))) # Load.to is using solvemedia captchas since ~july 2014: solvemedia = SolveMedia(self) -- cgit v1.2.3 From 4d578cb15f3d6edd036e438e504739b97660f93e Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 9 Dec 2014 16:58:35 +0100 Subject: Spare code cosmetics --- module/plugins/hoster/LoadTo.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'module/plugins/hoster/LoadTo.py') diff --git a/module/plugins/hoster/LoadTo.py b/module/plugins/hoster/LoadTo.py index 4e55496c6..0a5b26410 100644 --- a/module/plugins/hoster/LoadTo.py +++ b/module/plugins/hoster/LoadTo.py @@ -58,9 +58,12 @@ class LoadTo(SimpleHoster): if captcha_key is None: self.download(download_url) else: - captcha_challenge, captcha_response = solvemedia.challenge(captcha_key) - self.download(download_url, post={"adcopy_challenge": captcha_challenge, "adcopy_response": captcha_response}) + challenge, response = solvemedia.challenge(captcha_key) + + self.download(download_url, post={"adcopy_challenge": challenge, "adcopy_response": response}) + check = self.checkDownload({'404': re.compile("\A

404 Not Found

"), 'html': re.compile("html")}) + if check == "404": self.invalidCaptcha() self.retry() -- cgit v1.2.3