From 285c4bd667d303efb0818f71b2e26bc9038eeee5 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Mon, 8 Jun 2015 10:09:56 +0200 Subject: Update plugins --- module/plugins/hoster/EuroshareEu.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'module/plugins/hoster/EuroshareEu.py') diff --git a/module/plugins/hoster/EuroshareEu.py b/module/plugins/hoster/EuroshareEu.py index 842e0cb87..857faebc5 100644 --- a/module/plugins/hoster/EuroshareEu.py +++ b/module/plugins/hoster/EuroshareEu.py @@ -8,7 +8,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class EuroshareEu(SimpleHoster): __name__ = "EuroshareEu" __type__ = "hoster" - __version__ = "0.28" + __version__ = "0.29" __pattern__ = r'http://(?:www\.)?euroshare\.(eu|sk|cz|hu|pl)/file/.+' __config__ = [("use_premium", "bool", "Use premium account if available", True)] @@ -58,11 +58,11 @@ class EuroshareEu(SimpleHoster): self.link = "http://euroshare.eu%s" % m.group(1) - def checkFile(self, rules={}): + def checkFile(self): if self.checkDownload({"multi-dl": re.compile(self.ERR_PARDL_PATTERN)}) self.longWait(5 * 60, 12) - return super(EuroshareEu, self).checkFile(rules) + return super(EuroshareEu, self).checkFile() getInfo = create_getInfo(EuroshareEu) -- cgit v1.2.3 From c1764e2fea0bb05164c83a876e8cd58b97f58f25 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 16 Jun 2015 17:31:38 +0200 Subject: Update all --- module/plugins/hoster/EuroshareEu.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/hoster/EuroshareEu.py') diff --git a/module/plugins/hoster/EuroshareEu.py b/module/plugins/hoster/EuroshareEu.py index 857faebc5..c4bd54667 100644 --- a/module/plugins/hoster/EuroshareEu.py +++ b/module/plugins/hoster/EuroshareEu.py @@ -49,7 +49,7 @@ class EuroshareEu(SimpleHoster): def handleFree(self, pyfile): if re.search(self.ERR_PARDL_PATTERN, self.html): - self.longWait(5 * 60, 12) + self.wait(5 * 60, 12, _("Download limit reached")) m = re.search(self.LINK_FREE_PATTERN, self.html) if m is None: @@ -60,7 +60,7 @@ class EuroshareEu(SimpleHoster): def checkFile(self): if self.checkDownload({"multi-dl": re.compile(self.ERR_PARDL_PATTERN)}) - self.longWait(5 * 60, 12) + self.wait(5 * 60, 12, _("Download limit reached")) return super(EuroshareEu, self).checkFile() -- cgit v1.2.3 From d99d6eddb6af637580bb6fc72013f913077525d6 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Wed, 17 Jun 2015 11:23:08 +0200 Subject: Spare fixes --- module/plugins/hoster/EuroshareEu.py | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) (limited to 'module/plugins/hoster/EuroshareEu.py') diff --git a/module/plugins/hoster/EuroshareEu.py b/module/plugins/hoster/EuroshareEu.py index c4bd54667..deb138ec7 100644 --- a/module/plugins/hoster/EuroshareEu.py +++ b/module/plugins/hoster/EuroshareEu.py @@ -23,20 +23,20 @@ class EuroshareEu(SimpleHoster): LINK_FREE_PATTERN = r'
Prebieha s.ahovanie|

Naraz je z jednej IP adresy mo.n. s.ahova. iba jeden s.bor' - ERR_NOT_LOGGED_IN_PATTERN = r'href="/customer-zone/login/"' + DL_LIMIT_PATTERN = r'

Prebieha s.ahovanie

|

Naraz je z jednej IP adresy mo.n. s.ahova. iba jeden s.bor' + ERROR_PATTERN = r'href="/customer-zone/login/"' URL_REPLACEMENTS = [(r"(http://[^/]*\.)(sk|cz|hu|pl)/", r"\1eu/")] def handlePremium(self, pyfile): - if self.ERR_NOT_LOGGED_IN_PATTERN in self.html: + if self.ERROR_PATTERN in self.html: self.account.relogin(self.user) self.retry(reason=_("User not logged in")) self.link = pyfile.url.rstrip('/') + "/download/" - check = self.checkDownload({"login": re.compile(self.ERR_NOT_LOGGED_IN_PATTERN), + check = self.checkDownload({"login": re.compile(self.ERROR_PATTERN), "json" : re.compile(r'\{"status":"error".*?"message":"(.*?)"')}) if check == "login" or (check == "json" and self.lastCheck.group(1) == "Access token expired"): @@ -48,7 +48,7 @@ class EuroshareEu(SimpleHoster): def handleFree(self, pyfile): - if re.search(self.ERR_PARDL_PATTERN, self.html): + if re.search(self.DL_LIMIT_PATTERN, self.html): self.wait(5 * 60, 12, _("Download limit reached")) m = re.search(self.LINK_FREE_PATTERN, self.html) @@ -58,11 +58,4 @@ class EuroshareEu(SimpleHoster): self.link = "http://euroshare.eu%s" % m.group(1) - def checkFile(self): - if self.checkDownload({"multi-dl": re.compile(self.ERR_PARDL_PATTERN)}) - self.wait(5 * 60, 12, _("Download limit reached")) - - return super(EuroshareEu, self).checkFile() - - getInfo = create_getInfo(EuroshareEu) -- cgit v1.2.3 From b1759bc440cd6013837697eb8de540914f693ffd Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 7 Jul 2015 01:23:55 +0200 Subject: No camelCase style anymore --- module/plugins/hoster/EuroshareEu.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'module/plugins/hoster/EuroshareEu.py') diff --git a/module/plugins/hoster/EuroshareEu.py b/module/plugins/hoster/EuroshareEu.py index deb138ec7..4401391a9 100644 --- a/module/plugins/hoster/EuroshareEu.py +++ b/module/plugins/hoster/EuroshareEu.py @@ -8,7 +8,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class EuroshareEu(SimpleHoster): __name__ = "EuroshareEu" __type__ = "hoster" - __version__ = "0.29" + __version__ = "0.30" __pattern__ = r'http://(?:www\.)?euroshare\.(eu|sk|cz|hu|pl)/file/.+' __config__ = [("use_premium", "bool", "Use premium account if available", True)] @@ -29,25 +29,25 @@ class EuroshareEu(SimpleHoster): URL_REPLACEMENTS = [(r"(http://[^/]*\.)(sk|cz|hu|pl)/", r"\1eu/")] - def handlePremium(self, pyfile): + def handle_premium(self, pyfile): if self.ERROR_PATTERN in self.html: self.account.relogin(self.user) self.retry(reason=_("User not logged in")) self.link = pyfile.url.rstrip('/') + "/download/" - check = self.checkDownload({"login": re.compile(self.ERROR_PATTERN), + check = self.check_download({"login": re.compile(self.ERROR_PATTERN), "json" : re.compile(r'\{"status":"error".*?"message":"(.*?)"')}) - if check == "login" or (check == "json" and self.lastCheck.group(1) == "Access token expired"): + if check == "login" or (check == "json" and self.last_check.group(1) == "Access token expired"): self.account.relogin(self.user) self.retry(reason=_("Access token expired")) elif check == "json": - self.fail(self.lastCheck.group(1)) + self.fail(self.last_check.group(1)) - def handleFree(self, pyfile): + def handle_free(self, pyfile): if re.search(self.DL_LIMIT_PATTERN, self.html): self.wait(5 * 60, 12, _("Download limit reached")) -- cgit v1.2.3 From ff9383bfe06d14d23bc0ed6af79aa8967965d078 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 19 Jul 2015 10:59:52 +0200 Subject: Code cosmetics (3) --- module/plugins/hoster/EuroshareEu.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/hoster/EuroshareEu.py') diff --git a/module/plugins/hoster/EuroshareEu.py b/module/plugins/hoster/EuroshareEu.py index 4401391a9..b17322e6a 100644 --- a/module/plugins/hoster/EuroshareEu.py +++ b/module/plugins/hoster/EuroshareEu.py @@ -36,8 +36,8 @@ class EuroshareEu(SimpleHoster): self.link = pyfile.url.rstrip('/') + "/download/" - check = self.check_download({"login": re.compile(self.ERROR_PATTERN), - "json" : re.compile(r'\{"status":"error".*?"message":"(.*?)"')}) + check = self.check_download({'login': re.compile(self.ERROR_PATTERN), + 'json' : re.compile(r'\{"status":"error".*?"message":"(.*?)"')}) if check == "login" or (check == "json" and self.last_check.group(1) == "Access token expired"): self.account.relogin(self.user) -- cgit v1.2.3 From d38e830b7c0b3c6561a0072c74bbccb5fcdf4a61 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 19 Jul 2015 14:43:42 +0200 Subject: New __status__ magic key --- module/plugins/hoster/EuroshareEu.py | 1 + 1 file changed, 1 insertion(+) (limited to 'module/plugins/hoster/EuroshareEu.py') diff --git a/module/plugins/hoster/EuroshareEu.py b/module/plugins/hoster/EuroshareEu.py index b17322e6a..3aea94558 100644 --- a/module/plugins/hoster/EuroshareEu.py +++ b/module/plugins/hoster/EuroshareEu.py @@ -9,6 +9,7 @@ class EuroshareEu(SimpleHoster): __name__ = "EuroshareEu" __type__ = "hoster" __version__ = "0.30" + __status__ = "stable" __pattern__ = r'http://(?:www\.)?euroshare\.(eu|sk|cz|hu|pl)/file/.+' __config__ = [("use_premium", "bool", "Use premium account if available", True)] -- cgit v1.2.3 From 94d017cd2a5c1f194960827a8c7e46afc3682008 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 24 Jul 2015 06:55:49 +0200 Subject: Hotfixes (2) --- module/plugins/hoster/EuroshareEu.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hoster/EuroshareEu.py') diff --git a/module/plugins/hoster/EuroshareEu.py b/module/plugins/hoster/EuroshareEu.py index 3aea94558..53ac9ff06 100644 --- a/module/plugins/hoster/EuroshareEu.py +++ b/module/plugins/hoster/EuroshareEu.py @@ -9,7 +9,7 @@ class EuroshareEu(SimpleHoster): __name__ = "EuroshareEu" __type__ = "hoster" __version__ = "0.30" - __status__ = "stable" + __status__ = "testing" __pattern__ = r'http://(?:www\.)?euroshare\.(eu|sk|cz|hu|pl)/file/.+' __config__ = [("use_premium", "bool", "Use premium account if available", True)] -- cgit v1.2.3