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/UpstoreNet.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hoster/UpstoreNet.py') diff --git a/module/plugins/hoster/UpstoreNet.py b/module/plugins/hoster/UpstoreNet.py index 9d1c4b3dd..69d209471 100644 --- a/module/plugins/hoster/UpstoreNet.py +++ b/module/plugins/hoster/UpstoreNet.py @@ -14,7 +14,7 @@ class UpstoreNet(SimpleHoster): __author_name__ = ("igel") FILE_INFO_PATTERN = r'
.*?
\s*\n

(?P.*?)

\s*\n
\s*\n\s*(?P[\d.]+) (?P\w+)' - FILE_OFFLINE_PATTERN = r'File not found' + OFFLINE_PATTERN = r'File not found' WAIT_PATTERN = r"var sec = (\d+)" CHASH_PATTERN = r'' -- 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/UpstoreNet.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'module/plugins/hoster/UpstoreNet.py') diff --git a/module/plugins/hoster/UpstoreNet.py b/module/plugins/hoster/UpstoreNet.py index 69d209471..50dc431a9 100644 --- a/module/plugins/hoster/UpstoreNet.py +++ b/module/plugins/hoster/UpstoreNet.py @@ -16,9 +16,9 @@ class UpstoreNet(SimpleHoster): FILE_INFO_PATTERN = r'
.*?
\s*\n

(?P.*?)

\s*\n
\s*\n\s*(?P[\d.]+) (?P\w+)' OFFLINE_PATTERN = r'File not found' - WAIT_PATTERN = r"var sec = (\d+)" + WAIT_PATTERN = r'var sec = (\d+)' CHASH_PATTERN = r'' - DIRECT_LINK_PATTERN = r'' + LINK_PATTERN = r'' def handleFree(self): # STAGE 1: get link to continue @@ -55,7 +55,7 @@ class UpstoreNet(SimpleHoster): self.html = self.load(self.pyfile.url, post=post_data, decode=True) # STAGE 3: get direct link - m = re.search(self.DIRECT_LINK_PATTERN, self.html, re.DOTALL) + m = re.search(self.LINK_PATTERN, self.html, re.DOTALL) if m: break -- cgit v1.2.3 From 5060e4c6374a5116d0d8b02528f910f8c5f8bcf9 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 15 Jul 2014 16:25:41 +0200 Subject: Fix code indentation, some bad whitespaces and missing authors + use 'not' instead 'is None' + replace __pattern__'s r" with r' + other minor cosmetics --- module/plugins/hoster/UpstoreNet.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'module/plugins/hoster/UpstoreNet.py') diff --git a/module/plugins/hoster/UpstoreNet.py b/module/plugins/hoster/UpstoreNet.py index 50dc431a9..adda573bc 100644 --- a/module/plugins/hoster/UpstoreNet.py +++ b/module/plugins/hoster/UpstoreNet.py @@ -8,10 +8,11 @@ from module.plugins.internal.CaptchaService import ReCaptcha class UpstoreNet(SimpleHoster): __name__ = "UpstoreNet" __type__ = "hoster" - __pattern__ = r"https?://(?:www\.)?upstore\.net/" + __pattern__ = r'https?://(?:www\.)?upstore\.net/' __version__ = "0.02" __description__ = """Upstore.Net File Download Hoster""" - __author_name__ = ("igel") + __author_name__ = "igel" + __author_mail__ = "igelkun@myopera.com" FILE_INFO_PATTERN = r'
.*?
\s*\n

(?P.*?)

\s*\n
\s*\n\s*(?P[\d.]+) (?P\w+)' OFFLINE_PATTERN = r'File not found' @@ -20,6 +21,7 @@ class UpstoreNet(SimpleHoster): CHASH_PATTERN = r'' LINK_PATTERN = r'' + def handleFree(self): # STAGE 1: get link to continue m = re.search(self.CHASH_PATTERN, self.html) -- 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/UpstoreNet.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'module/plugins/hoster/UpstoreNet.py') diff --git a/module/plugins/hoster/UpstoreNet.py b/module/plugins/hoster/UpstoreNet.py index adda573bc..99aa25b48 100644 --- a/module/plugins/hoster/UpstoreNet.py +++ b/module/plugins/hoster/UpstoreNet.py @@ -25,7 +25,7 @@ class UpstoreNet(SimpleHoster): def handleFree(self): # STAGE 1: get link to continue m = re.search(self.CHASH_PATTERN, self.html) - if not m: + if m is None: self.parseError("could not detect hash") chash = m.group(1) self.logDebug("read hash " + chash) @@ -42,7 +42,7 @@ class UpstoreNet(SimpleHoster): # try the captcha 5 times for i in xrange(5): m = re.search(self.WAIT_PATTERN, self.html) - if not m: + if m is None: self.parseError("could not find wait pattern") wait_time = m.group(1) @@ -61,7 +61,7 @@ class UpstoreNet(SimpleHoster): if m: break - if not m: + if m is None: self.parseError("could not detect direct link") direct = m.group(1) -- 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/UpstoreNet.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'module/plugins/hoster/UpstoreNet.py') diff --git a/module/plugins/hoster/UpstoreNet.py b/module/plugins/hoster/UpstoreNet.py index 99aa25b48..140024731 100644 --- a/module/plugins/hoster/UpstoreNet.py +++ b/module/plugins/hoster/UpstoreNet.py @@ -1,15 +1,18 @@ # -*- coding: utf-8 -*- + import re -from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo from module.plugins.internal.CaptchaService import ReCaptcha +from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class UpstoreNet(SimpleHoster): __name__ = "UpstoreNet" __type__ = "hoster" - __pattern__ = r'https?://(?:www\.)?upstore\.net/' __version__ = "0.02" + + __pattern__ = r'https?://(?:www\.)?upstore\.net/' + __description__ = """Upstore.Net File Download Hoster""" __author_name__ = "igel" __author_mail__ = "igelkun@myopera.com" -- cgit v1.2.3 From 0d220d634e512d89bda540f91c643b361c82ea8a Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 27 Sep 2014 01:38:32 +0200 Subject: Logging string cosmetics --- module/plugins/hoster/UpstoreNet.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'module/plugins/hoster/UpstoreNet.py') diff --git a/module/plugins/hoster/UpstoreNet.py b/module/plugins/hoster/UpstoreNet.py index 140024731..5293ce01d 100644 --- a/module/plugins/hoster/UpstoreNet.py +++ b/module/plugins/hoster/UpstoreNet.py @@ -31,7 +31,7 @@ class UpstoreNet(SimpleHoster): if m is None: self.parseError("could not detect hash") chash = m.group(1) - self.logDebug("read hash " + chash) + self.logDebug("Read hash " + chash) # continue to stage2 post_data = {'hash': chash, 'free': 'Slow download'} self.html = self.load(self.pyfile.url, post=post_data, decode=True) @@ -41,7 +41,7 @@ class UpstoreNet(SimpleHoster): recaptcha = ReCaptcha(self) if not recaptcha.detect_key(self.html): self.parseError("could not find recaptcha pattern") - self.logDebug("using captcha key " + recaptcha.recaptcha_key) + self.logDebug("Using captcha key " + recaptcha.recaptcha_key) # try the captcha 5 times for i in xrange(5): m = re.search(self.WAIT_PATTERN, self.html) @@ -68,7 +68,7 @@ class UpstoreNet(SimpleHoster): self.parseError("could not detect direct link") direct = m.group(1) - self.logDebug('found direct link: ' + direct) + self.logDebug("Found direct link: " + direct) self.download(direct, disposition=True) -- cgit v1.2.3 From 23ae563604dca1dae262fbc598154b99b2f1eae8 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 3 Oct 2014 09:06:05 +0200 Subject: Update plugins after CaptchaService and XFileSharingPro changes --- module/plugins/hoster/UpstoreNet.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'module/plugins/hoster/UpstoreNet.py') diff --git a/module/plugins/hoster/UpstoreNet.py b/module/plugins/hoster/UpstoreNet.py index 5293ce01d..cdd1abe76 100644 --- a/module/plugins/hoster/UpstoreNet.py +++ b/module/plugins/hoster/UpstoreNet.py @@ -39,9 +39,9 @@ class UpstoreNet(SimpleHoster): # STAGE 2: solv captcha and wait # first get the infos we need: recaptcha key and wait time recaptcha = ReCaptcha(self) - if not recaptcha.detect_key(self.html): - self.parseError("could not find recaptcha pattern") - self.logDebug("Using captcha key " + recaptcha.recaptcha_key) + if recaptcha.detect_key() is None: + self.parseError("ReCaptcha key not found") + self.logDebug("Using captcha key " + recaptcha.key) # try the captcha 5 times for i in xrange(5): m = re.search(self.WAIT_PATTERN, self.html) -- 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/UpstoreNet.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/hoster/UpstoreNet.py') diff --git a/module/plugins/hoster/UpstoreNet.py b/module/plugins/hoster/UpstoreNet.py index cdd1abe76..ab79a38a2 100644 --- a/module/plugins/hoster/UpstoreNet.py +++ b/module/plugins/hoster/UpstoreNet.py @@ -14,8 +14,8 @@ class UpstoreNet(SimpleHoster): __pattern__ = r'https?://(?:www\.)?upstore\.net/' __description__ = """Upstore.Net File Download Hoster""" - __author_name__ = "igel" - __author_mail__ = "igelkun@myopera.com" + __authors__ = [("igel", "igelkun@myopera.com")] + FILE_INFO_PATTERN = r'
.*?
\s*\n

(?P.*?)

\s*\n
\s*\n\s*(?P[\d.]+) (?P\w+)' OFFLINE_PATTERN = r'File not found' -- 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/UpstoreNet.py | 1 + 1 file changed, 1 insertion(+) (limited to 'module/plugins/hoster/UpstoreNet.py') diff --git a/module/plugins/hoster/UpstoreNet.py b/module/plugins/hoster/UpstoreNet.py index ab79a38a2..2eb88afef 100644 --- a/module/plugins/hoster/UpstoreNet.py +++ b/module/plugins/hoster/UpstoreNet.py @@ -14,6 +14,7 @@ class UpstoreNet(SimpleHoster): __pattern__ = r'https?://(?:www\.)?upstore\.net/' __description__ = """Upstore.Net File Download Hoster""" + __license__ = "GPLv3" __authors__ = [("igel", "igelkun@myopera.com")] -- 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/UpstoreNet.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hoster/UpstoreNet.py') diff --git a/module/plugins/hoster/UpstoreNet.py b/module/plugins/hoster/UpstoreNet.py index 2eb88afef..ef9cd9e5d 100644 --- a/module/plugins/hoster/UpstoreNet.py +++ b/module/plugins/hoster/UpstoreNet.py @@ -18,7 +18,7 @@ class UpstoreNet(SimpleHoster): __authors__ = [("igel", "igelkun@myopera.com")] - FILE_INFO_PATTERN = r'
.*?
\s*\n

(?P.*?)

\s*\n
\s*\n\s*(?P[\d.]+) (?P\w+)' + FILE_INFO_PATTERN = r'
.*?
\s*\n

(?P.*?)

\s*\n
\s*\n\s*(?P[\d.,]+) (?P\w+)' OFFLINE_PATTERN = r'File not found' WAIT_PATTERN = r'var sec = (\d+)' -- cgit v1.2.3 From 388a2f6478d42e423f1f8442d8539983f3762f22 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 14 Oct 2014 13:38:49 +0200 Subject: Improve unit detection in size pattern --- module/plugins/hoster/UpstoreNet.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hoster/UpstoreNet.py') diff --git a/module/plugins/hoster/UpstoreNet.py b/module/plugins/hoster/UpstoreNet.py index ef9cd9e5d..fd13f6d41 100644 --- a/module/plugins/hoster/UpstoreNet.py +++ b/module/plugins/hoster/UpstoreNet.py @@ -18,7 +18,7 @@ class UpstoreNet(SimpleHoster): __authors__ = [("igel", "igelkun@myopera.com")] - FILE_INFO_PATTERN = r'
.*?
\s*\n

(?P.*?)

\s*\n
\s*\n\s*(?P[\d.,]+) (?P\w+)' + FILE_INFO_PATTERN = r'
.*?
\s*\n

(?P.*?)

\s*\n
\s*\n\s*(?P[\d.,]+) (?P[\w^_]+)' OFFLINE_PATTERN = r'File not found' WAIT_PATTERN = r'var sec = (\d+)' -- cgit v1.2.3 From 2ae91b81a2f12a1c9b1f78524df78a2b3f1ef494 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 19 Oct 2014 14:52:42 +0200 Subject: Update hosters to self.error --- module/plugins/hoster/UpstoreNet.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'module/plugins/hoster/UpstoreNet.py') diff --git a/module/plugins/hoster/UpstoreNet.py b/module/plugins/hoster/UpstoreNet.py index fd13f6d41..257a186eb 100644 --- a/module/plugins/hoster/UpstoreNet.py +++ b/module/plugins/hoster/UpstoreNet.py @@ -9,7 +9,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class UpstoreNet(SimpleHoster): __name__ = "UpstoreNet" __type__ = "hoster" - __version__ = "0.02" + __version__ = "0.03" __pattern__ = r'https?://(?:www\.)?upstore\.net/' @@ -30,7 +30,7 @@ class UpstoreNet(SimpleHoster): # STAGE 1: get link to continue m = re.search(self.CHASH_PATTERN, self.html) if m is None: - self.parseError("could not detect hash") + self.error("could not detect hash") chash = m.group(1) self.logDebug("Read hash " + chash) # continue to stage2 @@ -41,13 +41,13 @@ class UpstoreNet(SimpleHoster): # first get the infos we need: recaptcha key and wait time recaptcha = ReCaptcha(self) if recaptcha.detect_key() is None: - self.parseError("ReCaptcha key not found") + self.error("ReCaptcha key not found") self.logDebug("Using captcha key " + recaptcha.key) # try the captcha 5 times for i in xrange(5): m = re.search(self.WAIT_PATTERN, self.html) if m is None: - self.parseError("could not find wait pattern") + self.error("could not find wait pattern") wait_time = m.group(1) # then, do the waiting @@ -66,7 +66,7 @@ class UpstoreNet(SimpleHoster): break if m is None: - self.parseError("could not detect direct link") + self.error("could not detect direct link") direct = m.group(1) self.logDebug("Found direct link: " + direct) -- cgit v1.2.3 From 7b67f68c1636014fe02286da71bdc6c13dc3eeee Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Thu, 23 Oct 2014 00:50:23 +0200 Subject: Simplify captcha challenge calls --- module/plugins/hoster/UpstoreNet.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'module/plugins/hoster/UpstoreNet.py') diff --git a/module/plugins/hoster/UpstoreNet.py b/module/plugins/hoster/UpstoreNet.py index 257a186eb..2e500dc01 100644 --- a/module/plugins/hoster/UpstoreNet.py +++ b/module/plugins/hoster/UpstoreNet.py @@ -40,9 +40,7 @@ class UpstoreNet(SimpleHoster): # STAGE 2: solv captcha and wait # first get the infos we need: recaptcha key and wait time recaptcha = ReCaptcha(self) - if recaptcha.detect_key() is None: - self.error("ReCaptcha key not found") - self.logDebug("Using captcha key " + recaptcha.key) + # try the captcha 5 times for i in xrange(5): m = re.search(self.WAIT_PATTERN, self.html) -- 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/UpstoreNet.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'module/plugins/hoster/UpstoreNet.py') diff --git a/module/plugins/hoster/UpstoreNet.py b/module/plugins/hoster/UpstoreNet.py index 2e500dc01..3695f0c6d 100644 --- a/module/plugins/hoster/UpstoreNet.py +++ b/module/plugins/hoster/UpstoreNet.py @@ -30,7 +30,7 @@ class UpstoreNet(SimpleHoster): # STAGE 1: get link to continue m = re.search(self.CHASH_PATTERN, self.html) if m is None: - self.error("could not detect hash") + self.error("Unable to detect hash") chash = m.group(1) self.logDebug("Read hash " + chash) # continue to stage2 @@ -45,7 +45,7 @@ class UpstoreNet(SimpleHoster): for i in xrange(5): m = re.search(self.WAIT_PATTERN, self.html) if m is None: - self.error("could not find wait pattern") + self.error("Wait pattern not found") wait_time = m.group(1) # then, do the waiting @@ -59,15 +59,14 @@ class UpstoreNet(SimpleHoster): self.html = self.load(self.pyfile.url, post=post_data, decode=True) # STAGE 3: get direct link - m = re.search(self.LINK_PATTERN, self.html, re.DOTALL) + m = re.search(self.LINK_PATTERN, self.html, re.S) if m: break if m is None: - self.error("could not detect direct link") + self.error("Download link not found") direct = m.group(1) - self.logDebug("Found direct link: " + direct) self.download(direct, disposition=True) -- 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/UpstoreNet.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'module/plugins/hoster/UpstoreNet.py') diff --git a/module/plugins/hoster/UpstoreNet.py b/module/plugins/hoster/UpstoreNet.py index 3695f0c6d..1ee123357 100644 --- a/module/plugins/hoster/UpstoreNet.py +++ b/module/plugins/hoster/UpstoreNet.py @@ -30,7 +30,7 @@ class UpstoreNet(SimpleHoster): # STAGE 1: get link to continue m = re.search(self.CHASH_PATTERN, self.html) if m is None: - self.error("Unable to detect hash") + self.error(_("CHASH_PATTERN not found")) chash = m.group(1) self.logDebug("Read hash " + chash) # continue to stage2 @@ -45,7 +45,7 @@ class UpstoreNet(SimpleHoster): for i in xrange(5): m = re.search(self.WAIT_PATTERN, self.html) if m is None: - self.error("Wait pattern not found") + self.error(_("Wait pattern not found")) wait_time = m.group(1) # then, do the waiting @@ -64,7 +64,7 @@ class UpstoreNet(SimpleHoster): break if m is None: - self.error("Download link not found") + self.error(_("Download link not found")) direct = m.group(1) self.download(direct, disposition=True) -- 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/UpstoreNet.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'module/plugins/hoster/UpstoreNet.py') diff --git a/module/plugins/hoster/UpstoreNet.py b/module/plugins/hoster/UpstoreNet.py index 1ee123357..f6b725c97 100644 --- a/module/plugins/hoster/UpstoreNet.py +++ b/module/plugins/hoster/UpstoreNet.py @@ -7,15 +7,15 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class UpstoreNet(SimpleHoster): - __name__ = "UpstoreNet" - __type__ = "hoster" + __name__ = "UpstoreNet" + __type__ = "hoster" __version__ = "0.03" __pattern__ = r'https?://(?:www\.)?upstore\.net/' __description__ = """Upstore.Net File Download Hoster""" - __license__ = "GPLv3" - __authors__ = [("igel", "igelkun@myopera.com")] + __license__ = "GPLv3" + __authors__ = [("igel", "igelkun@myopera.com")] FILE_INFO_PATTERN = r'
.*?
\s*\n

(?P.*?)

\s*\n
\s*\n\s*(?P[\d.,]+) (?P[\w^_]+)' -- 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/UpstoreNet.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hoster/UpstoreNet.py') diff --git a/module/plugins/hoster/UpstoreNet.py b/module/plugins/hoster/UpstoreNet.py index f6b725c97..8c93c4d61 100644 --- a/module/plugins/hoster/UpstoreNet.py +++ b/module/plugins/hoster/UpstoreNet.py @@ -18,7 +18,7 @@ class UpstoreNet(SimpleHoster): __authors__ = [("igel", "igelkun@myopera.com")] - FILE_INFO_PATTERN = r'
.*?
\s*\n

(?P.*?)

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

(?P.*?)

\s*\n
\s*\n\s*(?P[\d.,]+) (?P[\w^_]+)' OFFLINE_PATTERN = r'File not found' WAIT_PATTERN = r'var sec = (\d+)' -- cgit v1.2.3 From be05dce2da77bca4613efbdfb0f6357a983e6e1c Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Wed, 3 Dec 2014 14:38:22 +0100 Subject: Fix https://github.com/pyload/pyload/issues/943 --- module/plugins/hoster/UpstoreNet.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hoster/UpstoreNet.py') diff --git a/module/plugins/hoster/UpstoreNet.py b/module/plugins/hoster/UpstoreNet.py index 8c93c4d61..239cc92f5 100644 --- a/module/plugins/hoster/UpstoreNet.py +++ b/module/plugins/hoster/UpstoreNet.py @@ -46,7 +46,7 @@ class UpstoreNet(SimpleHoster): m = re.search(self.WAIT_PATTERN, self.html) if m is None: self.error(_("Wait pattern not found")) - wait_time = m.group(1) + wait_time = int(m.group(1)) # then, do the waiting self.wait(wait_time) -- 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/UpstoreNet.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'module/plugins/hoster/UpstoreNet.py') diff --git a/module/plugins/hoster/UpstoreNet.py b/module/plugins/hoster/UpstoreNet.py index 239cc92f5..25c424f1f 100644 --- a/module/plugins/hoster/UpstoreNet.py +++ b/module/plugins/hoster/UpstoreNet.py @@ -52,9 +52,9 @@ class UpstoreNet(SimpleHoster): self.wait(wait_time) # then, handle the captcha - challenge, code = recaptcha.challenge() - post_data['recaptcha_challenge_field'] = challenge - post_data['recaptcha_response_field'] = code + challenge, response = recaptcha.challenge() + post_data.update({'recaptcha_challenge_field': challenge, + 'recaptcha_response_field' : response}) self.html = self.load(self.pyfile.url, post=post_data, decode=True) -- cgit v1.2.3