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/LuckyShareNet.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hoster/LuckyShareNet.py') diff --git a/module/plugins/hoster/LuckyShareNet.py b/module/plugins/hoster/LuckyShareNet.py index 75520a6cf..b5327d175 100644 --- a/module/plugins/hoster/LuckyShareNet.py +++ b/module/plugins/hoster/LuckyShareNet.py @@ -17,7 +17,7 @@ class LuckyShareNet(SimpleHoster): __author_mail__ = "l.stickell@yahoo.it" FILE_INFO_PATTERN = r"

(?P\S+)

\s*Filesize: (?P[\d.]+)(?P\w+)" - FILE_OFFLINE_PATTERN = 'There is no such file available' + OFFLINE_PATTERN = 'There is no such file available' RECAPTCHA_KEY = '6LdivsgSAAAAANWh-d7rPE1mus4yVWuSQIJKIYNw' def parseJson(self, rep): -- 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/LuckyShareNet.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'module/plugins/hoster/LuckyShareNet.py') diff --git a/module/plugins/hoster/LuckyShareNet.py b/module/plugins/hoster/LuckyShareNet.py index b5327d175..9479f583e 100644 --- a/module/plugins/hoster/LuckyShareNet.py +++ b/module/plugins/hoster/LuckyShareNet.py @@ -17,8 +17,9 @@ class LuckyShareNet(SimpleHoster): __author_mail__ = "l.stickell@yahoo.it" FILE_INFO_PATTERN = r"

(?P\S+)

\s*Filesize: (?P[\d.]+)(?P\w+)" - OFFLINE_PATTERN = 'There is no such file available' - RECAPTCHA_KEY = '6LdivsgSAAAAANWh-d7rPE1mus4yVWuSQIJKIYNw' + OFFLINE_PATTERN = r'There is no such file available' + RECAPTCHA_KEY = "6LdivsgSAAAAANWh-d7rPE1mus4yVWuSQIJKIYNw" + def parseJson(self, rep): if 'AJAX Error' in rep: -- 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/LuckyShareNet.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'module/plugins/hoster/LuckyShareNet.py') diff --git a/module/plugins/hoster/LuckyShareNet.py b/module/plugins/hoster/LuckyShareNet.py index 9479f583e..60f1204e5 100644 --- a/module/plugins/hoster/LuckyShareNet.py +++ b/module/plugins/hoster/LuckyShareNet.py @@ -1,17 +1,20 @@ # -*- coding: utf-8 -*- import re + from module.lib.bottle import json_loads -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 LuckyShareNet(SimpleHoster): __name__ = "LuckyShareNet" __type__ = "hoster" - __pattern__ = r'https?://(?:www\.)?luckyshare.net/(?P\d{10,})' __version__ = "0.02" + + __pattern__ = r'https?://(?:www\.)?luckyshare.net/(?P\d{10,})' + __description__ = """LuckyShare.net hoster plugin""" __author_name__ = "stickell" __author_mail__ = "l.stickell@yahoo.it" -- 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/LuckyShareNet.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'module/plugins/hoster/LuckyShareNet.py') diff --git a/module/plugins/hoster/LuckyShareNet.py b/module/plugins/hoster/LuckyShareNet.py index 60f1204e5..de18b8512 100644 --- a/module/plugins/hoster/LuckyShareNet.py +++ b/module/plugins/hoster/LuckyShareNet.py @@ -30,7 +30,7 @@ class LuckyShareNet(SimpleHoster): m = re.search(r"waitingtime = (\d+);", html) if m: waittime = int(m.group(1)) - self.logDebug('You have to wait %d seconds between free downloads' % waittime) + self.logDebug("You have to wait %d seconds between free downloads" % waittime) self.retry(wait_time=waittime) else: self.parseError('Unable to detect wait time between free downloads') @@ -42,9 +42,9 @@ class LuckyShareNet(SimpleHoster): # TODO: Some files could not be downloaded in free mode def handleFree(self): file_id = re.match(self.__pattern__, self.pyfile.url).group('ID') - self.logDebug('File ID: ' + file_id) + self.logDebug("File ID: " + file_id) rep = self.load(r"http://luckyshare.net/download/request/type/time/file/" + file_id, decode=True) - self.logDebug('JSON: ' + rep) + self.logDebug("JSON: " + rep) json = self.parseJson(rep) self.wait(int(json['time'])) @@ -54,13 +54,13 @@ class LuckyShareNet(SimpleHoster): challenge, response = recaptcha.challenge(self.RECAPTCHA_KEY) rep = self.load(r"http://luckyshare.net/download/verify/challenge/%s/response/%s/hash/%s" % (challenge, response, json['hash']), decode=True) - self.logDebug('JSON: ' + rep) + self.logDebug("JSON: " + rep) if 'link' in rep: json.update(self.parseJson(rep)) self.correctCaptcha() break elif 'Verification failed' in rep: - self.logInfo('Wrong captcha') + self.logInfo("Wrong captcha") self.invalidCaptcha() else: self.parseError('Unable to get downlaod link') @@ -68,7 +68,7 @@ class LuckyShareNet(SimpleHoster): if not json['link']: self.fail("No Download url retrieved/all captcha attempts failed") - self.logDebug('Direct URL: ' + json['link']) + self.logDebug("Direct URL: " + json['link']) self.download(json['link']) -- 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/LuckyShareNet.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'module/plugins/hoster/LuckyShareNet.py') diff --git a/module/plugins/hoster/LuckyShareNet.py b/module/plugins/hoster/LuckyShareNet.py index de18b8512..4780c7108 100644 --- a/module/plugins/hoster/LuckyShareNet.py +++ b/module/plugins/hoster/LuckyShareNet.py @@ -21,7 +21,6 @@ class LuckyShareNet(SimpleHoster): FILE_INFO_PATTERN = r"

(?P\S+)

\s*Filesize: (?P[\d.]+)(?P\w+)" OFFLINE_PATTERN = r'There is no such file available' - RECAPTCHA_KEY = "6LdivsgSAAAAANWh-d7rPE1mus4yVWuSQIJKIYNw" def parseJson(self, rep): @@ -50,8 +49,13 @@ class LuckyShareNet(SimpleHoster): self.wait(int(json['time'])) recaptcha = ReCaptcha(self) + + captcha_key = recaptcha.detect_key() + if captcha_key is None: + self.parseError("ReCaptcha key not found") + for _ in xrange(5): - challenge, response = recaptcha.challenge(self.RECAPTCHA_KEY) + challenge, response = recaptcha.challenge(captcha_key) rep = self.load(r"http://luckyshare.net/download/verify/challenge/%s/response/%s/hash/%s" % (challenge, response, json['hash']), decode=True) self.logDebug("JSON: " + rep) -- cgit v1.2.3 From a9117257f71984d553811a605150acb5d1b499ce Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 5 Oct 2014 02:27:07 +0200 Subject: Better import lib header --- module/plugins/hoster/LuckyShareNet.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hoster/LuckyShareNet.py') diff --git a/module/plugins/hoster/LuckyShareNet.py b/module/plugins/hoster/LuckyShareNet.py index 4780c7108..11e27d357 100644 --- a/module/plugins/hoster/LuckyShareNet.py +++ b/module/plugins/hoster/LuckyShareNet.py @@ -2,7 +2,7 @@ import re -from module.lib.bottle import json_loads +from bottle import json_loads from module.plugins.internal.CaptchaService import ReCaptcha from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo -- 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/LuckyShareNet.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/hoster/LuckyShareNet.py') diff --git a/module/plugins/hoster/LuckyShareNet.py b/module/plugins/hoster/LuckyShareNet.py index 11e27d357..8449310b0 100644 --- a/module/plugins/hoster/LuckyShareNet.py +++ b/module/plugins/hoster/LuckyShareNet.py @@ -16,8 +16,8 @@ class LuckyShareNet(SimpleHoster): __pattern__ = r'https?://(?:www\.)?luckyshare.net/(?P\d{10,})' __description__ = """LuckyShare.net hoster plugin""" - __author_name__ = "stickell" - __author_mail__ = "l.stickell@yahoo.it" + __authors__ = [("stickell", "l.stickell@yahoo.it")] + FILE_INFO_PATTERN = r"

(?P\S+)

\s*Filesize: (?P[\d.]+)(?P\w+)" OFFLINE_PATTERN = r'There is no such file available' -- 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/LuckyShareNet.py | 1 + 1 file changed, 1 insertion(+) (limited to 'module/plugins/hoster/LuckyShareNet.py') diff --git a/module/plugins/hoster/LuckyShareNet.py b/module/plugins/hoster/LuckyShareNet.py index 8449310b0..2b702986e 100644 --- a/module/plugins/hoster/LuckyShareNet.py +++ b/module/plugins/hoster/LuckyShareNet.py @@ -16,6 +16,7 @@ class LuckyShareNet(SimpleHoster): __pattern__ = r'https?://(?:www\.)?luckyshare.net/(?P\d{10,})' __description__ = """LuckyShare.net hoster plugin""" + __license__ = "GPLv3" __authors__ = [("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/LuckyShareNet.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/hoster/LuckyShareNet.py') diff --git a/module/plugins/hoster/LuckyShareNet.py b/module/plugins/hoster/LuckyShareNet.py index 2b702986e..99acc5ef8 100644 --- a/module/plugins/hoster/LuckyShareNet.py +++ b/module/plugins/hoster/LuckyShareNet.py @@ -13,14 +13,14 @@ class LuckyShareNet(SimpleHoster): __type__ = "hoster" __version__ = "0.02" - __pattern__ = r'https?://(?:www\.)?luckyshare.net/(?P\d{10,})' + __pattern__ = r'https?://(?:www\.)?luckyshare\.net/(?P\d{10,})' __description__ = """LuckyShare.net hoster plugin""" __license__ = "GPLv3" __authors__ = [("stickell", "l.stickell@yahoo.it")] - FILE_INFO_PATTERN = r"

(?P\S+)

\s*Filesize: (?P[\d.]+)(?P\w+)" + FILE_INFO_PATTERN = r"

(?P\S+)

\s*Filesize: (?P[\d.,]+)(?P\w+)" OFFLINE_PATTERN = r'There is no such file available' -- cgit v1.2.3 From 8939f015a688a07ec7d0bd14b6a3704f6a2cb4a0 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 11 Oct 2014 15:12:40 +0200 Subject: Pattern update 3 --- module/plugins/hoster/LuckyShareNet.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hoster/LuckyShareNet.py') diff --git a/module/plugins/hoster/LuckyShareNet.py b/module/plugins/hoster/LuckyShareNet.py index 99acc5ef8..1637adac0 100644 --- a/module/plugins/hoster/LuckyShareNet.py +++ b/module/plugins/hoster/LuckyShareNet.py @@ -20,7 +20,7 @@ class LuckyShareNet(SimpleHoster): __authors__ = [("stickell", "l.stickell@yahoo.it")] - FILE_INFO_PATTERN = r"

(?P\S+)

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

(?P\S+)

\s*Filesize: (?P[\d.,]+)(?P\w+)' OFFLINE_PATTERN = r'There is no such file available' -- 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/LuckyShareNet.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hoster/LuckyShareNet.py') diff --git a/module/plugins/hoster/LuckyShareNet.py b/module/plugins/hoster/LuckyShareNet.py index 1637adac0..82c615bbd 100644 --- a/module/plugins/hoster/LuckyShareNet.py +++ b/module/plugins/hoster/LuckyShareNet.py @@ -20,7 +20,7 @@ class LuckyShareNet(SimpleHoster): __authors__ = [("stickell", "l.stickell@yahoo.it")] - FILE_INFO_PATTERN = r'

(?P\S+)

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

(?P\S+)

\s*Filesize: (?P[\d.,]+)(?P[\w^_]+)' OFFLINE_PATTERN = r'There is no such file available' -- 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/LuckyShareNet.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'module/plugins/hoster/LuckyShareNet.py') diff --git a/module/plugins/hoster/LuckyShareNet.py b/module/plugins/hoster/LuckyShareNet.py index 82c615bbd..fe5a80679 100644 --- a/module/plugins/hoster/LuckyShareNet.py +++ b/module/plugins/hoster/LuckyShareNet.py @@ -11,7 +11,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class LuckyShareNet(SimpleHoster): __name__ = "LuckyShareNet" __type__ = "hoster" - __version__ = "0.02" + __version__ = "0.03" __pattern__ = r'https?://(?:www\.)?luckyshare\.net/(?P\d{10,})' @@ -33,7 +33,7 @@ class LuckyShareNet(SimpleHoster): self.logDebug("You have to wait %d seconds between free downloads" % waittime) self.retry(wait_time=waittime) else: - self.parseError('Unable to detect wait time between free downloads') + self.error('Unable to detect wait time between free downloads') elif 'Hash expired' in rep: self.retry(reason="Hash expired") return json_loads(rep) @@ -53,7 +53,7 @@ class LuckyShareNet(SimpleHoster): captcha_key = recaptcha.detect_key() if captcha_key is None: - self.parseError("ReCaptcha key not found") + self.error("ReCaptcha key not found") for _ in xrange(5): challenge, response = recaptcha.challenge(captcha_key) @@ -68,7 +68,7 @@ class LuckyShareNet(SimpleHoster): self.logInfo("Wrong captcha") self.invalidCaptcha() else: - self.parseError('Unable to get downlaod link') + self.error('Unable to get downlaod link') if not json['link']: self.fail("No Download url retrieved/all captcha attempts failed") -- cgit v1.2.3 From 0eb6e7ec4a1144dcca824d8add049787d3da1762 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Wed, 22 Oct 2014 19:44:59 +0200 Subject: Two space before function declaration --- module/plugins/hoster/LuckyShareNet.py | 1 + 1 file changed, 1 insertion(+) (limited to 'module/plugins/hoster/LuckyShareNet.py') diff --git a/module/plugins/hoster/LuckyShareNet.py b/module/plugins/hoster/LuckyShareNet.py index fe5a80679..4a4d4a047 100644 --- a/module/plugins/hoster/LuckyShareNet.py +++ b/module/plugins/hoster/LuckyShareNet.py @@ -38,6 +38,7 @@ class LuckyShareNet(SimpleHoster): self.retry(reason="Hash expired") return json_loads(rep) + # TODO: There should be a filesize limit for free downloads # TODO: Some files could not be downloaded in free mode def handleFree(self): -- 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/LuckyShareNet.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'module/plugins/hoster/LuckyShareNet.py') diff --git a/module/plugins/hoster/LuckyShareNet.py b/module/plugins/hoster/LuckyShareNet.py index 4a4d4a047..5e1b6bf60 100644 --- a/module/plugins/hoster/LuckyShareNet.py +++ b/module/plugins/hoster/LuckyShareNet.py @@ -52,12 +52,8 @@ class LuckyShareNet(SimpleHoster): recaptcha = ReCaptcha(self) - captcha_key = recaptcha.detect_key() - if captcha_key is None: - self.error("ReCaptcha key not found") - for _ in xrange(5): - challenge, response = recaptcha.challenge(captcha_key) + challenge, response = recaptcha.challenge() rep = self.load(r"http://luckyshare.net/download/verify/challenge/%s/response/%s/hash/%s" % (challenge, response, json['hash']), decode=True) self.logDebug("JSON: " + rep) -- 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/LuckyShareNet.py | 1 - 1 file changed, 1 deletion(-) (limited to 'module/plugins/hoster/LuckyShareNet.py') diff --git a/module/plugins/hoster/LuckyShareNet.py b/module/plugins/hoster/LuckyShareNet.py index 5e1b6bf60..e76105944 100644 --- a/module/plugins/hoster/LuckyShareNet.py +++ b/module/plugins/hoster/LuckyShareNet.py @@ -62,7 +62,6 @@ class LuckyShareNet(SimpleHoster): self.correctCaptcha() break elif 'Verification failed' in rep: - self.logInfo("Wrong captcha") self.invalidCaptcha() else: self.error('Unable to get downlaod link') -- cgit v1.2.3 From e3f5280529921100f48bb8a79853bf480c7611e4 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 25 Oct 2014 02:53:05 +0200 Subject: Replace single quotes with doubles in self.error and self.fail msg --- module/plugins/hoster/LuckyShareNet.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/hoster/LuckyShareNet.py') diff --git a/module/plugins/hoster/LuckyShareNet.py b/module/plugins/hoster/LuckyShareNet.py index e76105944..5dfe375d1 100644 --- a/module/plugins/hoster/LuckyShareNet.py +++ b/module/plugins/hoster/LuckyShareNet.py @@ -33,7 +33,7 @@ class LuckyShareNet(SimpleHoster): self.logDebug("You have to wait %d seconds between free downloads" % waittime) self.retry(wait_time=waittime) else: - self.error('Unable to detect wait time between free downloads') + self.error("Unable to detect wait time between free downloads") elif 'Hash expired' in rep: self.retry(reason="Hash expired") return json_loads(rep) @@ -64,7 +64,7 @@ class LuckyShareNet(SimpleHoster): elif 'Verification failed' in rep: self.invalidCaptcha() else: - self.error('Unable to get downlaod link') + self.error("Unable to get downlaod link") if not json['link']: self.fail("No Download url retrieved/all captcha attempts failed") -- cgit v1.2.3 From 1c4bf83881d2a22da3773666a580d51f6b57bfd1 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 25 Oct 2014 03:07:21 +0200 Subject: Avoid gettext conflict due variable `_` --- module/plugins/hoster/LuckyShareNet.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hoster/LuckyShareNet.py') diff --git a/module/plugins/hoster/LuckyShareNet.py b/module/plugins/hoster/LuckyShareNet.py index 5dfe375d1..b7f3d7099 100644 --- a/module/plugins/hoster/LuckyShareNet.py +++ b/module/plugins/hoster/LuckyShareNet.py @@ -52,7 +52,7 @@ class LuckyShareNet(SimpleHoster): recaptcha = ReCaptcha(self) - for _ in xrange(5): + for _i in xrange(5): challenge, response = recaptcha.challenge() rep = self.load(r"http://luckyshare.net/download/verify/challenge/%s/response/%s/hash/%s" % (challenge, response, json['hash']), decode=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/LuckyShareNet.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'module/plugins/hoster/LuckyShareNet.py') diff --git a/module/plugins/hoster/LuckyShareNet.py b/module/plugins/hoster/LuckyShareNet.py index b7f3d7099..8ae56458b 100644 --- a/module/plugins/hoster/LuckyShareNet.py +++ b/module/plugins/hoster/LuckyShareNet.py @@ -33,7 +33,7 @@ class LuckyShareNet(SimpleHoster): self.logDebug("You have to wait %d seconds between free downloads" % waittime) self.retry(wait_time=waittime) else: - self.error("Unable to detect wait time between free downloads") + self.error(_("Unable to detect wait time between free downloads")) elif 'Hash expired' in rep: self.retry(reason="Hash expired") return json_loads(rep) @@ -64,10 +64,10 @@ class LuckyShareNet(SimpleHoster): elif 'Verification failed' in rep: self.invalidCaptcha() else: - self.error("Unable to get downlaod link") + self.error(_("Unable to get downlaod link")) if not json['link']: - self.fail("No Download url retrieved/all captcha attempts failed") + self.fail(_("No Download url retrieved/all captcha attempts failed")) self.logDebug("Direct URL: " + json['link']) self.download(json['link']) -- cgit v1.2.3 From 146fe1e309c33ab149bfaf58ad86c0dd4fb9b156 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Mon, 27 Oct 2014 01:18:45 +0100 Subject: Spare code cosmetics --- module/plugins/hoster/LuckyShareNet.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hoster/LuckyShareNet.py') diff --git a/module/plugins/hoster/LuckyShareNet.py b/module/plugins/hoster/LuckyShareNet.py index 8ae56458b..4917bebfb 100644 --- a/module/plugins/hoster/LuckyShareNet.py +++ b/module/plugins/hoster/LuckyShareNet.py @@ -35,7 +35,7 @@ class LuckyShareNet(SimpleHoster): else: self.error(_("Unable to detect wait time between free downloads")) elif 'Hash expired' in rep: - self.retry(reason="Hash expired") + self.retry(reason=_("Hash expired")) return json_loads(rep) -- cgit v1.2.3 From 8b3589dd394d81177bf4680dddb5bdb9506b89ea Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 28 Oct 2014 16:04:10 +0100 Subject: Update plugins to last changes --- module/plugins/hoster/LuckyShareNet.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'module/plugins/hoster/LuckyShareNet.py') diff --git a/module/plugins/hoster/LuckyShareNet.py b/module/plugins/hoster/LuckyShareNet.py index 4917bebfb..94f14481d 100644 --- a/module/plugins/hoster/LuckyShareNet.py +++ b/module/plugins/hoster/LuckyShareNet.py @@ -29,9 +29,9 @@ class LuckyShareNet(SimpleHoster): html = self.load(self.pyfile.url, decode=True) m = re.search(r"waitingtime = (\d+);", html) if m: - waittime = int(m.group(1)) - self.logDebug("You have to wait %d seconds between free downloads" % waittime) - self.retry(wait_time=waittime) + seconds = int(m.group(1)) + self.logDebug("You have to wait %d seconds between free downloads" % seconds) + self.retry(wait_time=seconds) else: self.error(_("Unable to detect wait time between free downloads")) elif 'Hash expired' in rep: -- 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/LuckyShareNet.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'module/plugins/hoster/LuckyShareNet.py') diff --git a/module/plugins/hoster/LuckyShareNet.py b/module/plugins/hoster/LuckyShareNet.py index 94f14481d..8d1bfb87e 100644 --- a/module/plugins/hoster/LuckyShareNet.py +++ b/module/plugins/hoster/LuckyShareNet.py @@ -9,15 +9,15 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class LuckyShareNet(SimpleHoster): - __name__ = "LuckyShareNet" - __type__ = "hoster" + __name__ = "LuckyShareNet" + __type__ = "hoster" __version__ = "0.03" __pattern__ = r'https?://(?:www\.)?luckyshare\.net/(?P\d{10,})' __description__ = """LuckyShare.net hoster plugin""" - __license__ = "GPLv3" - __authors__ = [("stickell", "l.stickell@yahoo.it")] + __license__ = "GPLv3" + __authors__ = [("stickell", "l.stickell@yahoo.it")] FILE_INFO_PATTERN = r'

(?P\S+)

\s*Filesize: (?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/LuckyShareNet.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hoster/LuckyShareNet.py') diff --git a/module/plugins/hoster/LuckyShareNet.py b/module/plugins/hoster/LuckyShareNet.py index 8d1bfb87e..aeab46d3d 100644 --- a/module/plugins/hoster/LuckyShareNet.py +++ b/module/plugins/hoster/LuckyShareNet.py @@ -20,7 +20,7 @@ class LuckyShareNet(SimpleHoster): __authors__ = [("stickell", "l.stickell@yahoo.it")] - FILE_INFO_PATTERN = r'

(?P\S+)

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

(?P\S+)

\s*Filesize: (?P[\d.,]+)(?P[\w^_]+)' OFFLINE_PATTERN = r'There is no such file available' -- cgit v1.2.3 From 86d3b6249073947132ed3a9eeb1b1e987d19569a Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Mon, 1 Dec 2014 18:17:13 +0100 Subject: Update some plugins --- module/plugins/hoster/LuckyShareNet.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'module/plugins/hoster/LuckyShareNet.py') diff --git a/module/plugins/hoster/LuckyShareNet.py b/module/plugins/hoster/LuckyShareNet.py index aeab46d3d..2c33b57e7 100644 --- a/module/plugins/hoster/LuckyShareNet.py +++ b/module/plugins/hoster/LuckyShareNet.py @@ -11,7 +11,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class LuckyShareNet(SimpleHoster): __name__ = "LuckyShareNet" __type__ = "hoster" - __version__ = "0.03" + __version__ = "0.04" __pattern__ = r'https?://(?:www\.)?luckyshare\.net/(?P\d{10,})' @@ -42,9 +42,7 @@ class LuckyShareNet(SimpleHoster): # TODO: There should be a filesize limit for free downloads # TODO: Some files could not be downloaded in free mode def handleFree(self): - file_id = re.match(self.__pattern__, self.pyfile.url).group('ID') - self.logDebug("File ID: " + file_id) - rep = self.load(r"http://luckyshare.net/download/request/type/time/file/" + file_id, decode=True) + rep = self.load(r"http://luckyshare.net/download/request/type/time/file/" + self.info['pattern']['ID'], decode=True) self.logDebug("JSON: " + rep) json = self.parseJson(rep) @@ -69,7 +67,6 @@ class LuckyShareNet(SimpleHoster): if not json['link']: self.fail(_("No Download url retrieved/all captcha attempts failed")) - self.logDebug("Direct URL: " + json['link']) self.download(json['link']) -- cgit v1.2.3