From 7a7e3e211e36af06d00e0effbcc37ac59e152427 Mon Sep 17 00:00:00 2001 From: synweap15 Date: Tue, 8 Jul 2014 20:00:23 +0200 Subject: nopremium.pl files added --- module/plugins/hoster/NoPremiumPl.py | 132 +++++++++++++++++++++++++++++++++++ 1 file changed, 132 insertions(+) create mode 100644 module/plugins/hoster/NoPremiumPl.py (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/NoPremiumPl.py b/module/plugins/hoster/NoPremiumPl.py new file mode 100644 index 000000000..7f61261b9 --- /dev/null +++ b/module/plugins/hoster/NoPremiumPl.py @@ -0,0 +1,132 @@ +# !/usr/bin/env python +# -*- coding: utf-8 -*- + +""" +@author: Pawel W. +""" + +try: + from json import loads, dumps +except ImportError: + from simplejson import loads + +from module.plugins.internal.SimpleHoster import SimpleHoster + + +class NoPremiumPl(SimpleHoster): + + __name__ = "NoPremiumPl" + __version__ = "0.01" + __type__ = "hoster" + + __description__ = "NoPremium.pl hoster plugin" + __author_name__ = ("goddie") + __author_mail__ = ("dev@nopremium.pl") + + _api_url = "http://crypt.nopremium.pl" + + _api_query = {"site": "nopremium", + "output": "json", + "username": "", + "password": "", + "url": ""} + + _usr = False + _pwd = False + + def setup(self): + + self.resumeDownload = True + self.multiDL = True + + def get_username_password(self): + + if not self.account: + + self.fail("[NoPremium.pl] Zaloguj się we wtyczce NoPremium.pl lub ją wyłącz") + + else: + + self._usr = self.account.getAccountData(self.user).get('usr') + self._pwd = self.account.getAccountData(self.user).get('pwd') + + def runFileQuery(self, url, mode=None): + + query = self._api_query.copy() + + query["username"] = self._usr + query["password"] = self._pwd + + query["url"] = url + + if mode == "fileinfo": + query['check'] = 2 + query['loc'] = 1 + + self.logDebug(query) + + return self.load(self._api_url, post=query) + + def process(self, pyfile): + + self.get_username_password() + + try: + data = self.runFileQuery(pyfile.url, 'fileinfo') + except Exception as e: + self.logDebug(str(e)) + self.tempOffline() + + try: + parsed = loads(data) + except Exception as e: + self.logDebug(str(e)) + self.tempOffline() + + self.logDebug(parsed) + + if "errno" in parsed.keys(): + + if parsed["errno"] == 0: + self.fail("[NoPremium.pl] Niepoprawne dane logowania") + + elif parsed["errno"] == 80: + self.fail("[NoPremium.pl] Zbyt dużo niepoprawnych logowań, konto zablokowane na 24h") + + elif parsed["errno"] == 1: + self.fail("[NoPremium.pl] Za mało transferu - doładuj aby pobrać") + + elif parsed["errno"] == 9: + self.fail("[NoPremium.pl] Konto wygasło") + + elif parsed["errno"] == 2: + self.fail("[NoPremium.pl] Niepoprawny / wygasły link") + + elif parsed["errno"] == 3: + self.fail("[NoPremium.pl] Błąd łączenia z hostingiem") + + elif parsed["errno"] == 15: + self.fail("[NoPremium.pl] Hosting nie jest już wspierany") + + else: + self.fail( + parsed["errstring"] + or "Nieznany błąd (kod: {})".format(parsed["errno"]) + ) + + if "sdownload" in parsed: + if parsed["sdownload"] == "1": + self.fail( + "Pobieranie z {} jest możliwe tylko przy bezpośrednim użyciu \ + NoPremium.pl. Zaktualizuj wtyczkę.".format(parsed["hosting"])) + + pyfile.name = parsed["filename"] + pyfile.size = parsed["filesize"] + + try: + result_dl = self.runFileQuery(pyfile.url, 'filedownload') + except Exception as e: + self.logDebug(str(e)) + self.tempOffline() + + self.download(result_dl, disposition=True) -- cgit v1.2.3 From 2404538888ced4e6964df55823d0514b1c0ba685 Mon Sep 17 00:00:00 2001 From: synweap15 Date: Tue, 8 Jul 2014 20:03:27 +0200 Subject: rapideo.pl files added --- module/plugins/hoster/RapideoPl.py | 132 +++++++++++++++++++++++++++++++++++++ 1 file changed, 132 insertions(+) create mode 100644 module/plugins/hoster/RapideoPl.py (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/RapideoPl.py b/module/plugins/hoster/RapideoPl.py new file mode 100644 index 000000000..4d497faa9 --- /dev/null +++ b/module/plugins/hoster/RapideoPl.py @@ -0,0 +1,132 @@ +# !/usr/bin/env python +# -*- coding: utf-8 -*- + +""" +@author: Pawel W. +""" + +try: + from json import loads, dumps +except ImportError: + from simplejson import loads + +from module.plugins.internal.SimpleHoster import SimpleHoster + + +class RapideoPl(SimpleHoster): + + __name__ = "RapideoPl" + __version__ = "0.01" + __type__ = "hoster" + + __description__ = "Rapideo.pl hoster plugin" + __author_name__ = ("goddie") + __author_mail__ = ("dev@rapideo.pl") + + _api_url = "http://enc.rapideo.pl" + + _api_query = {"site": "newrd", + "output": "json", + "username": "", + "password": "", + "url": ""} + + _usr = False + _pwd = False + + def setup(self): + + self.resumeDownload = True + self.multiDL = True + + def get_username_password(self): + + if not self.account: + + self.fail("[Rapideo.pl] Login to Rapideo.pl plugin or turn plugin off") + + else: + + self._usr = self.account.getAccountData(self.user).get('usr') + self._pwd = self.account.getAccountData(self.user).get('pwd') + + def runFileQuery(self, url, mode=None): + + query = self._api_query.copy() + + query["username"] = self._usr + query["password"] = self._pwd + + query["url"] = url + + if mode == "fileinfo": + query['check'] = 2 + query['loc'] = 1 + + self.logDebug(query) + + return self.load(self._api_url, post=query) + + def process(self, pyfile): + + self.get_username_password() + + try: + data = self.runFileQuery(pyfile.url, 'fileinfo') + except Exception as e: + self.logDebug(str(e)) + self.tempOffline() + + try: + parsed = loads(data) + except Exception as e: + self.logDebug(str(e)) + self.tempOffline() + + self.logDebug(parsed) + + if "errno" in parsed.keys(): + + if parsed["errno"] == 0: + self.fail("[Rapideo.pl] Invalid account credentials") + + elif parsed["errno"] == 80: + self.fail("[Rapideo.pl] Too much incorrect login attempts, account blocked for 24h") + + elif parsed["errno"] == 1: + self.fail("[Rapideo.pl] Not enough transfer - top up to download") + + elif parsed["errno"] == 9: + self.fail("[Rapideo.pl] Account expired") + + elif parsed["errno"] == 2: + self.fail("[Rapideo.pl] Invalid / dead link") + + elif parsed["errno"] == 3: + self.fail("[Rapideo.pl] Error connecting to host") + + elif parsed["errno"] == 15: + self.fail("[Rapideo.pl] Hosting no longer supported") + + else: + self.fail( + parsed["errstring"] + or "Unknown error (code: {})".format(parsed["errno"]) + ) + + if "sdownload" in parsed: + if parsed["sdownload"] == "1": + self.fail( + "Download from {} is possible only when using \ + Rapideo.pl directly. Update this plugin.".format(parsed["hosting"])) + + pyfile.name = parsed["filename"] + pyfile.size = parsed["filesize"] + + try: + result_dl = self.runFileQuery(pyfile.url, 'filedownload') + except Exception as e: + self.logDebug(str(e)) + self.tempOffline() + + self.download(result_dl, disposition=True) -- cgit v1.2.3 From ccf15e75c12ad1e8347fdff834f8c62e5e2ab617 Mon Sep 17 00:00:00 2001 From: synweap15 Date: Tue, 8 Jul 2014 21:33:01 +0200 Subject: remove redundant author information --- module/plugins/hoster/NoPremiumPl.py | 4 ---- 1 file changed, 4 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/NoPremiumPl.py b/module/plugins/hoster/NoPremiumPl.py index 7f61261b9..b324dff84 100644 --- a/module/plugins/hoster/NoPremiumPl.py +++ b/module/plugins/hoster/NoPremiumPl.py @@ -1,10 +1,6 @@ # !/usr/bin/env python # -*- coding: utf-8 -*- -""" -@author: Pawel W. -""" - try: from json import loads, dumps except ImportError: -- cgit v1.2.3 From ea1cbeda0006bbf427223686892c9e6f87cfbe94 Mon Sep 17 00:00:00 2001 From: synweap15 Date: Tue, 8 Jul 2014 21:36:14 +0200 Subject: remove redundant author information --- module/plugins/hoster/RapideoPl.py | 4 ---- 1 file changed, 4 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/RapideoPl.py b/module/plugins/hoster/RapideoPl.py index 4d497faa9..4f23bc4a9 100644 --- a/module/plugins/hoster/RapideoPl.py +++ b/module/plugins/hoster/RapideoPl.py @@ -1,10 +1,6 @@ # !/usr/bin/env python # -*- coding: utf-8 -*- -""" -@author: Pawel W. -""" - try: from json import loads, dumps except ImportError: -- cgit v1.2.3 From 2ed13d51ab8cd28f2f3db4caabde9b6d2e2cec25 Mon Sep 17 00:00:00 2001 From: synweap15 Date: Wed, 9 Jul 2014 11:55:23 +0200 Subject: remove enviroment line --- module/plugins/hoster/RapideoPl.py | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/RapideoPl.py b/module/plugins/hoster/RapideoPl.py index 4f23bc4a9..b7deaa8ed 100644 --- a/module/plugins/hoster/RapideoPl.py +++ b/module/plugins/hoster/RapideoPl.py @@ -1,4 +1,3 @@ -# !/usr/bin/env python # -*- coding: utf-8 -*- try: @@ -10,11 +9,9 @@ from module.plugins.internal.SimpleHoster import SimpleHoster class RapideoPl(SimpleHoster): - __name__ = "RapideoPl" __version__ = "0.01" __type__ = "hoster" - __description__ = "Rapideo.pl hoster plugin" __author_name__ = ("goddie") __author_mail__ = ("dev@rapideo.pl") @@ -31,28 +28,20 @@ class RapideoPl(SimpleHoster): _pwd = False def setup(self): - self.resumeDownload = True self.multiDL = True def get_username_password(self): - if not self.account: - self.fail("[Rapideo.pl] Login to Rapideo.pl plugin or turn plugin off") - else: - self._usr = self.account.getAccountData(self.user).get('usr') self._pwd = self.account.getAccountData(self.user).get('pwd') def runFileQuery(self, url, mode=None): - query = self._api_query.copy() - query["username"] = self._usr query["password"] = self._pwd - query["url"] = url if mode == "fileinfo": @@ -60,7 +49,6 @@ class RapideoPl(SimpleHoster): query['loc'] = 1 self.logDebug(query) - return self.load(self._api_url, post=query) def process(self, pyfile): -- cgit v1.2.3 From e325412cd71ae329f3f0b7084e5989e6ffbdbd18 Mon Sep 17 00:00:00 2001 From: synweap15 Date: Wed, 9 Jul 2014 11:57:05 +0200 Subject: remove enviroment line --- module/plugins/hoster/NoPremiumPl.py | 1 - 1 file changed, 1 deletion(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/NoPremiumPl.py b/module/plugins/hoster/NoPremiumPl.py index b324dff84..7665e589f 100644 --- a/module/plugins/hoster/NoPremiumPl.py +++ b/module/plugins/hoster/NoPremiumPl.py @@ -1,4 +1,3 @@ -# !/usr/bin/env python # -*- coding: utf-8 -*- try: -- cgit v1.2.3 From 352301e4892d311d1a4cf6127f6bc70bc23eede3 Mon Sep 17 00:00:00 2001 From: synweap15 Date: Wed, 9 Jul 2014 12:02:59 +0200 Subject: remove blank lines and unused imports --- module/plugins/hoster/NoPremiumPl.py | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/NoPremiumPl.py b/module/plugins/hoster/NoPremiumPl.py index 7665e589f..bd5260a55 100644 --- a/module/plugins/hoster/NoPremiumPl.py +++ b/module/plugins/hoster/NoPremiumPl.py @@ -9,7 +9,6 @@ from module.plugins.internal.SimpleHoster import SimpleHoster class NoPremiumPl(SimpleHoster): - __name__ = "NoPremiumPl" __version__ = "0.01" __type__ = "hoster" @@ -30,42 +29,31 @@ class NoPremiumPl(SimpleHoster): _pwd = False def setup(self): - self.resumeDownload = True self.multiDL = True def get_username_password(self): - if not self.account: - self.fail("[NoPremium.pl] Zaloguj się we wtyczce NoPremium.pl lub ją wyłącz") - else: - self._usr = self.account.getAccountData(self.user).get('usr') self._pwd = self.account.getAccountData(self.user).get('pwd') def runFileQuery(self, url, mode=None): - query = self._api_query.copy() - query["username"] = self._usr query["password"] = self._pwd - query["url"] = url if mode == "fileinfo": query['check'] = 2 query['loc'] = 1 - self.logDebug(query) return self.load(self._api_url, post=query) def process(self, pyfile): - self.get_username_password() - try: data = self.runFileQuery(pyfile.url, 'fileinfo') except Exception as e: -- cgit v1.2.3 From ce18793af9864acdf9e9c71b7324d923a53adaad Mon Sep 17 00:00:00 2001 From: synweap15 Date: Wed, 9 Jul 2014 12:05:22 +0200 Subject: fix json loads, dumps on ImportError exception --- module/plugins/hoster/NoPremiumPl.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/NoPremiumPl.py b/module/plugins/hoster/NoPremiumPl.py index bd5260a55..86255f95a 100644 --- a/module/plugins/hoster/NoPremiumPl.py +++ b/module/plugins/hoster/NoPremiumPl.py @@ -3,7 +3,8 @@ try: from json import loads, dumps except ImportError: - from simplejson import loads + from module.common.json_layer import json_loads as loads + from module.common.json_layer import json_dumps as dumps from module.plugins.internal.SimpleHoster import SimpleHoster -- cgit v1.2.3 From dfd5cb44138494b803f66559747cacc1260b5595 Mon Sep 17 00:00:00 2001 From: synweap15 Date: Wed, 9 Jul 2014 12:15:03 +0200 Subject: simplify json loads, replace crypto with hashlib --- module/plugins/hoster/NoPremiumPl.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/NoPremiumPl.py b/module/plugins/hoster/NoPremiumPl.py index 86255f95a..39e5b435c 100644 --- a/module/plugins/hoster/NoPremiumPl.py +++ b/module/plugins/hoster/NoPremiumPl.py @@ -1,11 +1,6 @@ # -*- coding: utf-8 -*- -try: - from json import loads, dumps -except ImportError: - from module.common.json_layer import json_loads as loads - from module.common.json_layer import json_dumps as dumps - +from module.common.json_layer import json_loads as loads from module.plugins.internal.SimpleHoster import SimpleHoster -- cgit v1.2.3 From e6912eb377069cd8e28d293c2e1cb85ab4d4e986 Mon Sep 17 00:00:00 2001 From: synweap15 Date: Wed, 9 Jul 2014 12:38:17 +0200 Subject: fail messages localization and dictionary --- module/plugins/hoster/NoPremiumPl.py | 44 +++++++++++++++--------------------- 1 file changed, 18 insertions(+), 26 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/NoPremiumPl.py b/module/plugins/hoster/NoPremiumPl.py index 39e5b435c..2b6d2aa35 100644 --- a/module/plugins/hoster/NoPremiumPl.py +++ b/module/plugins/hoster/NoPremiumPl.py @@ -21,6 +21,16 @@ class NoPremiumPl(SimpleHoster): "password": "", "url": ""} + _error_codes = { + 0: "[%s] Incorrect login credentials", + 1: "[%s] Not enough transfer to download - top-up your account", + 2: "[%s] Incorrect / dead link", + 3: "[%s] Error connecting to hosting, try again later", + 9: "[%s] Premium account has expired", + 15: "[%s] Hosting no longer supported", + 80: "[%s] Too many incorrect login attempts, account blocked for 24h" + } + _usr = False _pwd = False @@ -30,7 +40,7 @@ class NoPremiumPl(SimpleHoster): def get_username_password(self): if not self.account: - self.fail("[NoPremium.pl] Zaloguj się we wtyczce NoPremium.pl lub ją wyłącz") + self.fail(_("Please enter your %s account or deactivate this plugin") % "NoPremium.pl") else: self._usr = self.account.getAccountData(self.user).get('usr') self._pwd = self.account.getAccountData(self.user).get('pwd') @@ -65,39 +75,21 @@ class NoPremiumPl(SimpleHoster): self.logDebug(parsed) if "errno" in parsed.keys(): - - if parsed["errno"] == 0: - self.fail("[NoPremium.pl] Niepoprawne dane logowania") - - elif parsed["errno"] == 80: - self.fail("[NoPremium.pl] Zbyt dużo niepoprawnych logowań, konto zablokowane na 24h") - - elif parsed["errno"] == 1: - self.fail("[NoPremium.pl] Za mało transferu - doładuj aby pobrać") - - elif parsed["errno"] == 9: - self.fail("[NoPremium.pl] Konto wygasło") - - elif parsed["errno"] == 2: - self.fail("[NoPremium.pl] Niepoprawny / wygasły link") - - elif parsed["errno"] == 3: - self.fail("[NoPremium.pl] Błąd łączenia z hostingiem") - - elif parsed["errno"] == 15: - self.fail("[NoPremium.pl] Hosting nie jest już wspierany") - + if parsed["errno"] in self._error_codes: + # error code in known + self.fail(self._error_codes[parsed["errno"]] % self.__name__) else: + # error code isn't yet added to plugin self.fail( parsed["errstring"] - or "Nieznany błąd (kod: {})".format(parsed["errno"]) + or "Unknown error (code: %s)" % parsed["errno"] ) if "sdownload" in parsed: if parsed["sdownload"] == "1": self.fail( - "Pobieranie z {} jest możliwe tylko przy bezpośrednim użyciu \ - NoPremium.pl. Zaktualizuj wtyczkę.".format(parsed["hosting"])) + "Download from %s is possible only using NoPremium.pl webiste \ + directly. Update this plugin." % parsed["hosting"]) pyfile.name = parsed["filename"] pyfile.size = parsed["filesize"] -- cgit v1.2.3 From 1b0dad0b60b155a3629b705c44bbbd45aa3a1cf6 Mon Sep 17 00:00:00 2001 From: synweap15 Date: Wed, 9 Jul 2014 12:48:29 +0200 Subject: nopremium link pattern --- module/plugins/hoster/NoPremiumPl.py | 1 + 1 file changed, 1 insertion(+) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/NoPremiumPl.py b/module/plugins/hoster/NoPremiumPl.py index 2b6d2aa35..51e171f7a 100644 --- a/module/plugins/hoster/NoPremiumPl.py +++ b/module/plugins/hoster/NoPremiumPl.py @@ -9,6 +9,7 @@ class NoPremiumPl(SimpleHoster): __version__ = "0.01" __type__ = "hoster" + __pattern__ = r"https?://direct\.nopremium\.pl.*" __description__ = "NoPremium.pl hoster plugin" __author_name__ = ("goddie") __author_mail__ = ("dev@nopremium.pl") -- cgit v1.2.3 From 2e8ed2bf0b357e907f6921c7bb88719bb347367b Mon Sep 17 00:00:00 2001 From: synweap15 Date: Wed, 9 Jul 2014 13:47:49 +0200 Subject: remove blank lines and unused imports --- module/plugins/hoster/RapideoPl.py | 2 -- 1 file changed, 2 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/RapideoPl.py b/module/plugins/hoster/RapideoPl.py index b7deaa8ed..587b00bca 100644 --- a/module/plugins/hoster/RapideoPl.py +++ b/module/plugins/hoster/RapideoPl.py @@ -52,9 +52,7 @@ class RapideoPl(SimpleHoster): return self.load(self._api_url, post=query) def process(self, pyfile): - self.get_username_password() - try: data = self.runFileQuery(pyfile.url, 'fileinfo') except Exception as e: -- cgit v1.2.3 From 25d2cceff065a0268a7e183449ef54edf98f1783 Mon Sep 17 00:00:00 2001 From: synweap15 Date: Wed, 9 Jul 2014 13:49:12 +0200 Subject: simplify json loads, replace crypto with hashlib --- module/plugins/hoster/RapideoPl.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/RapideoPl.py b/module/plugins/hoster/RapideoPl.py index 587b00bca..d64919ae0 100644 --- a/module/plugins/hoster/RapideoPl.py +++ b/module/plugins/hoster/RapideoPl.py @@ -1,10 +1,6 @@ # -*- coding: utf-8 -*- -try: - from json import loads, dumps -except ImportError: - from simplejson import loads - +from module.common.json_layer import json_loads as loads from module.plugins.internal.SimpleHoster import SimpleHoster -- cgit v1.2.3 From 4ef0c28e60efa92b0113c748afe5383e7cf432fd Mon Sep 17 00:00:00 2001 From: synweap15 Date: Wed, 9 Jul 2014 14:04:16 +0200 Subject: fail messages localization and dictionary --- module/plugins/hoster/RapideoPl.py | 44 ++++++++++++++++---------------------- 1 file changed, 18 insertions(+), 26 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/RapideoPl.py b/module/plugins/hoster/RapideoPl.py index d64919ae0..1047b1002 100644 --- a/module/plugins/hoster/RapideoPl.py +++ b/module/plugins/hoster/RapideoPl.py @@ -20,6 +20,16 @@ class RapideoPl(SimpleHoster): "password": "", "url": ""} + _error_codes = { + 0: "[%s] Incorrect login credentials", + 1: "[%s] Not enough transfer to download - top-up your account", + 2: "[%s] Incorrect / dead link", + 3: "[%s] Error connecting to hosting, try again later", + 9: "[%s] Premium account has expired", + 15: "[%s] Hosting no longer supported", + 80: "[%s] Too many incorrect login attempts, account blocked for 24h" + } + _usr = False _pwd = False @@ -29,7 +39,7 @@ class RapideoPl(SimpleHoster): def get_username_password(self): if not self.account: - self.fail("[Rapideo.pl] Login to Rapideo.pl plugin or turn plugin off") + self.fail(_("Please enter your %s account or deactivate this plugin") % "Rapideo.pl") else: self._usr = self.account.getAccountData(self.user).get('usr') self._pwd = self.account.getAccountData(self.user).get('pwd') @@ -64,39 +74,21 @@ class RapideoPl(SimpleHoster): self.logDebug(parsed) if "errno" in parsed.keys(): - - if parsed["errno"] == 0: - self.fail("[Rapideo.pl] Invalid account credentials") - - elif parsed["errno"] == 80: - self.fail("[Rapideo.pl] Too much incorrect login attempts, account blocked for 24h") - - elif parsed["errno"] == 1: - self.fail("[Rapideo.pl] Not enough transfer - top up to download") - - elif parsed["errno"] == 9: - self.fail("[Rapideo.pl] Account expired") - - elif parsed["errno"] == 2: - self.fail("[Rapideo.pl] Invalid / dead link") - - elif parsed["errno"] == 3: - self.fail("[Rapideo.pl] Error connecting to host") - - elif parsed["errno"] == 15: - self.fail("[Rapideo.pl] Hosting no longer supported") - + if parsed["errno"] in self._error_codes: + # error code in known + self.fail(self._error_codes[parsed["errno"]] % self.__name__) else: + # error code isn't yet added to plugin self.fail( parsed["errstring"] - or "Unknown error (code: {})".format(parsed["errno"]) + or "Unknown error (code: %s)" % parsed["errno"] ) if "sdownload" in parsed: if parsed["sdownload"] == "1": self.fail( - "Download from {} is possible only when using \ - Rapideo.pl directly. Update this plugin.".format(parsed["hosting"])) + "Download from %s is possible only using Rapideo.pl webiste \ + directly. Update this plugin." % parsed["hosting"]) pyfile.name = parsed["filename"] pyfile.size = parsed["filesize"] -- cgit v1.2.3 From 0824528da43d0842c15ffa0d4fe132309ca592eb Mon Sep 17 00:00:00 2001 From: synweap15 Date: Wed, 9 Jul 2014 14:05:40 +0200 Subject: newline fix --- module/plugins/hoster/NoPremiumPl.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/NoPremiumPl.py b/module/plugins/hoster/NoPremiumPl.py index 51e171f7a..636220ca7 100644 --- a/module/plugins/hoster/NoPremiumPl.py +++ b/module/plugins/hoster/NoPremiumPl.py @@ -1,8 +1,7 @@ # -*- coding: utf-8 -*- -from module.common.json_layer import json_loads as loads from module.plugins.internal.SimpleHoster import SimpleHoster - +from module.common.json_layer import json_loads as loads class NoPremiumPl(SimpleHoster): __name__ = "NoPremiumPl" -- cgit v1.2.3 From 307523821d61811032bd3a2f6f9e6661fdc489ca Mon Sep 17 00:00:00 2001 From: synweap15 Date: Wed, 9 Jul 2014 14:05:53 +0200 Subject: newline fix --- module/plugins/hoster/NoPremiumPl.py | 1 + 1 file changed, 1 insertion(+) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/NoPremiumPl.py b/module/plugins/hoster/NoPremiumPl.py index 636220ca7..f43292156 100644 --- a/module/plugins/hoster/NoPremiumPl.py +++ b/module/plugins/hoster/NoPremiumPl.py @@ -3,6 +3,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster from module.common.json_layer import json_loads as loads + class NoPremiumPl(SimpleHoster): __name__ = "NoPremiumPl" __version__ = "0.01" -- cgit v1.2.3 From 36b5bfedc2e57bd000831559ca8fb4d7e7899e24 Mon Sep 17 00:00:00 2001 From: tjeh Date: Sun, 20 Jul 2014 21:49:27 +0200 Subject: Added support for Multihosters.com multihoster. --- module/plugins/hoster/MultihostersCom.py | 41 ++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 module/plugins/hoster/MultihostersCom.py (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/MultihostersCom.py b/module/plugins/hoster/MultihostersCom.py new file mode 100644 index 000000000..04192cd8e --- /dev/null +++ b/module/plugins/hoster/MultihostersCom.py @@ -0,0 +1,41 @@ +# -*- coding: utf-8 -*- + +import re +from module.plugins.Hoster import Hoster + +class MultihostersCom(Hoster): + __name__ = "MultihostersCom" + __version__ = "0.01" + __type__ = "hoster" + __pattern__ = r'http://(?:www\.)?multihosters.com/.*' + __description__ = """Multihosters.com hoster plugin""" + __author_name__ = "tjeh" + __author_mail__ = "tjeh@gmx.net" + + def setup(self): + self.resumeDownload = self.multiDL = True + self.chunkLimit = 1 + + def process(self, pyfile): + if re.match(self.__pattern__, pyfile.url): + new_url = pyfile.url + elif not self.account: + self.logError(("Please enter your %s account or deactivate this plugin") % "multihosters.com") + self.fail("No multihosters.com account provided") + else: + self.logDebug("Old URL: %s" % pyfile.url) + new_url = "http://multihosters.com/getFiles.aspx?ourl=" + pyfile.url + pyfile.url = new_url + self.logDebug("New URL: %s" % new_url) + + if self.account.getAPIData(self.req, cmd="checklink", olink=pyfile.url) != "Alive": + self.fail("Offline or not downloadable - contact Multihosters support") + + header = self.account.getAPIData(self.req, just_header=True, cmd="generatedownloaddirect", olink=pyfile.url) + if not "location" in header: + self.fail("Unable to initialize download - contact Multihosters support") + self.download(header['location'], disposition=True) + + check = self.checkDownload({"error": 'action="ErrorDownload.aspx'}) + if check == "error": + self.fail("Error response received - contact Multihosters support") -- cgit v1.2.3 From 1e90f0a46b7fd0f1d9376ea966e1650afa782c37 Mon Sep 17 00:00:00 2001 From: synweap15 Date: Tue, 16 Sep 2014 23:20:17 +0200 Subject: fix to work with python 2.5 --- module/plugins/hoster/RapideoPl.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/RapideoPl.py b/module/plugins/hoster/RapideoPl.py index 1047b1002..0c46c0593 100644 --- a/module/plugins/hoster/RapideoPl.py +++ b/module/plugins/hoster/RapideoPl.py @@ -61,14 +61,14 @@ class RapideoPl(SimpleHoster): self.get_username_password() try: data = self.runFileQuery(pyfile.url, 'fileinfo') - except Exception as e: - self.logDebug(str(e)) + except Exception: + self.logDebug("RunFileQuery error") self.tempOffline() try: parsed = loads(data) - except Exception as e: - self.logDebug(str(e)) + except Exception: + self.logDebug("Loads error") self.tempOffline() self.logDebug(parsed) @@ -95,8 +95,8 @@ class RapideoPl(SimpleHoster): try: result_dl = self.runFileQuery(pyfile.url, 'filedownload') - except Exception as e: - self.logDebug(str(e)) + except Exception: + self.logDebug("runFileQuery error #2") self.tempOffline() self.download(result_dl, disposition=True) -- cgit v1.2.3 From 542bb076b6a51c779f73249b02ffb5fae6950841 Mon Sep 17 00:00:00 2001 From: synweap15 Date: Tue, 16 Sep 2014 23:21:57 +0200 Subject: fix to work with python 2.5 --- module/plugins/hoster/NoPremiumPl.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/NoPremiumPl.py b/module/plugins/hoster/NoPremiumPl.py index f43292156..1bdd6eda0 100644 --- a/module/plugins/hoster/NoPremiumPl.py +++ b/module/plugins/hoster/NoPremiumPl.py @@ -63,14 +63,14 @@ class NoPremiumPl(SimpleHoster): self.get_username_password() try: data = self.runFileQuery(pyfile.url, 'fileinfo') - except Exception as e: - self.logDebug(str(e)) + except Exception: + self.logDebug("runFileQuery error") self.tempOffline() try: parsed = loads(data) - except Exception as e: - self.logDebug(str(e)) + except Exception: + self.logDebug("loads error") self.tempOffline() self.logDebug(parsed) @@ -97,8 +97,8 @@ class NoPremiumPl(SimpleHoster): try: result_dl = self.runFileQuery(pyfile.url, 'filedownload') - except Exception as e: - self.logDebug(str(e)) + except Exception: + self.logDebug("runFileQuery error #2") self.tempOffline() self.download(result_dl, disposition=True) -- cgit v1.2.3 From 168f175ce4765dec7e847c45d95e4babe20a7193 Mon Sep 17 00:00:00 2001 From: synweap15 Date: Mon, 3 Nov 2014 14:42:05 +0100 Subject: New __authors__ key, added __license__ --- module/plugins/hoster/NoPremiumPl.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/NoPremiumPl.py b/module/plugins/hoster/NoPremiumPl.py index 1bdd6eda0..f4f7ba56a 100644 --- a/module/plugins/hoster/NoPremiumPl.py +++ b/module/plugins/hoster/NoPremiumPl.py @@ -11,8 +11,8 @@ class NoPremiumPl(SimpleHoster): __pattern__ = r"https?://direct\.nopremium\.pl.*" __description__ = "NoPremium.pl hoster plugin" - __author_name__ = ("goddie") - __author_mail__ = ("dev@nopremium.pl") + __license__ = "GPLv3" + __authors__ = [("goddie", "dev@nopremium.pl")] _api_url = "http://crypt.nopremium.pl" -- cgit v1.2.3 From 005710831caa04bbe372b54ac357658963fe02bb Mon Sep 17 00:00:00 2001 From: synweap15 Date: Mon, 3 Nov 2014 14:44:44 +0100 Subject: New __authors__ key, added __license__ --- module/plugins/hoster/RapideoPl.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/RapideoPl.py b/module/plugins/hoster/RapideoPl.py index 0c46c0593..9fd20e69e 100644 --- a/module/plugins/hoster/RapideoPl.py +++ b/module/plugins/hoster/RapideoPl.py @@ -9,8 +9,8 @@ class RapideoPl(SimpleHoster): __version__ = "0.01" __type__ = "hoster" __description__ = "Rapideo.pl hoster plugin" - __author_name__ = ("goddie") - __author_mail__ = ("dev@rapideo.pl") + __license__ = "GPLv3" + __authors__ = [("goddie", "dev@rapideo.pl")] _api_url = "http://enc.rapideo.pl" -- cgit v1.2.3 From 6b60af3d42fb3e5b68826ca370e39fc50b4d584f Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 26 Dec 2014 04:22:34 +0100 Subject: [CloudzillaTo] Fixup --- module/plugins/hoster/CloudzillaTo.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/CloudzillaTo.py b/module/plugins/hoster/CloudzillaTo.py index 442b0dd6c..d8b5e8b5d 100644 --- a/module/plugins/hoster/CloudzillaTo.py +++ b/module/plugins/hoster/CloudzillaTo.py @@ -8,7 +8,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class CloudzillaTo(SimpleHoster): __name__ = "CloudzillaTo" __type__ = "hoster" - __version__ = "0.04" + __version__ = "0.05" __pattern__ = r'http://(?:www\.)?cloudzilla\.to/share/file/(?P[\w^_]+)' @@ -51,7 +51,7 @@ class CloudzillaTo(SimpleHoster): self.link = "http://%(server)s/download/%(file_id)s/%(ticket_id)s" % {'server' : ticket['server'], 'file_id' : self.info['pattern']['ID'], - 'ticket_id': ticket['ticket_id']}) + 'ticket_id': ticket['ticket_id']} def handlePremium(self): -- cgit v1.2.3 From 9371e7c7f83d821cc1f4ce4580cfec05164f3595 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 26 Dec 2014 04:24:21 +0100 Subject: [DebridItaliaCom] Fixup --- module/plugins/hoster/DebridItaliaCom.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/DebridItaliaCom.py b/module/plugins/hoster/DebridItaliaCom.py index d20afb620..34a306cce 100644 --- a/module/plugins/hoster/DebridItaliaCom.py +++ b/module/plugins/hoster/DebridItaliaCom.py @@ -8,7 +8,7 @@ from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo class DebridItaliaCom(MultiHoster): __name__ = "DebridItaliaCom" __type__ = "hoster" - __version__ = "0.14" + __version__ = "0.15" __pattern__ = r'http://s\d+\.debriditalia\.com/dl/\d+' @@ -33,17 +33,16 @@ class DebridItaliaCom(MultiHoster): if "ERROR:" not in self.html: self.link = self.html.strip() else: - errmsg = re.search(r'ERROR:(.*)', self.html).group(1).strip() + self.info['error'] = re.search(r'ERROR:(.*)', self.html).group(1).strip() self.html = self.load("http://debriditalia.com/linkgen2.php", post={'xjxfun' : "convertiLink", 'xjxargs[]': "S" % self.pyfile.url, 'xjxargs[]': "S%s" % self.getPassword()}) - - self.link = re.search(r' Date: Fri, 26 Dec 2014 04:27:02 +0100 Subject: [AlldebridCom] Fix checkFile --- module/plugins/hoster/AlldebridCom.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/AlldebridCom.py b/module/plugins/hoster/AlldebridCom.py index fdf060330..3391f15d4 100644 --- a/module/plugins/hoster/AlldebridCom.py +++ b/module/plugins/hoster/AlldebridCom.py @@ -13,7 +13,7 @@ from module.utils import parseFileSize class AlldebridCom(MultiHoster): __name__ = "AlldebridCom" __type__ = "hoster" - __version__ = "0.39" + __version__ = "0.40" __pattern__ = r'https?://(?:[^/]*\.)?alldebrid\..*' @@ -27,8 +27,10 @@ class AlldebridCom(MultiHoster): name = unquote(url.rsplit("/", 1)[1]) except IndexError: name = "Unknown_Filename..." + if name.endswith("..."): # incomplete filename, append random stuff name += "%s.tmp" % randrange(100, 999) + return name @@ -70,11 +72,11 @@ class AlldebridCom(MultiHoster): self.pyfile.name = self.getFilename(self.link) - def AlldebridCom(self): - super(AlldebridCom, self).checkFile() + def checkFile(self): + super(AlldebridCom, self).checkFile() - if self.checkDownload({'error': "An error occured while processing your request"}) is "error": - self.retry(wait_time=60, reason=_("An error occured while generating link")) + if self.checkDownload({'error': "An error occured while processing your request"}) is "error": + self.retry(wait_time=60, reason=_("An error occured while generating link")) getInfo = create_getInfo(AlldebridCom) -- cgit v1.2.3 From 136f63dc39603814b215606f888fb2e639021277 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 26 Dec 2014 04:27:41 +0100 Subject: Spare code fixes --- module/plugins/hoster/RealdebridCom.py | 6 +++--- module/plugins/hoster/UnrestrictLi.py | 5 ++++- 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/RealdebridCom.py b/module/plugins/hoster/RealdebridCom.py index 0de78226d..eb27a26f9 100644 --- a/module/plugins/hoster/RealdebridCom.py +++ b/module/plugins/hoster/RealdebridCom.py @@ -14,9 +14,9 @@ from module.utils import parseFileSize class RealdebridCom(MultiHoster): __name__ = "RealdebridCom" __type__ = "hoster" - __version__ = "0.58" + __version__ = "0.59" - __pattern__ = r'https?://(?:[^/]*\.)?real-debrid\..*' + __pattern__ = r'https?://(?:[^/]+\.)?real-debrid\..*' __description__ = """Real-Debrid.com hoster plugin""" __license__ = "GPLv3" @@ -41,7 +41,7 @@ class RealdebridCom(MultiHoster): def handlePremium(self): data = json_loads(self.load("https://real-debrid.com/ajax/unrestrict.php", get={'lang' : "en", - 'link' : quote(self.pyfile.url, ""), + 'link' : self.pyfile.url, 'password': self.getPassword(), 'time' : int(time() * 1000)})) diff --git a/module/plugins/hoster/UnrestrictLi.py b/module/plugins/hoster/UnrestrictLi.py index 7535d7b41..1476efa96 100644 --- a/module/plugins/hoster/UnrestrictLi.py +++ b/module/plugins/hoster/UnrestrictLi.py @@ -29,7 +29,7 @@ def secondsToMidnight(gmt=0): class UnrestrictLi(MultiHoster): __name__ = "UnrestrictLi" __type__ = "hoster" - __version__ = "0.17" + __version__ = "0.18" __pattern__ = r'https?://(?:[^/]*\.)?(unrestrict|unr)\.li' @@ -38,6 +38,9 @@ class UnrestrictLi(MultiHoster): __authors__ = [("stickell", "l.stickell@yahoo.it")] + LOGIN_ACCOUNT = False + + def setup(self): self.chunkLimit = 16 self.resumeDownload = True -- cgit v1.2.3 From a2324280a11b22ef75f7c86bad3392a2179c486c Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 26 Dec 2014 16:48:14 +0100 Subject: [ShareonlineBiz] Fix login --- module/plugins/hoster/RealdebridCom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/RealdebridCom.py b/module/plugins/hoster/RealdebridCom.py index eb27a26f9..d283ce8ea 100644 --- a/module/plugins/hoster/RealdebridCom.py +++ b/module/plugins/hoster/RealdebridCom.py @@ -16,7 +16,7 @@ class RealdebridCom(MultiHoster): __type__ = "hoster" __version__ = "0.59" - __pattern__ = r'https?://(?:[^/]+\.)?real-debrid\..*' + __pattern__ = r'https?://(?:[^/]+\.)?real-debrid\..+' __description__ = """Real-Debrid.com hoster plugin""" __license__ = "GPLv3" -- cgit v1.2.3 From ff42cec46274b0f2019272424c1a57ec4b413507 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 26 Dec 2014 17:58:54 +0100 Subject: [PremiumTo] Fixup --- module/plugins/hoster/PremiumTo.py | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/PremiumTo.py b/module/plugins/hoster/PremiumTo.py index b6194ef73..fd5853f45 100644 --- a/module/plugins/hoster/PremiumTo.py +++ b/module/plugins/hoster/PremiumTo.py @@ -13,7 +13,7 @@ from module.utils import fs_encode class PremiumTo(MultiHoster): __name__ = "PremiumTo" __type__ = "hoster" - __version__ = "0.15" + __version__ = "0.16" __pattern__ = r'https?://(?:www\.)?premium\.to/.*' @@ -30,8 +30,6 @@ class PremiumTo(MultiHoster): def handlePremium(self): - tra = self.getTraffic() - #raise timeout to 2min self.req.setOption("timeout", 120) @@ -59,21 +57,8 @@ class PremiumTo(MultiHoster): err = f.read(256).strip() remove(lastDownload) - trb = self.getTraffic() - self.logInfo(_("Filesize: %d, Traffic used %d, traffic left %d") % (self.pyfile.size, tra - trb, trb)) - if err: self.fail(err) - def getTraffic(self): - try: - api_r = self.load("http://premium.to/api/straffic.php", - get={'username': self.account.username, 'password': self.account.password}) - traffic = sum(map(int, api_r.split(';'))) - except: - traffic = 0 - return traffic - - getInfo = create_getInfo(PremiumTo) -- cgit v1.2.3 From c26db1f8fcd736d9de00095343779fd5519d565c Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 26 Dec 2014 18:48:10 +0100 Subject: [LomafileCom] Mark dead --- module/plugins/hoster/LomafileCom.py | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/LomafileCom.py b/module/plugins/hoster/LomafileCom.py index 0abc8487d..475cdacaa 100644 --- a/module/plugins/hoster/LomafileCom.py +++ b/module/plugins/hoster/LomafileCom.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.XFSHoster import XFSHoster, create_getInfo +from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo -class LomafileCom(XFSHoster): +class LomafileCom(DeadHoster): __name__ = "LomafileCom" __type__ = "hoster" - __version__ = "0.51" + __version__ = "0.52" __pattern__ = r'http://lomafile\.com/\w{12}' @@ -16,14 +16,4 @@ class LomafileCom(XFSHoster): ("guidobelix", "guidobelix@hotmail.it")] - HOSTER_DOMAIN = "lomafile.com" - - NAME_PATTERN = r'' - - OFFLINE_PATTERN = r'>(No such file|Software error:<)' - TEMP_OFFLINE_PATTERN = r'The page may have been renamed, removed or be temporarily unavailable.<' - - CAPTCHA_PATTERN = r'(http://lomafile\.com/captchas/[^"\']+)' - - getInfo = create_getInfo(LomafileCom) -- cgit v1.2.3 From 24bf61533574a5ff81559d60627a7a9b2a926696 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 26 Dec 2014 18:48:57 +0100 Subject: [NowVideoSx] Fixup --- module/plugins/hoster/NowVideoSx.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/NowVideoSx.py b/module/plugins/hoster/NowVideoSx.py index b59bd79da..d0777ca4b 100644 --- a/module/plugins/hoster/NowVideoSx.py +++ b/module/plugins/hoster/NowVideoSx.py @@ -8,7 +8,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class NowVideoSx(SimpleHoster): __name__ = "NowVideoSx" __type__ = "hoster" - __version__ = "0.07" + __version__ = "0.08" __pattern__ = r'http://(?:www\.)?nowvideo\.(at|ch|co|eu|sx)/(video|mobile/#/videos)/(?P\w+)' @@ -17,7 +17,7 @@ class NowVideoSx(SimpleHoster): __authors__ = [("Walter Purcaro", "vuolter@gmail.com")] - URL_REPLACEMENTS = [(__pattern__ + ".*", r'http://www.nowvideo.at/video/\g')] + URL_REPLACEMENTS = [(__pattern__ + ".*", r'http://www.nowvideo.sx/video/\g')] NAME_PATTERN = r'

(?P.+?)<' OFFLINE_PATTERN = r'>This file no longer exists' @@ -32,7 +32,7 @@ class NowVideoSx(SimpleHoster): def handleFree(self): - self.html = self.load("http://www.nowvideo.at/mobile/video.php", get={'id': self.info['pattern']['ID']}) + self.html = self.load("http://www.nowvideo.sx/mobile/video.php", get={'id': self.info['pattern']['ID']}) m = re.search(self.LINK_FREE_PATTERN, self.html) if m is None: -- cgit v1.2.3 From b6a2bd53628bd2824bac1dafc7b4eafdf3c815dd Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 27 Dec 2014 13:48:03 +0100 Subject: Update plugins after SimpleHoster changes --- module/plugins/hoster/ExtabitCom.py | 5 ++--- module/plugins/hoster/FileserveCom.py | 6 +++--- module/plugins/hoster/FreakshareCom.py | 4 ++-- module/plugins/hoster/LetitbitNet.py | 7 +++---- module/plugins/hoster/RapidgatorNet.py | 5 ++--- module/plugins/hoster/UnrestrictLi.py | 21 ++------------------- 6 files changed, 14 insertions(+), 34 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/ExtabitCom.py b/module/plugins/hoster/ExtabitCom.py index fc38a79a9..7609954d3 100644 --- a/module/plugins/hoster/ExtabitCom.py +++ b/module/plugins/hoster/ExtabitCom.py @@ -4,15 +4,14 @@ import re from module.common.json_layer import json_loads -from module.plugins.hoster.UnrestrictLi import secondsToMidnight from module.plugins.internal.CaptchaService import ReCaptcha -from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo +from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo, secondsToMidnight class ExtabitCom(SimpleHoster): __name__ = "ExtabitCom" __type__ = "hoster" - __version__ = "0.62" + __version__ = "0.63" __pattern__ = r'http://(?:www\.)?extabit\.com/(file|go|fid)/(?P\w+)' diff --git a/module/plugins/hoster/FileserveCom.py b/module/plugins/hoster/FileserveCom.py index 2d4478e63..52a071b52 100644 --- a/module/plugins/hoster/FileserveCom.py +++ b/module/plugins/hoster/FileserveCom.py @@ -6,8 +6,8 @@ from module.common.json_layer import json_loads from module.network.RequestFactory import getURL from module.plugins.Hoster import Hoster from module.plugins.Plugin import chunks -from module.plugins.hoster.UnrestrictLi import secondsToMidnight from module.plugins.internal.CaptchaService import ReCaptcha +from module.plugins.internal.SimpleHoster import secondsToMidnight from module.utils import parseFileSize @@ -33,9 +33,9 @@ def checkFile(plugin, urls): class FileserveCom(Hoster): __name__ = "FileserveCom" __type__ = "hoster" - __version__ = "0.52" + __version__ = "0.53" - __pattern__ = r'http://(?:www\.)?fileserve\.com/file/(?P[^/]+).*' + __pattern__ = r'http://(?:www\.)?fileserve\.com/file/(?P[^/]+)' __description__ = """Fileserve.com hoster plugin""" __license__ = "GPLv3" diff --git a/module/plugins/hoster/FreakshareCom.py b/module/plugins/hoster/FreakshareCom.py index 00c31c528..2238f07ef 100644 --- a/module/plugins/hoster/FreakshareCom.py +++ b/module/plugins/hoster/FreakshareCom.py @@ -3,14 +3,14 @@ import re from module.plugins.Hoster import Hoster -from module.plugins.hoster.UnrestrictLi import secondsToMidnight from module.plugins.internal.CaptchaService import ReCaptcha +from module.plugins.internal.SimpleHoster import secondsToMidnight class FreakshareCom(Hoster): __name__ = "FreakshareCom" __type__ = "hoster" - __version__ = "0.39" + __version__ = "0.40" __pattern__ = r'http://(?:www\.)?freakshare\.(net|com)/files/\S*?/' diff --git a/module/plugins/hoster/LetitbitNet.py b/module/plugins/hoster/LetitbitNet.py index 5fcb5e08b..a7b11047f 100644 --- a/module/plugins/hoster/LetitbitNet.py +++ b/module/plugins/hoster/LetitbitNet.py @@ -12,9 +12,8 @@ from urllib import urlencode, urlopen from urlparse import urljoin from module.common.json_layer import json_loads, json_dumps -from module.plugins.hoster.UnrestrictLi import secondsToMidnight from module.plugins.internal.CaptchaService import ReCaptcha -from module.plugins.internal.SimpleHoster import SimpleHoster +from module.plugins.internal.SimpleHoster import SimpleHoster, secondsToMidnight def api_download_info(url): @@ -37,9 +36,9 @@ def getInfo(urls): class LetitbitNet(SimpleHoster): __name__ = "LetitbitNet" __type__ = "hoster" - __version__ = "0.26" + __version__ = "0.27" - __pattern__ = r'https?://(?:www\.)?(letitbit|shareflare)\.net/download/.*' + __pattern__ = r'https?://(?:www\.)?(letitbit|shareflare)\.net/download/.+' __description__ = """Letitbit.net hoster plugin""" __license__ = "GPLv3" diff --git a/module/plugins/hoster/RapidgatorNet.py b/module/plugins/hoster/RapidgatorNet.py index cc11fa7c7..ba6cfcd5c 100644 --- a/module/plugins/hoster/RapidgatorNet.py +++ b/module/plugins/hoster/RapidgatorNet.py @@ -6,15 +6,14 @@ from pycurl import HTTPHEADER from module.common.json_layer import json_loads from module.network.HTTPRequest import BadHeader -from module.plugins.hoster.UnrestrictLi import secondsToMidnight from module.plugins.internal.CaptchaService import AdsCaptcha, ReCaptcha, SolveMedia -from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo +from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo, secondsToMidnight class RapidgatorNet(SimpleHoster): __name__ = "RapidgatorNet" __type__ = "hoster" - __version__ = "0.26" + __version__ = "0.27" __pattern__ = r'http://(?:www\.)?(rapidgator\.net|rg\.to)/file/\w+' diff --git a/module/plugins/hoster/UnrestrictLi.py b/module/plugins/hoster/UnrestrictLi.py index 1476efa96..6e16cace7 100644 --- a/module/plugins/hoster/UnrestrictLi.py +++ b/module/plugins/hoster/UnrestrictLi.py @@ -6,30 +6,13 @@ from datetime import datetime, timedelta from module.common.json_layer import json_loads from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo - - -def secondsToMidnight(gmt=0): - now = datetime.utcnow() + timedelta(hours=gmt) - - if now.hour is 0 and now.minute < 10: - midnight = now - else: - midnight = now + timedelta(days=1) - - td = midnight.replace(hour=0, minute=10, second=0, microsecond=0) - now - - if hasattr(td, 'total_seconds'): - res = td.total_seconds() - else: #@NOTE: work-around for python 2.5 and 2.6 missing timedelta.total_seconds - res = (td.microseconds + (td.seconds + td.days * 24 * 3600) * 10**6) / 10**6 - - return int(res) +from module.plugins.internal.SimpleHoster import secondsToMidnight class UnrestrictLi(MultiHoster): __name__ = "UnrestrictLi" __type__ = "hoster" - __version__ = "0.18" + __version__ = "0.19" __pattern__ = r'https?://(?:[^/]*\.)?(unrestrict|unr)\.li' -- cgit v1.2.3 From cc7109dd0c7f12c1b6a1ec0525951112a2a1b98b Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 27 Dec 2014 13:49:06 +0100 Subject: [MegaDebridEu] Improve __pattern__ --- module/plugins/hoster/MegaDebridEu.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/MegaDebridEu.py b/module/plugins/hoster/MegaDebridEu.py index ebef7969c..6b9f463d5 100644 --- a/module/plugins/hoster/MegaDebridEu.py +++ b/module/plugins/hoster/MegaDebridEu.py @@ -11,9 +11,9 @@ from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo class MegaDebridEu(MultiHoster): __name__ = "MegaDebridEu" __type__ = "hoster" - __version__ = "0.43" + __version__ = "0.44" - __pattern__ = r'^https?://(?:w{3}\d+\.mega-debrid\.eu|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})/download/file/[^/]+/.+$' + __pattern__ = r'http://((www\d+|s\d+)\.mega-debrid\.eu|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})/download/file/[\w^_]+' __description__ = """mega-debrid.eu hoster plugin""" __license__ = "GPLv3" -- cgit v1.2.3 From d09306aa1f9103141e7fc7c4e72588bf46be71da Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 27 Dec 2014 13:49:50 +0100 Subject: [SimplyPremiumCom] Fixup --- module/plugins/hoster/SimplyPremiumCom.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/SimplyPremiumCom.py b/module/plugins/hoster/SimplyPremiumCom.py index 87ccb317e..bf7c43af6 100644 --- a/module/plugins/hoster/SimplyPremiumCom.py +++ b/module/plugins/hoster/SimplyPremiumCom.py @@ -5,15 +5,15 @@ import re from datetime import datetime, timedelta from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo -from module.plugins.hoster.UnrestrictLi import secondsToMidnight +from module.plugins.internal.SimpleHoster import secondsToMidnight class SimplyPremiumCom(MultiHoster): __name__ = "SimplyPremiumCom" __type__ = "hoster" - __version__ = "0.06" + __version__ = "0.07" - __pattern__ = r'https?://.*(simply-premium)\.com' + __pattern__ = r'https?://.+simply-premium\.com' __description__ = """Simply-Premium.com hoster plugin""" __license__ = "GPLv3" @@ -49,7 +49,7 @@ class SimplyPremiumCom(MultiHoster): elif "trafficlimit" in page: self.logWarning(_("Reached daily limit for this host")) - self.retry(wait_time=secondsToMidnight(gmt=2), "Daily limit for this host reached") + self.retry(wait_time=secondsToMidnight(gmt=2), reason="Daily limit for this host reached") elif "hostererror" in page: self.logWarning(_("Hoster temporarily unavailable, waiting 1 minute and retry")) -- cgit v1.2.3 From cdb06469a640c1875229903a2dbdfa8be469b5bc Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 27 Dec 2014 13:52:30 +0100 Subject: Improve a lot of plugin __pattern__ --- module/plugins/hoster/BezvadataCz.py | 2 +- module/plugins/hoster/BitshareCom.py | 2 +- module/plugins/hoster/CzshareCom.py | 2 +- module/plugins/hoster/DataportCz.py | 2 +- module/plugins/hoster/EdiskCz.py | 2 +- module/plugins/hoster/EuroshareEu.py | 2 +- module/plugins/hoster/FastixRu.py | 2 +- module/plugins/hoster/FilebeerInfo.py | 2 +- module/plugins/hoster/FilecloudIo.py | 2 +- module/plugins/hoster/FilejungleCom.py | 2 +- module/plugins/hoster/FilesMailRu.py | 2 +- module/plugins/hoster/FlyFilesNet.py | 2 +- module/plugins/hoster/FourSharedCom.py | 2 +- module/plugins/hoster/FreeWayMe.py | 2 +- module/plugins/hoster/FshareVn.py | 2 +- module/plugins/hoster/HellshareCz.py | 2 +- module/plugins/hoster/HellspyCz.py | 2 +- module/plugins/hoster/IcyFilesCom.py | 2 +- module/plugins/hoster/IfolderRu.py | 2 +- module/plugins/hoster/JumbofilesCom.py | 2 +- module/plugins/hoster/MultishareCz.py | 2 +- module/plugins/hoster/MyfastfileCom.py | 2 +- module/plugins/hoster/OverLoadMe.py | 2 +- module/plugins/hoster/PremiumTo.py | 2 +- module/plugins/hoster/QuickshareCz.py | 2 +- module/plugins/hoster/RPNetBiz.py | 2 +- module/plugins/hoster/RehostTo.py | 2 +- module/plugins/hoster/ShragleCom.py | 2 +- module/plugins/hoster/SimplydebridCom.py | 2 +- module/plugins/hoster/SoundcloudCom.py | 2 +- module/plugins/hoster/SpeedfileCz.py | 2 +- module/plugins/hoster/StreamCz.py | 2 +- module/plugins/hoster/TurbouploadCom.py | 2 +- module/plugins/hoster/TwoSharedCom.py | 2 +- module/plugins/hoster/UloziskoSk.py | 2 +- module/plugins/hoster/WuploadCom.py | 2 +- module/plugins/hoster/XVideosCom.py | 2 +- module/plugins/hoster/YoutubeCom.py | 2 +- module/plugins/hoster/ZeveraCom.py | 2 +- 39 files changed, 39 insertions(+), 39 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/BezvadataCz.py b/module/plugins/hoster/BezvadataCz.py index 3a0b8e58c..9ca4b4b1a 100644 --- a/module/plugins/hoster/BezvadataCz.py +++ b/module/plugins/hoster/BezvadataCz.py @@ -10,7 +10,7 @@ class BezvadataCz(SimpleHoster): __type__ = "hoster" __version__ = "0.25" - __pattern__ = r'http://(?:www\.)?bezvadata\.cz/stahnout/.*' + __pattern__ = r'http://(?:www\.)?bezvadata\.cz/stahnout/.+' __description__ = """BezvaData.cz hoster plugin""" __license__ = "GPLv3" diff --git a/module/plugins/hoster/BitshareCom.py b/module/plugins/hoster/BitshareCom.py index 50013cc43..1c5c53f55 100644 --- a/module/plugins/hoster/BitshareCom.py +++ b/module/plugins/hoster/BitshareCom.py @@ -13,7 +13,7 @@ class BitshareCom(SimpleHoster): __type__ = "hoster" __version__ = "0.51" - __pattern__ = r'http://(?:www\.)?bitshare\.com/(files/)?(?(1)|\?f=)(?P\w+)(?(1)/(?P.*?)\.html)' + __pattern__ = r'http://(?:www\.)?bitshare\.com/(files/)?(?(1)|\?f=)(?P\w+)(?(1)/(?P.+?)\.html)' __description__ = """Bitshare.com hoster plugin""" __license__ = "GPLv3" diff --git a/module/plugins/hoster/CzshareCom.py b/module/plugins/hoster/CzshareCom.py index 914849879..aa381d712 100644 --- a/module/plugins/hoster/CzshareCom.py +++ b/module/plugins/hoster/CzshareCom.py @@ -14,7 +14,7 @@ class CzshareCom(SimpleHoster): __type__ = "hoster" __version__ = "0.96" - __pattern__ = r'http://(?:www\.)?(czshare|sdilej)\.(com|cz)/(\d+/|download\.php\?).*' + __pattern__ = r'http://(?:www\.)?(czshare|sdilej)\.(com|cz)/(\d+/|download\.php\?).+' __description__ = """CZshare.com hoster plugin, now Sdilej.cz""" __license__ = "GPLv3" diff --git a/module/plugins/hoster/DataportCz.py b/module/plugins/hoster/DataportCz.py index b9e6fd370..8e74f5553 100644 --- a/module/plugins/hoster/DataportCz.py +++ b/module/plugins/hoster/DataportCz.py @@ -8,7 +8,7 @@ class DataportCz(SimpleHoster): __type__ = "hoster" __version__ = "0.40" - __pattern__ = r'http://(?:www\.)?dataport\.cz/file/(.*)' + __pattern__ = r'http://(?:www\.)?dataport\.cz/file/(.+)' __description__ = """Dataport.cz hoster plugin""" __license__ = "GPLv3" diff --git a/module/plugins/hoster/EdiskCz.py b/module/plugins/hoster/EdiskCz.py index b9dc45e78..eb9338871 100644 --- a/module/plugins/hoster/EdiskCz.py +++ b/module/plugins/hoster/EdiskCz.py @@ -10,7 +10,7 @@ class EdiskCz(SimpleHoster): __type__ = "hoster" __version__ = "0.22" - __pattern__ = r'http://(?:www\.)?edisk\.(cz|sk|eu)/(stahni|sk/stahni|en/download)/.*' + __pattern__ = r'http://(?:www\.)?edisk\.(cz|sk|eu)/(stahni|sk/stahni|en/download)/.+' __description__ = """Edisk.cz hoster plugin""" __license__ = "GPLv3" diff --git a/module/plugins/hoster/EuroshareEu.py b/module/plugins/hoster/EuroshareEu.py index 705a8d18a..cc10abb37 100644 --- a/module/plugins/hoster/EuroshareEu.py +++ b/module/plugins/hoster/EuroshareEu.py @@ -10,7 +10,7 @@ class EuroshareEu(SimpleHoster): __type__ = "hoster" __version__ = "0.26" - __pattern__ = r'http://(?:www\.)?euroshare\.(eu|sk|cz|hu|pl)/file/.*' + __pattern__ = r'http://(?:www\.)?euroshare\.(eu|sk|cz|hu|pl)/file/.+' __description__ = """Euroshare.eu hoster plugin""" __license__ = "GPLv3" diff --git a/module/plugins/hoster/FastixRu.py b/module/plugins/hoster/FastixRu.py index a4c85b4ca..5f6fd2d4c 100644 --- a/module/plugins/hoster/FastixRu.py +++ b/module/plugins/hoster/FastixRu.py @@ -14,7 +14,7 @@ class FastixRu(MultiHoster): __type__ = "hoster" __version__ = "0.08" - __pattern__ = r'http://(?:www\.)?fastix\.(ru|it)/file/(?P\w{24})' + __pattern__ = r'http://(?:www\.)?fastix\.(ru|it)/file/\w{24}' __description__ = """Fastix hoster plugin""" __license__ = "GPLv3" diff --git a/module/plugins/hoster/FilebeerInfo.py b/module/plugins/hoster/FilebeerInfo.py index ff1194ecc..885010a2c 100644 --- a/module/plugins/hoster/FilebeerInfo.py +++ b/module/plugins/hoster/FilebeerInfo.py @@ -8,7 +8,7 @@ class FilebeerInfo(DeadHoster): __type__ = "hoster" __version__ = "0.03" - __pattern__ = r'http://(?:www\.)?filebeer\.info/(?!\d*~f)(?P\w+).*' + __pattern__ = r'http://(?:www\.)?filebeer\.info/(?!\d*~f)(?P\w+)' __description__ = """Filebeer.info plugin""" __license__ = "GPLv3" diff --git a/module/plugins/hoster/FilecloudIo.py b/module/plugins/hoster/FilecloudIo.py index cb9782f23..8b6804a68 100644 --- a/module/plugins/hoster/FilecloudIo.py +++ b/module/plugins/hoster/FilecloudIo.py @@ -12,7 +12,7 @@ class FilecloudIo(SimpleHoster): __type__ = "hoster" __version__ = "0.05" - __pattern__ = r'http://(?:www\.)?(?:filecloud\.io|ifile\.it|mihd\.net)/(?P\w+).*' + __pattern__ = r'http://(?:www\.)?(?:filecloud\.io|ifile\.it|mihd\.net)/(?P\w+)' __description__ = """Filecloud.io hoster plugin""" __license__ = "GPLv3" diff --git a/module/plugins/hoster/FilejungleCom.py b/module/plugins/hoster/FilejungleCom.py index d5367e0be..8a8aee9e2 100644 --- a/module/plugins/hoster/FilejungleCom.py +++ b/module/plugins/hoster/FilejungleCom.py @@ -9,7 +9,7 @@ class FilejungleCom(FileserveCom): __type__ = "hoster" __version__ = "0.51" - __pattern__ = r'http://(?:www\.)?filejungle\.com/f/(?P[^/]+).*' + __pattern__ = r'http://(?:www\.)?filejungle\.com/f/(?P[^/]+)' __description__ = """Filejungle.com hoster plugin""" __license__ = "GPLv3" diff --git a/module/plugins/hoster/FilesMailRu.py b/module/plugins/hoster/FilesMailRu.py index 92ff5a02a..9b39d818f 100644 --- a/module/plugins/hoster/FilesMailRu.py +++ b/module/plugins/hoster/FilesMailRu.py @@ -34,7 +34,7 @@ class FilesMailRu(Hoster): __type__ = "hoster" __version__ = "0.31" - __pattern__ = r'http://(?:www\.)?files\.mail\.ru/.*' + __pattern__ = r'http://(?:www\.)?files\.mail\.ru/.+' __description__ = """Files.mail.ru hoster plugin""" __license__ = "GPLv3" diff --git a/module/plugins/hoster/FlyFilesNet.py b/module/plugins/hoster/FlyFilesNet.py index 361537927..49705958d 100644 --- a/module/plugins/hoster/FlyFilesNet.py +++ b/module/plugins/hoster/FlyFilesNet.py @@ -13,7 +13,7 @@ class FlyFilesNet(SimpleHoster): __type__ = "hoster" __version__ = "0.10" - __pattern__ = r'http://(?:www\.)?flyfiles\.net/.*' + __pattern__ = r'http://(?:www\.)?flyfiles\.net/.+' __description__ = """FlyFiles.net hoster plugin""" __license__ = "GPLv3" diff --git a/module/plugins/hoster/FourSharedCom.py b/module/plugins/hoster/FourSharedCom.py index e1fcdab26..0406df0c4 100644 --- a/module/plugins/hoster/FourSharedCom.py +++ b/module/plugins/hoster/FourSharedCom.py @@ -10,7 +10,7 @@ class FourSharedCom(SimpleHoster): __type__ = "hoster" __version__ = "0.30" - __pattern__ = r'https?://(?:www\.)?4shared(\-china)?\.com/(account/)?(download|get|file|document|photo|video|audio|mp3|office|rar|zip|archive|music)/.+?/.*' + __pattern__ = r'https?://(?:www\.)?4shared(\-china)?\.com/(account/)?(download|get|file|document|photo|video|audio|mp3|office|rar|zip|archive|music)/.+' __description__ = """4Shared.com hoster plugin""" __license__ = "GPLv3" diff --git a/module/plugins/hoster/FreeWayMe.py b/module/plugins/hoster/FreeWayMe.py index 6bda13792..80d0b8515 100644 --- a/module/plugins/hoster/FreeWayMe.py +++ b/module/plugins/hoster/FreeWayMe.py @@ -8,7 +8,7 @@ class FreeWayMe(MultiHoster): __type__ = "hoster" __version__ = "0.14" - __pattern__ = r'https://(?:www\.)?free-way\.me/.*' + __pattern__ = r'https://(?:www\.)?free-way\.me/.+' __description__ = """FreeWayMe hoster plugin""" __license__ = "GPLv3" diff --git a/module/plugins/hoster/FshareVn.py b/module/plugins/hoster/FshareVn.py index 7b8e4b0bd..a3f9703df 100644 --- a/module/plugins/hoster/FshareVn.py +++ b/module/plugins/hoster/FshareVn.py @@ -26,7 +26,7 @@ class FshareVn(SimpleHoster): __type__ = "hoster" __version__ = "0.18" - __pattern__ = r'http://(?:www\.)?fshare\.vn/file/.*' + __pattern__ = r'http://(?:www\.)?fshare\.vn/file/.+' __description__ = """FshareVn hoster plugin""" __license__ = "GPLv3" diff --git a/module/plugins/hoster/HellshareCz.py b/module/plugins/hoster/HellshareCz.py index 117749f89..4b44cc335 100644 --- a/module/plugins/hoster/HellshareCz.py +++ b/module/plugins/hoster/HellshareCz.py @@ -10,7 +10,7 @@ class HellshareCz(SimpleHoster): __type__ = "hoster" __version__ = "0.83" - __pattern__ = r'(http://(?:www\.)?hellshare\.(?:cz|com|sk|hu|pl)/[^?]*/\d+).*' + __pattern__ = r'(http://(?:www\.)?hellshare\.(?:cz|com|sk|hu|pl)/[^?]*/\d+)' __description__ = """Hellshare.cz hoster plugin""" __license__ = "GPLv3" diff --git a/module/plugins/hoster/HellspyCz.py b/module/plugins/hoster/HellspyCz.py index a7ca19406..2b9b76b8a 100644 --- a/module/plugins/hoster/HellspyCz.py +++ b/module/plugins/hoster/HellspyCz.py @@ -8,7 +8,7 @@ class HellspyCz(DeadHoster): __type__ = "hoster" __version__ = "0.28" - __pattern__ = r'http://(?:www\.)?(?:hellspy\.(?:cz|com|sk|hu|pl)|sciagaj\.pl)(/\S+/\d+)/?.*' + __pattern__ = r'http://(?:www\.)?(?:hellspy\.(?:cz|com|sk|hu|pl)|sciagaj\.pl)(/\S+/\d+)' __description__ = """HellSpy.cz hoster plugin""" __license__ = "GPLv3" diff --git a/module/plugins/hoster/IcyFilesCom.py b/module/plugins/hoster/IcyFilesCom.py index d8a28ef72..921b64207 100644 --- a/module/plugins/hoster/IcyFilesCom.py +++ b/module/plugins/hoster/IcyFilesCom.py @@ -8,7 +8,7 @@ class IcyFilesCom(DeadHoster): __type__ = "hoster" __version__ = "0.06" - __pattern__ = r'http://(?:www\.)?icyfiles\.com/(.*)' + __pattern__ = r'http://(?:www\.)?icyfiles\.com/(.+)' __description__ = """IcyFiles.com hoster plugin""" __license__ = "GPLv3" diff --git a/module/plugins/hoster/IfolderRu.py b/module/plugins/hoster/IfolderRu.py index ab3097854..255f10f45 100644 --- a/module/plugins/hoster/IfolderRu.py +++ b/module/plugins/hoster/IfolderRu.py @@ -10,7 +10,7 @@ class IfolderRu(SimpleHoster): __type__ = "hoster" __version__ = "0.38" - __pattern__ = r'http://(?:www\.)?(?:ifolder\.ru|rusfolder\.(?:com|net|ru))/(?:files/)?(?P\d+).*' + __pattern__ = r'http://(?:www\.)?(?:ifolder\.ru|rusfolder\.(?:com|net|ru))/(?:files/)?(?P\d+)' __description__ = """Ifolder.ru hoster plugin""" __license__ = "GPLv3" diff --git a/module/plugins/hoster/JumbofilesCom.py b/module/plugins/hoster/JumbofilesCom.py index 2df639ac1..cabc0f098 100644 --- a/module/plugins/hoster/JumbofilesCom.py +++ b/module/plugins/hoster/JumbofilesCom.py @@ -10,7 +10,7 @@ class JumbofilesCom(SimpleHoster): __type__ = "hoster" __version__ = "0.02" - __pattern__ = r'http://(?:www\.)?jumbofiles\.com/(\w{12}).*' + __pattern__ = r'http://(?:www\.)?jumbofiles\.com/(\w{12})' __description__ = """JumboFiles.com hoster plugin""" __license__ = "GPLv3" diff --git a/module/plugins/hoster/MultishareCz.py b/module/plugins/hoster/MultishareCz.py index 62acab84c..adbae2da4 100644 --- a/module/plugins/hoster/MultishareCz.py +++ b/module/plugins/hoster/MultishareCz.py @@ -12,7 +12,7 @@ class MultishareCz(SimpleHoster): __type__ = "hoster" __version__ = "0.36" - __pattern__ = r'http://(?:www\.)?multishare\.cz/stahnout/(?P\d+).*' + __pattern__ = r'http://(?:www\.)?multishare\.cz/stahnout/(?P\d+)' __description__ = """MultiShare.cz hoster plugin""" __license__ = "GPLv3" diff --git a/module/plugins/hoster/MyfastfileCom.py b/module/plugins/hoster/MyfastfileCom.py index 7471086fb..b5b9ec820 100644 --- a/module/plugins/hoster/MyfastfileCom.py +++ b/module/plugins/hoster/MyfastfileCom.py @@ -11,7 +11,7 @@ class MyfastfileCom(MultiHoster): __type__ = "hoster" __version__ = "0.07" - __pattern__ = r'http://(?:www\.)?\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/dl/' + __pattern__ = r'http://\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/dl/' __description__ = """Myfastfile.com hoster plugin""" __license__ = "GPLv3" diff --git a/module/plugins/hoster/OverLoadMe.py b/module/plugins/hoster/OverLoadMe.py index 54e3e73fb..54f869635 100644 --- a/module/plugins/hoster/OverLoadMe.py +++ b/module/plugins/hoster/OverLoadMe.py @@ -15,7 +15,7 @@ class OverLoadMe(MultiHoster): __type__ = "hoster" __version__ = "0.06" - __pattern__ = r'https?://.*overload\.me.*' + __pattern__ = r'https?://.*overload\.me/.+' __description__ = """Over-Load.me hoster plugin""" __license__ = "GPLv3" diff --git a/module/plugins/hoster/PremiumTo.py b/module/plugins/hoster/PremiumTo.py index fd5853f45..fa4caad5a 100644 --- a/module/plugins/hoster/PremiumTo.py +++ b/module/plugins/hoster/PremiumTo.py @@ -15,7 +15,7 @@ class PremiumTo(MultiHoster): __type__ = "hoster" __version__ = "0.16" - __pattern__ = r'https?://(?:www\.)?premium\.to/.*' + __pattern__ = r'https?://(?:www\.)?premium\.to/.+' __description__ = """Premium.to hoster plugin""" __license__ = "GPLv3" diff --git a/module/plugins/hoster/QuickshareCz.py b/module/plugins/hoster/QuickshareCz.py index 85a4dee39..85c25f6f0 100644 --- a/module/plugins/hoster/QuickshareCz.py +++ b/module/plugins/hoster/QuickshareCz.py @@ -12,7 +12,7 @@ class QuickshareCz(SimpleHoster): __type__ = "hoster" __version__ = "0.55" - __pattern__ = r'http://(?:[^/]*\.)?quickshare\.cz/stahnout-soubor/.*' + __pattern__ = r'http://(?:[^/]*\.)?quickshare\.cz/stahnout-soubor/.+' __description__ = """Quickshare.cz hoster plugin""" __license__ = "GPLv3" diff --git a/module/plugins/hoster/RPNetBiz.py b/module/plugins/hoster/RPNetBiz.py index d6a67beb3..bffa5ef85 100644 --- a/module/plugins/hoster/RPNetBiz.py +++ b/module/plugins/hoster/RPNetBiz.py @@ -14,7 +14,7 @@ class RPNetBiz(MultiHoster): __description__ = """RPNet.biz hoster plugin""" __license__ = "GPLv3" - __pattern__ = r'https?://.*rpnet\.biz' + __pattern__ = r'https?://.+rpnet\.biz' __authors__ = [("Dman", "dmanugm@gmail.com")] diff --git a/module/plugins/hoster/RehostTo.py b/module/plugins/hoster/RehostTo.py index b1d0c6e93..2971a6781 100644 --- a/module/plugins/hoster/RehostTo.py +++ b/module/plugins/hoster/RehostTo.py @@ -10,7 +10,7 @@ class RehostTo(MultiHoster): __type__ = "hoster" __version__ = "0.16" - __pattern__ = r'https?://.*rehost\.to\..*' + __pattern__ = r'https?://.*rehost\.to\..+' __description__ = """Rehost.com hoster plugin""" __license__ = "GPLv3" diff --git a/module/plugins/hoster/ShragleCom.py b/module/plugins/hoster/ShragleCom.py index b31f0e450..bec30f6f2 100644 --- a/module/plugins/hoster/ShragleCom.py +++ b/module/plugins/hoster/ShragleCom.py @@ -8,7 +8,7 @@ class ShragleCom(DeadHoster): __type__ = "hoster" __version__ = "0.22" - __pattern__ = r'http://(?:www\.)?(cloudnator|shragle)\.com/files/(?P.*?)/' + __pattern__ = r'http://(?:www\.)?(cloudnator|shragle)\.com/files/(?P.+?)/' __description__ = """Cloudnator.com (Shragle.com) hoster plugin""" __license__ = "GPLv3" diff --git a/module/plugins/hoster/SimplydebridCom.py b/module/plugins/hoster/SimplydebridCom.py index b4be77031..5e6b47efc 100644 --- a/module/plugins/hoster/SimplydebridCom.py +++ b/module/plugins/hoster/SimplydebridCom.py @@ -10,7 +10,7 @@ class SimplydebridCom(MultiHoster): __type__ = "hoster" __version__ = "0.14" - __pattern__ = r'http://(?:www\.)?\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/sd\.php/*' + __pattern__ = r'http://\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/sd\.php' __description__ = """Simply-debrid.com hoster plugin""" __license__ = "GPLv3" diff --git a/module/plugins/hoster/SoundcloudCom.py b/module/plugins/hoster/SoundcloudCom.py index 4665dff05..3eb546604 100644 --- a/module/plugins/hoster/SoundcloudCom.py +++ b/module/plugins/hoster/SoundcloudCom.py @@ -11,7 +11,7 @@ class SoundcloudCom(Hoster): __type__ = "hoster" __version__ = "0.10" - __pattern__ = r'https?://(?:www\.)?soundcloud\.com/(?P.*?)/(?P.*)' + __pattern__ = r'https?://(?:www\.)?soundcloud\.com/(?P.+?)/(?P.+)' __description__ = """SoundCloud.com hoster plugin""" __license__ = "GPLv3" diff --git a/module/plugins/hoster/SpeedfileCz.py b/module/plugins/hoster/SpeedfileCz.py index c04d8b281..f23c8d4c7 100644 --- a/module/plugins/hoster/SpeedfileCz.py +++ b/module/plugins/hoster/SpeedfileCz.py @@ -8,7 +8,7 @@ class SpeedfileCz(DeadHoster): __type__ = "hoster" __version__ = "0.32" - __pattern__ = r'http://(?:www\.)?speedfile\.cz/.*' + __pattern__ = r'http://(?:www\.)?speedfile\.cz/.+' __description__ = """Speedfile.cz hoster plugin""" __license__ = "GPLv3" diff --git a/module/plugins/hoster/StreamCz.py b/module/plugins/hoster/StreamCz.py index 6813271d0..11d4efcdb 100644 --- a/module/plugins/hoster/StreamCz.py +++ b/module/plugins/hoster/StreamCz.py @@ -25,7 +25,7 @@ class StreamCz(Hoster): __type__ = "hoster" __version__ = "0.20" - __pattern__ = r'https?://(?:www\.)?stream\.cz/[^/]+/\d+.*' + __pattern__ = r'https?://(?:www\.)?stream\.cz/[^/]+/\d+' __description__ = """Stream.cz hoster plugin""" __license__ = "GPLv3" diff --git a/module/plugins/hoster/TurbouploadCom.py b/module/plugins/hoster/TurbouploadCom.py index 7dd7b7dce..f0893cef6 100644 --- a/module/plugins/hoster/TurbouploadCom.py +++ b/module/plugins/hoster/TurbouploadCom.py @@ -8,7 +8,7 @@ class TurbouploadCom(DeadHoster): __type__ = "hoster" __version__ = "0.03" - __pattern__ = r'http://(?:www\.)?turboupload\.com/(\w+).*' + __pattern__ = r'http://(?:www\.)?turboupload\.com/(\w+)' __description__ = """Turboupload.com hoster plugin""" __license__ = "GPLv3" diff --git a/module/plugins/hoster/TwoSharedCom.py b/module/plugins/hoster/TwoSharedCom.py index 59a8ce6e1..1dd67f974 100644 --- a/module/plugins/hoster/TwoSharedCom.py +++ b/module/plugins/hoster/TwoSharedCom.py @@ -10,7 +10,7 @@ class TwoSharedCom(SimpleHoster): __type__ = "hoster" __version__ = "0.12" - __pattern__ = r'http://(?:www\.)?2shared\.com/(account/)?(download|get|file|document|photo|video|audio)/.*' + __pattern__ = r'http://(?:www\.)?2shared\.com/(account/)?(download|get|file|document|photo|video|audio)/.+' __description__ = """2Shared.com hoster plugin""" __license__ = "GPLv3" diff --git a/module/plugins/hoster/UloziskoSk.py b/module/plugins/hoster/UloziskoSk.py index b48964771..0afa4e5a5 100644 --- a/module/plugins/hoster/UloziskoSk.py +++ b/module/plugins/hoster/UloziskoSk.py @@ -10,7 +10,7 @@ class UloziskoSk(SimpleHoster): __type__ = "hoster" __version__ = "0.24" - __pattern__ = r'http://(?:www\.)?ulozisko\.sk/.*' + __pattern__ = r'http://(?:www\.)?ulozisko\.sk/.+' __description__ = """Ulozisko.sk hoster plugin""" __license__ = "GPLv3" diff --git a/module/plugins/hoster/WuploadCom.py b/module/plugins/hoster/WuploadCom.py index 8e01c067c..75ce59353 100644 --- a/module/plugins/hoster/WuploadCom.py +++ b/module/plugins/hoster/WuploadCom.py @@ -8,7 +8,7 @@ class WuploadCom(DeadHoster): __type__ = "hoster" __version__ = "0.23" - __pattern__ = r'http://(?:www\.)?wupload\..*?/file/((\w+/)?\d+)(/.*)?' + __pattern__ = r'http://(?:www\.)?wupload\..+?/file/((\w+/)?\d+)(/.*)?' __description__ = """Wupload.com hoster plugin""" __license__ = "GPLv3" diff --git a/module/plugins/hoster/XVideosCom.py b/module/plugins/hoster/XVideosCom.py index d9190805d..9bb2da424 100644 --- a/module/plugins/hoster/XVideosCom.py +++ b/module/plugins/hoster/XVideosCom.py @@ -12,7 +12,7 @@ class XVideosCom(Hoster): __type__ = "hoster" __version__ = "0.10" - __pattern__ = r'http://(?:www\.)?xvideos\.com/video(\d+)/.*' + __pattern__ = r'http://(?:www\.)?xvideos\.com/video(\d+)' __description__ = """XVideos.com hoster plugin""" __license__ = "GPLv3" diff --git a/module/plugins/hoster/YoutubeCom.py b/module/plugins/hoster/YoutubeCom.py index bb0737440..90c6df3c2 100644 --- a/module/plugins/hoster/YoutubeCom.py +++ b/module/plugins/hoster/YoutubeCom.py @@ -39,7 +39,7 @@ class YoutubeCom(Hoster): __type__ = "hoster" __version__ = "0.40" - __pattern__ = r'https?://(?:[^/]*\.)?(?:youtube\.com|youtu\.be)/watch.*?[?&]v=.*' + __pattern__ = r'https?://(?:[^/]*\.)?(?:youtube\.com|youtu\.be)/watch.*?[?&]v=.+' __config__ = [("quality", "sd;hd;fullhd;240p;360p;480p;720p;1080p;3072p", "Quality Setting", "hd"), ("fmt", "int", "FMT/ITAG Number (5-102, 0 for auto)", 0), (".mp4", "bool", "Allow .mp4", True), diff --git a/module/plugins/hoster/ZeveraCom.py b/module/plugins/hoster/ZeveraCom.py index 26d64555b..40ef5de0f 100644 --- a/module/plugins/hoster/ZeveraCom.py +++ b/module/plugins/hoster/ZeveraCom.py @@ -8,7 +8,7 @@ class ZeveraCom(MultiHoster): __type__ = "hoster" __version__ = "0.25" - __pattern__ = r'http://(?:www\.)?zevera\.com/.*' + __pattern__ = r'http://(?:www\.)?zevera\.com/.+' __description__ = """Zevera.com hoster plugin""" __license__ = "GPLv3" -- cgit v1.2.3 From da42bdf16d1c14e5629603ed756b5ed81fa74876 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 27 Dec 2014 13:53:48 +0100 Subject: [AlldebridCom][RealdebridCom] Fix __pattern__ --- module/plugins/hoster/AlldebridCom.py | 4 ++-- module/plugins/hoster/RealdebridCom.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/AlldebridCom.py b/module/plugins/hoster/AlldebridCom.py index 3391f15d4..48dde3ce5 100644 --- a/module/plugins/hoster/AlldebridCom.py +++ b/module/plugins/hoster/AlldebridCom.py @@ -13,9 +13,9 @@ from module.utils import parseFileSize class AlldebridCom(MultiHoster): __name__ = "AlldebridCom" __type__ = "hoster" - __version__ = "0.40" + __version__ = "0.41" - __pattern__ = r'https?://(?:[^/]*\.)?alldebrid\..*' + __pattern__ = r'https?://s\d+\.alldebrid\.com/dl/[\w^_]+' __description__ = """Alldebrid.com hoster plugin""" __license__ = "GPLv3" diff --git a/module/plugins/hoster/RealdebridCom.py b/module/plugins/hoster/RealdebridCom.py index d283ce8ea..e8bb44ee5 100644 --- a/module/plugins/hoster/RealdebridCom.py +++ b/module/plugins/hoster/RealdebridCom.py @@ -14,9 +14,9 @@ from module.utils import parseFileSize class RealdebridCom(MultiHoster): __name__ = "RealdebridCom" __type__ = "hoster" - __version__ = "0.59" + __version__ = "0.60" - __pattern__ = r'https?://(?:[^/]+\.)?real-debrid\..+' + __pattern__ = r'https?://s\d+\.real-debrid\.com/dl/[\w^_]+' __description__ = """Real-Debrid.com hoster plugin""" __license__ = "GPLv3" -- cgit v1.2.3 From 40cbbfb334c83f61f26b9ec0f4487347754ca7a9 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 27 Dec 2014 21:11:12 +0100 Subject: [ZippyshareCom] Fix get_checksum routine --- module/plugins/hoster/ZippyshareCom.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/ZippyshareCom.py b/module/plugins/hoster/ZippyshareCom.py index 67b384c5f..b8ad9b6cb 100644 --- a/module/plugins/hoster/ZippyshareCom.py +++ b/module/plugins/hoster/ZippyshareCom.py @@ -10,7 +10,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class ZippyshareCom(SimpleHoster): __name__ = "ZippyshareCom" __type__ = "hoster" - __version__ = "0.63" + __version__ = "0.64" __pattern__ = r'(?Phttp://www\d{0,2}\.zippyshare\.com)/v(?:/|iew\.jsp.*key=)(?P\d+)' @@ -43,15 +43,16 @@ class ZippyshareCom(SimpleHoster): m = re.search(r'\+[ ]*\((\d+)[ ]*\%[ ]*(\d+)[ ]*\+[ ]*(\d+)[ ]*\%[ ]*(\d+)\)[ ]*\+', self.html) if m: a1, a2, c1, c2 = map(int, m.groups()) + res = (a1 % a2) + (c1 % c2) else: a1, a2 = map(int, re.search(r'\(\'downloadB\'\).omg = (\d+)%(\d+)', self.html).groups()) c1, c2 = map(int, re.search(r'\(\'downloadB\'\).omg\) \* \((\d+)%(\d+)', self.html).groups()) - - b = (a1 % a2) * (c1 % c2) + b = (a1 % a2) * (c1 % c2) + res += 18 except: self.error(_("Unable to calculate checksum")) else: - return b + 18 + return res def get_link(self): -- cgit v1.2.3 From 1cf2a9b292fc131cfac2314072e5de0b154be84c Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 28 Dec 2014 01:06:49 +0100 Subject: [RealdebridCom] Fix __pattern__ (thx titodark) --- module/plugins/hoster/RealdebridCom.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/RealdebridCom.py b/module/plugins/hoster/RealdebridCom.py index e8bb44ee5..5330659ae 100644 --- a/module/plugins/hoster/RealdebridCom.py +++ b/module/plugins/hoster/RealdebridCom.py @@ -14,9 +14,9 @@ from module.utils import parseFileSize class RealdebridCom(MultiHoster): __name__ = "RealdebridCom" __type__ = "hoster" - __version__ = "0.60" + __version__ = "0.61" - __pattern__ = r'https?://s\d+\.real-debrid\.com/dl/[\w^_]+' + __pattern__ = r'https?://(b\.rdb\.so/d/|s\d+\.real-debrid\.com/dl/)[\w^_]+' __description__ = """Real-Debrid.com hoster plugin""" __license__ = "GPLv3" -- cgit v1.2.3 From f6ff07af7da9abcb5af541d186572ca4539662e3 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 28 Dec 2014 02:35:39 +0100 Subject: [ZippyshareCom] Typo --- module/plugins/hoster/ZippyshareCom.py | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/ZippyshareCom.py b/module/plugins/hoster/ZippyshareCom.py index b8ad9b6cb..73dd1f22d 100644 --- a/module/plugins/hoster/ZippyshareCom.py +++ b/module/plugins/hoster/ZippyshareCom.py @@ -10,7 +10,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class ZippyshareCom(SimpleHoster): __name__ = "ZippyshareCom" __type__ = "hoster" - __version__ = "0.64" + __version__ = "0.65" __pattern__ = r'(?Phttp://www\d{0,2}\.zippyshare\.com)/v(?:/|iew\.jsp.*key=)(?P\d+)' @@ -28,8 +28,8 @@ class ZippyshareCom(SimpleHoster): def setup(self): - self.multiDL = True - self.chunkLimit = -1 + self.multiDL = True + self.chunkLimit = -1 self.resumeDownload = True @@ -43,16 +43,17 @@ class ZippyshareCom(SimpleHoster): m = re.search(r'\+[ ]*\((\d+)[ ]*\%[ ]*(\d+)[ ]*\+[ ]*(\d+)[ ]*\%[ ]*(\d+)\)[ ]*\+', self.html) if m: a1, a2, c1, c2 = map(int, m.groups()) - res = (a1 % a2) + (c1 % c2) + b = (a1 % a2) + (c1 % c2) else: - a1, a2 = map(int, re.search(r'\(\'downloadB\'\).omg = (\d+)%(\d+)', self.html).groups()) + a1, a2 = map(int, re.search(r'\(\'downloadB\'\).omg = (\d+)%(\d+)' , self.html).groups()) c1, c2 = map(int, re.search(r'\(\'downloadB\'\).omg\) \* \((\d+)%(\d+)', self.html).groups()) - b = (a1 % a2) * (c1 % c2) - res += 18 - except: - self.error(_("Unable to calculate checksum")) + b = (a1 % a2) * (c1 % c2) + 18 + + except Exception, e: + self.error(_("Unable to calculate checksum"), e) + else: - return res + return b def get_link(self): -- cgit v1.2.3 From 4ef28917ae8be8a0c6f5374bac6116fd1c469bd3 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 28 Dec 2014 11:52:57 +0100 Subject: [MegaCoNz] Private file support --- module/plugins/hoster/MegaCoNz.py | 93 ++++++++++++++++++++++++--------------- 1 file changed, 57 insertions(+), 36 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/MegaCoNz.py b/module/plugins/hoster/MegaCoNz.py index fc6724dc7..db3f8d571 100644 --- a/module/plugins/hoster/MegaCoNz.py +++ b/module/plugins/hoster/MegaCoNz.py @@ -9,11 +9,12 @@ from os import remove from Crypto.Cipher import AES from Crypto.Util import Counter -from pycurl import SSL_CIPHER_LIST +# from pycurl import SSL_CIPHER_LIST from module.common.json_layer import json_loads, json_dumps from module.plugins.Hoster import Hoster + ############################ General errors ################################### # EINTERNAL (-1): An internal error has occurred. Please submit a bug report, detailing the exact circumstances in which this error occurred # EARGS (-2): You have passed invalid arguments to this command @@ -46,15 +47,17 @@ from module.plugins.Hoster import Hoster class MegaCoNz(Hoster): __name__ = "MegaCoNz" __type__ = "hoster" - __version__ = "0.17" + __version__ = "0.20" - __pattern__ = r'https?://(?:www\.)?mega\.co\.nz/#!(?P[\w!-]+)' + __pattern__ = r'https?://(?:www\.)?mega\.co\.nz/#(?PN|)!(?P[\w^_]+)!(?P[\w,\\-]+)' __description__ = """Mega.co.nz hoster plugin""" __license__ = "GPLv3" - __authors__ = [("RaNaN", "ranan@pyload.org")] + __authors__ = [("RaNaN", "ranan@pyload.org"), + ("Walter Purcaro", "vuolter@gmail.com")] + - API_URL = "https://g.api.mega.co.nz/cs" + API_URL = "https://eu.api.mega.co.nz/cs" FILE_SUFFIX = ".crypted" @@ -66,12 +69,17 @@ class MegaCoNz(Hoster): def getCipherKey(self, key): """ Construct the cipher key from the given data """ a = array("I", key) - key_array = array("I", [a[0] ^ a[4], a[1] ^ a[5], a[2] ^ a[6], a[3] ^ a[7]]) - return key_array + k = array("I", [a[0] ^ a[4], a[1] ^ a[5], a[2] ^ a[6], a[3] ^ a[7]]) + iv = a[4:6] + (0, 0) + meta_mac = a[6:8] + + return k, iv, meta_mac - def callApi(self, **kwargs): + + def api_response(self, **kwargs): """ Dispatch a call to the api, see https://mega.co.nz/#developers """ + # generate a session id, no idea where to obtain elsewhere uid = random.randint(10 << 9, 10 ** 10) @@ -81,8 +89,10 @@ class MegaCoNz(Hoster): def decryptAttr(self, data, key): - cbc = AES.new(self.getCipherKey(key), AES.MODE_CBC, "\0" * 16) - attr = cbc.decrypt(self.b64_decode(data)) + k, iv, meta_mac = getCipherKey(key) + cbc = AES.new(k, AES.MODE_CBC, "\0" * 16) + attr = cbc.decrypt(self.b64_decode(data)) + self.logDebug("Decrypted Attr: " + attr) if not attr.startswith("MEGA"): self.fail(_("Decryption failed")) @@ -98,34 +108,37 @@ class MegaCoNz(Hoster): n = key[16:24] # convert counter to long and shift bytes - ctr = Counter.new(128, initial_value=long(n.encode("hex"), 16) << 64) - cipher = AES.new(self.getCipherKey(key), AES.MODE_CTR, counter=ctr) + k, iv, meta_mac = getCipherKey(key) + ctr = Counter.new(128, initial_value=long(n.encode("hex"), 16) << 64) + cipher = AES.new(k, AES.MODE_CTR, counter=ctr) self.pyfile.setStatus("decrypting") - file_crypted = self.lastDownload + file_crypted = self.lastDownload file_decrypted = file_crypted.rsplit(self.FILE_SUFFIX)[0] try: - f = open(file_crypted, "rb") + f = open(file_crypted, "rb") df = open(file_decrypted, "wb") + except IOError, e: self.fail(str(e)) - # TODO: calculate CBC-MAC for checksum + chunk_size = 2 ** 15 # buffer size, 32k + # file_mac = [0, 0, 0, 0] # calculate CBC-MAC for checksum - size = 2 ** 15 # buffer size, 32k while True: - buf = f.read(size) + buf = f.read(chunk_size) if not buf: break - df.write(cipher.decrypt(buf)) + chunk = cipher.decrypt(buf) + df.write(chunk) f.close() df.close() - remove(file_crypted) + remove(file_crypted) self.lastDownload = file_decrypted @@ -133,38 +146,46 @@ class MegaCoNz(Hoster): key = None # match is guaranteed because plugin was chosen to handle url - node = re.match(self.__pattern__, pyfile.url).group('ID') - if "!" in node: - node, key = node.split("!", 1) + pattern = re.match(self.__pattern__, pyfile.url).groupdict() + node = pattern['ID'] + key = pattern['KEY'] + public = pattern['TYPE'] != 'N' - self.logDebug("ID: %s | Key: %s" % (node, key)) + self.logDebug("ID: %s" % node, "Key: %s" % key, "Type: %s" % ("public" if public else "node")) - if not key: - self.fail(_("No file key provided in the URL")) + key = self.b64_decode(key) # g is for requesting a download url # this is similar to the calls in the mega js app, documentation is very bad - dl = self.callApi(a="g", g=1, p=node, ssl=1)[0] + if public: + dl = self.api_response(a="g", g=1, p=node, ssl=1)[0] + else: + dl = self.api_response(a="g", g=1, n=node, ssl=1)[0] if "e" in dl: - e = dl['e'] - # ETEMPUNAVAIL (-18): Resource temporarily not available, please try again later - if e == -18: - self.retry() - else: - self.fail(_("Error code:") + e) + ecode = -dl['e'] - # TODO: map other error codes, e.g - # EACCESS (-11): Access violation (e.g., trying to write to a read-only share) + if ecode in (9, 16, 21): + self.offline() + + elif ecode in (3, 13, 17, 18, 19): + self.tempOffline() + + elif ecode in (1, 4, 6, 10, 15, 21): + self.retry(5, 30, _("Error code: [%s]") % -ecode) + + else: + self.fail(_("Error code: [%s]") % -ecode) - key = self.b64_decode(key) attr = self.decryptAttr(dl['at'], key) pyfile.name = attr['n'] + self.FILE_SUFFIX + pyfile.size = dl['s'] - self.req.http.c.setopt(SSL_CIPHER_LIST, "RC4-MD5:DEFAULT") + # self.req.http.c.setopt(SSL_CIPHER_LIST, "RC4-MD5:DEFAULT") self.download(dl['g']) + self.decryptFile(key) # Everything is finished and final name can be set -- cgit v1.2.3 From 85febdf6ce5666d5e29052eca93361656eb65ac8 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 30 Dec 2014 00:22:47 +0100 Subject: [MegaCoNz] Fixup --- module/plugins/hoster/MegaCoNz.py | 71 +++++++++++++++++++-------------------- 1 file changed, 35 insertions(+), 36 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/MegaCoNz.py b/module/plugins/hoster/MegaCoNz.py index db3f8d571..39eba4a40 100644 --- a/module/plugins/hoster/MegaCoNz.py +++ b/module/plugins/hoster/MegaCoNz.py @@ -47,9 +47,9 @@ from module.plugins.Hoster import Hoster class MegaCoNz(Hoster): __name__ = "MegaCoNz" __type__ = "hoster" - __version__ = "0.20" + __version__ = "0.21" - __pattern__ = r'https?://(?:www\.)?mega\.co\.nz/#(?PN|)!(?P[\w^_]+)!(?P[\w,\\-]+)' + __pattern__ = r'https?://(?:www\.)?mega\.co\.nz/#(?PN)?!(?P[\w^_]+)!(?P[\w,\\-]+)' __description__ = """Mega.co.nz hoster plugin""" __license__ = "GPLv3" @@ -68,11 +68,9 @@ class MegaCoNz(Hoster): def getCipherKey(self, key): """ Construct the cipher key from the given data """ - a = array("I", key) - - k = array("I", [a[0] ^ a[4], a[1] ^ a[5], a[2] ^ a[6], a[3] ^ a[7]]) - iv = a[4:6] + (0, 0) - meta_mac = a[6:8] + k = key[0] ^ key[4], key[1] ^ key[5], key[2] ^ key[6], key[3] ^ key[7] + iv = key[4:6] + (0, 0) + meta_mac = key[6:8] return k, iv, meta_mac @@ -89,7 +87,7 @@ class MegaCoNz(Hoster): def decryptAttr(self, data, key): - k, iv, meta_mac = getCipherKey(key) + k, iv, meta_mac = self.getCipherKey(self.b64_decode(key)) cbc = AES.new(k, AES.MODE_CBC, "\0" * 16) attr = cbc.decrypt(self.b64_decode(data)) @@ -104,11 +102,13 @@ class MegaCoNz(Hoster): def decryptFile(self, key): """ Decrypts the file at lastDownload` """ + key = self.b64_decode(key) + # upper 64 bit of counter start n = key[16:24] # convert counter to long and shift bytes - k, iv, meta_mac = getCipherKey(key) + k, iv, meta_mac = self.getCipherKey(key) ctr = Counter.new(128, initial_value=long(n.encode("hex"), 16) << 64) cipher = AES.new(k, AES.MODE_CTR, counter=ctr) @@ -142,49 +142,48 @@ class MegaCoNz(Hoster): self.lastDownload = file_decrypted - def process(self, pyfile): - key = None + def checkError(self, code): + ecode = abs(code) - # match is guaranteed because plugin was chosen to handle url - pattern = re.match(self.__pattern__, pyfile.url).groupdict() - node = pattern['ID'] - key = pattern['KEY'] - public = pattern['TYPE'] != 'N' + if ecode in (9, 16, 21): + self.offline() - self.logDebug("ID: %s" % node, "Key: %s" % key, "Type: %s" % ("public" if public else "node")) + elif ecode in (3, 13, 17, 18, 19): + self.tempOffline() - key = self.b64_decode(key) + elif ecode in (1, 4, 6, 10, 15, 21): + self.retry(5, 30, _("Error code: [%s]") % -ecode) - # g is for requesting a download url - # this is similar to the calls in the mega js app, documentation is very bad - if public: - dl = self.api_response(a="g", g=1, p=node, ssl=1)[0] else: - dl = self.api_response(a="g", g=1, n=node, ssl=1)[0] + self.fail(_("Error code: [%s]") % -ecode) - if "e" in dl: - ecode = -dl['e'] - if ecode in (9, 16, 21): - self.offline() + def process(self, pyfile): + pattern = re.match(self.__pattern__, pyfile.url).groupdict() + id = pattern['ID'] + key = pattern['KEY'] + public = 'TYPE' not in pattern - elif ecode in (3, 13, 17, 18, 19): - self.tempOffline() + self.logDebug("ID: %s" % id, "Key: %s" % key, "Type: %s" % ("public" if public else "node")) - elif ecode in (1, 4, 6, 10, 15, 21): - self.retry(5, 30, _("Error code: [%s]") % -ecode) + # g is for requesting a download url + # this is similar to the calls in the mega js app, documentation is very bad + if public: + mega = self.api_response(a="g", g=1, p=id, ssl=1)[0] + else: + mega = self.api_response(a="g", g=1, n=id, ssl=1)[0] - else: - self.fail(_("Error code: [%s]") % -ecode) + if "e" in mega: + self.checkError(mega['e']) - attr = self.decryptAttr(dl['at'], key) + attr = self.decryptAttr(mega['at'], key) pyfile.name = attr['n'] + self.FILE_SUFFIX - pyfile.size = dl['s'] + pyfile.size = mega['s'] # self.req.http.c.setopt(SSL_CIPHER_LIST, "RC4-MD5:DEFAULT") - self.download(dl['g']) + self.download(mega['g']) self.decryptFile(key) -- cgit v1.2.3 From fb7c5cf5845c22bb751c824679c856b45a1bb970 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 30 Dec 2014 00:32:18 +0100 Subject: [MegaCoNz] Fixup (2) --- module/plugins/hoster/MegaCoNz.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/MegaCoNz.py b/module/plugins/hoster/MegaCoNz.py index 39eba4a40..00f38ff06 100644 --- a/module/plugins/hoster/MegaCoNz.py +++ b/module/plugins/hoster/MegaCoNz.py @@ -68,6 +68,8 @@ class MegaCoNz(Hoster): def getCipherKey(self, key): """ Construct the cipher key from the given data """ + key = self.b64_decode(key) + k = key[0] ^ key[4], key[1] ^ key[5], key[2] ^ key[6], key[3] ^ key[7] iv = key[4:6] + (0, 0) meta_mac = key[6:8] @@ -87,7 +89,7 @@ class MegaCoNz(Hoster): def decryptAttr(self, data, key): - k, iv, meta_mac = self.getCipherKey(self.b64_decode(key)) + k, iv, meta_mac = self.getCipherKey(key) cbc = AES.new(k, AES.MODE_CBC, "\0" * 16) attr = cbc.decrypt(self.b64_decode(data)) @@ -102,10 +104,8 @@ class MegaCoNz(Hoster): def decryptFile(self, key): """ Decrypts the file at lastDownload` """ - key = self.b64_decode(key) - # upper 64 bit of counter start - n = key[16:24] + n = self.b64_decode(key)[16:24] # convert counter to long and shift bytes k, iv, meta_mac = self.getCipherKey(key) -- cgit v1.2.3 From f23eea11a1db7b742684c2cace195748dd684020 Mon Sep 17 00:00:00 2001 From: gsasch Date: Tue, 30 Dec 2014 02:15:15 +0100 Subject: [UploadableCh] Account --- module/plugins/hoster/UploadableCh.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/UploadableCh.py b/module/plugins/hoster/UploadableCh.py index 6d8a032e9..b09e3ded4 100644 --- a/module/plugins/hoster/UploadableCh.py +++ b/module/plugins/hoster/UploadableCh.py @@ -11,7 +11,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class UploadableCh(SimpleHoster): __name__ = "UploadableCh" __type__ = "hoster" - __version__ = "0.04" + __version__ = "0.05" __pattern__ = r'http://(?:www\.)?uploadable\.ch/file/(?P\w+)' @@ -33,11 +33,6 @@ class UploadableCh(SimpleHoster): RECAPTCHA_KEY = "6LdlJuwSAAAAAPJbPIoUhyqOJd7-yrah5Nhim5S3" - def setup(self): - self.multiDL = False - self.chunkLimit = 1 - - def handleFree(self): # Click the "free user" button and wait a = self.load(self.pyfile.url, cookies=True, post={'downloadLink': "wait"}, decode=True) -- cgit v1.2.3 From 88568cf127542e2757d25705ecfdb2342b7c51b8 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 30 Dec 2014 19:31:19 +0100 Subject: Update some MultiHoster __pattern__ --- module/plugins/hoster/AlldebridCom.py | 4 ++-- module/plugins/hoster/DebridItaliaCom.py | 4 ++-- module/plugins/hoster/MegaDebridEu.py | 4 ++-- module/plugins/hoster/RealdebridCom.py | 4 ++-- module/plugins/hoster/UnrestrictLi.py | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/AlldebridCom.py b/module/plugins/hoster/AlldebridCom.py index 48dde3ce5..d7dbe31a6 100644 --- a/module/plugins/hoster/AlldebridCom.py +++ b/module/plugins/hoster/AlldebridCom.py @@ -13,9 +13,9 @@ from module.utils import parseFileSize class AlldebridCom(MultiHoster): __name__ = "AlldebridCom" __type__ = "hoster" - __version__ = "0.41" + __version__ = "0.42" - __pattern__ = r'https?://s\d+\.alldebrid\.com/dl/[\w^_]+' + __pattern__ = r'https?://(?:www\.|s\d+\.)?alldebrid\.com/dl/[\w^_]+' __description__ = """Alldebrid.com hoster plugin""" __license__ = "GPLv3" diff --git a/module/plugins/hoster/DebridItaliaCom.py b/module/plugins/hoster/DebridItaliaCom.py index 34a306cce..842e3cd63 100644 --- a/module/plugins/hoster/DebridItaliaCom.py +++ b/module/plugins/hoster/DebridItaliaCom.py @@ -8,9 +8,9 @@ from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo class DebridItaliaCom(MultiHoster): __name__ = "DebridItaliaCom" __type__ = "hoster" - __version__ = "0.15" + __version__ = "0.16" - __pattern__ = r'http://s\d+\.debriditalia\.com/dl/\d+' + __pattern__ = r'https?://(?:www\.|s\d+\.)?debriditalia\.com/dl/\d+' __description__ = """Debriditalia.com hoster plugin""" __license__ = "GPLv3" diff --git a/module/plugins/hoster/MegaDebridEu.py b/module/plugins/hoster/MegaDebridEu.py index 6b9f463d5..6e24cc7ba 100644 --- a/module/plugins/hoster/MegaDebridEu.py +++ b/module/plugins/hoster/MegaDebridEu.py @@ -11,9 +11,9 @@ from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo class MegaDebridEu(MultiHoster): __name__ = "MegaDebridEu" __type__ = "hoster" - __version__ = "0.44" + __version__ = "0.45" - __pattern__ = r'http://((www\d+|s\d+)\.mega-debrid\.eu|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})/download/file/[\w^_]+' + __pattern__ = r'http://((?:www\d+\.|s\d+\.)?mega-debrid\.eu|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})/download/file/[\w^_]+' __description__ = """mega-debrid.eu hoster plugin""" __license__ = "GPLv3" diff --git a/module/plugins/hoster/RealdebridCom.py b/module/plugins/hoster/RealdebridCom.py index 5330659ae..0332ae9da 100644 --- a/module/plugins/hoster/RealdebridCom.py +++ b/module/plugins/hoster/RealdebridCom.py @@ -14,9 +14,9 @@ from module.utils import parseFileSize class RealdebridCom(MultiHoster): __name__ = "RealdebridCom" __type__ = "hoster" - __version__ = "0.61" + __version__ = "0.62" - __pattern__ = r'https?://(b\.rdb\.so/d/|s\d+\.real-debrid\.com/dl/)[\w^_]+' + __pattern__ = r'https?://((?:www\.|s\d+\.)?real-debrid\.com/dl/|[\w^_]\.rdb\.so/d/)[\w^_]+' __description__ = """Real-Debrid.com hoster plugin""" __license__ = "GPLv3" diff --git a/module/plugins/hoster/UnrestrictLi.py b/module/plugins/hoster/UnrestrictLi.py index 6e16cace7..c84f1daa7 100644 --- a/module/plugins/hoster/UnrestrictLi.py +++ b/module/plugins/hoster/UnrestrictLi.py @@ -12,9 +12,9 @@ from module.plugins.internal.SimpleHoster import secondsToMidnight class UnrestrictLi(MultiHoster): __name__ = "UnrestrictLi" __type__ = "hoster" - __version__ = "0.19" + __version__ = "0.20" - __pattern__ = r'https?://(?:[^/]*\.)?(unrestrict|unr)\.li' + __pattern__ = r'https?://(?:www\.)?(unrestrict|unr)\.li/dl/[\w^_]+' __description__ = """Unrestrict.li hoster plugin""" __license__ = "GPLv3" -- cgit v1.2.3 From dbab8fd6cda68f2650e97a5d68a055c4424cd3a4 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Wed, 31 Dec 2014 00:08:37 +0100 Subject: [LetitbitNet] Use getURL instead urlopen --- module/plugins/hoster/LetitbitNet.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/LetitbitNet.py b/module/plugins/hoster/LetitbitNet.py index a7b11047f..f3921fdb7 100644 --- a/module/plugins/hoster/LetitbitNet.py +++ b/module/plugins/hoster/LetitbitNet.py @@ -8,18 +8,18 @@ import re -from urllib import urlencode, urlopen from urlparse import urljoin from module.common.json_layer import json_loads, json_dumps +from module.network.RequestFactory import getURL from module.plugins.internal.CaptchaService import ReCaptcha from module.plugins.internal.SimpleHoster import SimpleHoster, secondsToMidnight def api_download_info(url): json_data = ["yw7XQy2v9", ["download/info", {"link": url}]] - post_data = urlencode({'r': json_dumps(json_data)}) - api_rep = urlopen("http://api.letitbit.net/json", data=post_data).read() + api_rep = getURL("http://api.letitbit.net/json", + post={'r': json_dumps(json_data)}) return json_loads(api_rep) @@ -36,7 +36,7 @@ def getInfo(urls): class LetitbitNet(SimpleHoster): __name__ = "LetitbitNet" __type__ = "hoster" - __version__ = "0.27" + __version__ = "0.28" __pattern__ = r'https?://(?:www\.)?(letitbit|shareflare)\.net/download/.+' -- cgit v1.2.3 From d07caf13ccfd9b4ca6066078764f9a9267423ff1 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Wed, 31 Dec 2014 00:28:56 +0100 Subject: Handle methods get pyfile argument (2) --- module/plugins/hoster/MultishareCz.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/MultishareCz.py b/module/plugins/hoster/MultishareCz.py index adbae2da4..af09581c8 100644 --- a/module/plugins/hoster/MultishareCz.py +++ b/module/plugins/hoster/MultishareCz.py @@ -10,7 +10,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class MultishareCz(SimpleHoster): __name__ = "MultishareCz" __type__ = "hoster" - __version__ = "0.36" + __version__ = "0.37" __pattern__ = r'http://(?:www\.)?multishare\.cz/stahnout/(?P\d+)' @@ -39,8 +39,8 @@ class MultishareCz(SimpleHoster): self.download("http://www.multishare.cz/html/download_premium.php?ID=%s" % self.info['pattern']['ID']) - def handleMulti(self): - self.html = self.load('http://www.multishare.cz/html/mms_ajax.php', post={"link": self.pyfile.url}, decode=True) + def handleMulti(self, pyfile): + self.html = self.load('http://www.multishare.cz/html/mms_ajax.php', post={"link": pyfile.url}, decode=True) self.checkInfo() @@ -48,7 +48,7 @@ class MultishareCz(SimpleHoster): self.fail(_("Not enough credit left to download file")) url = "http://dl%d.mms.multishare.cz/html/mms_process.php" % round(random() * 10000 * random()) - params = {"u_ID": self.acc_info['u_ID'], "u_hash": self.acc_info['u_hash'], "link": self.pyfile.url} + params = {"u_ID": self.acc_info['u_ID'], "u_hash": self.acc_info['u_hash'], "link": pyfile.url} self.logDebug(url, params) -- cgit v1.2.3 From 5224873c278ccfc6f1b4d4289b34217cb1560053 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Wed, 31 Dec 2014 01:12:36 +0100 Subject: [MegaCoNz] Fix https://github.com/pyload/pyload/issues/989 --- module/plugins/hoster/MegaCoNz.py | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/MegaCoNz.py b/module/plugins/hoster/MegaCoNz.py index 00f38ff06..e404c38a1 100644 --- a/module/plugins/hoster/MegaCoNz.py +++ b/module/plugins/hoster/MegaCoNz.py @@ -47,9 +47,9 @@ from module.plugins.Hoster import Hoster class MegaCoNz(Hoster): __name__ = "MegaCoNz" __type__ = "hoster" - __version__ = "0.21" + __version__ = "0.22" - __pattern__ = r'https?://(?:www\.)?mega\.co\.nz/#(?PN)?!(?P[\w^_]+)!(?P[\w,\\-]+)' + __pattern__ = r'https?://(?:www\.)?mega\.co\.nz/#(?PN|)!(?P[\w^_]+)!(?P[\w,\\-]+)' __description__ = """Mega.co.nz hoster plugin""" __license__ = "GPLv3" @@ -68,11 +68,11 @@ class MegaCoNz(Hoster): def getCipherKey(self, key): """ Construct the cipher key from the given data """ - key = self.b64_decode(key) + a = array("I", self.b64_decode(key)) - k = key[0] ^ key[4], key[1] ^ key[5], key[2] ^ key[6], key[3] ^ key[7] - iv = key[4:6] + (0, 0) - meta_mac = key[6:8] + k = array("I", (a[0] ^ a[4], a[1] ^ a[5], a[2] ^ a[6], a[3] ^ a[7])) + iv = a[4:6] + array("I", (0, 0)) + meta_mac = a[6:8] return k, iv, meta_mac @@ -162,7 +162,7 @@ class MegaCoNz(Hoster): pattern = re.match(self.__pattern__, pyfile.url).groupdict() id = pattern['ID'] key = pattern['KEY'] - public = 'TYPE' not in pattern + public = pattern['TYPE'] == '' self.logDebug("ID: %s" % id, "Key: %s" % key, "Type: %s" % ("public" if public else "node")) @@ -173,7 +173,9 @@ class MegaCoNz(Hoster): else: mega = self.api_response(a="g", g=1, n=id, ssl=1)[0] - if "e" in mega: + if isinstance(mega, int): + self.checkError(mega) + elif "e" in mega: self.checkError(mega['e']) attr = self.decryptAttr(mega['at'], key) -- cgit v1.2.3 From d614989f0f881205bf5cee8b16ec2e5ff2527060 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Wed, 31 Dec 2014 17:04:08 +0100 Subject: [MegaCoNz] Fix https://github.com/pyload/pyload/issues/367 --- module/plugins/hoster/MegaCoNz.py | 37 +++++++++++++++++++++++++++++++------ 1 file changed, 31 insertions(+), 6 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/MegaCoNz.py b/module/plugins/hoster/MegaCoNz.py index e404c38a1..55a2c5abf 100644 --- a/module/plugins/hoster/MegaCoNz.py +++ b/module/plugins/hoster/MegaCoNz.py @@ -1,11 +1,12 @@ # -*- coding: utf-8 -*- +import math +import os import random import re from array import array from base64 import standard_b64decode -from os import remove from Crypto.Cipher import AES from Crypto.Util import Counter @@ -13,6 +14,7 @@ from Crypto.Util import Counter from module.common.json_layer import json_loads, json_dumps from module.plugins.Hoster import Hoster +from module.utils import decode ############################ General errors ################################### @@ -47,7 +49,7 @@ from module.plugins.Hoster import Hoster class MegaCoNz(Hoster): __name__ = "MegaCoNz" __type__ = "hoster" - __version__ = "0.22" + __version__ = "0.23" __pattern__ = r'https?://(?:www\.)?mega\.co\.nz/#(?PN|)!(?P[\w^_]+)!(?P[\w,\\-]+)' @@ -91,9 +93,9 @@ class MegaCoNz(Hoster): def decryptAttr(self, data, key): k, iv, meta_mac = self.getCipherKey(key) cbc = AES.new(k, AES.MODE_CBC, "\0" * 16) - attr = cbc.decrypt(self.b64_decode(data)) + attr = decode(cbc.decrypt(self.b64_decode(data))) - self.logDebug("Decrypted Attr: " + attr) + self.logDebug("Decrypted Attr: %s" % attr) if not attr.startswith("MEGA"): self.fail(_("Decryption failed")) @@ -113,6 +115,7 @@ class MegaCoNz(Hoster): cipher = AES.new(k, AES.MODE_CTR, counter=ctr) self.pyfile.setStatus("decrypting") + self.pyfile.setProgress(0) file_crypted = self.lastDownload file_decrypted = file_crypted.rsplit(self.FILE_SUFFIX)[0] @@ -127,7 +130,8 @@ class MegaCoNz(Hoster): chunk_size = 2 ** 15 # buffer size, 32k # file_mac = [0, 0, 0, 0] # calculate CBC-MAC for checksum - while True: + chunks = int(math.ceil(os.path.getsize(file_crypted) / chunk_size)) + for i in xrange(chunks): buf = f.read(chunk_size) if not buf: break @@ -135,10 +139,31 @@ class MegaCoNz(Hoster): chunk = cipher.decrypt(buf) df.write(chunk) + self.pyfile.setProgress(int((100.0 / chunks) * i)) + + # chunk_mac = [iv[0], iv[1], iv[0], iv[1]] + # for i in xrange(0, chunk_size, 16): + # block = chunk[i:i+16] + # if len(block) % 16: + # block += '=' * (16 - (len(block) % 16)) + # block = array("I", block) + + # chunk_mac = [chunk_mac[0] ^ a_[0], chunk_mac[1] ^ block[1], chunk_mac[2] ^ block[2], chunk_mac[3] ^ block[3]] + # chunk_mac = aes_cbc_encrypt_a32(chunk_mac, k) + + # file_mac = [file_mac[0] ^ chunk_mac[0], file_mac[1] ^ chunk_mac[1], file_mac[2] ^ chunk_mac[2], file_mac[3] ^ chunk_mac[3]] + # file_mac = aes_cbc_encrypt_a32(file_mac, k) + + self.pyfile.setProgress(100) + f.close() df.close() - remove(file_crypted) + # if file_mac[0] ^ file_mac[1], file_mac[2] ^ file_mac[3] != meta_mac: + # os.remove(file_decrypted) + # self.fail("Checksum mismatch") + + os.remove(file_crypted) self.lastDownload = file_decrypted -- cgit v1.2.3 From 09d2933c116e5eab8c8abaae2c98144ebc901b05 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Thu, 1 Jan 2015 01:46:49 +0100 Subject: [NowDownloadSx] Improve __pattern__ --- module/plugins/hoster/NowDownloadSx.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/NowDownloadSx.py b/module/plugins/hoster/NowDownloadSx.py index d2ae08954..0480b20bf 100644 --- a/module/plugins/hoster/NowDownloadSx.py +++ b/module/plugins/hoster/NowDownloadSx.py @@ -9,9 +9,9 @@ from module.utils import fixup class NowDownloadSx(SimpleHoster): __name__ = "NowDownloadSx" __type__ = "hoster" - __version__ = "0.05" + __version__ = "0.06" - __pattern__ = r'http://(?:www\.)?nowdownload\.(at|ch|co|eu|sx)/(dl/|download\.php\?id=)\w+' + __pattern__ = r'http://(?:www\.)?(nowdownload\.(at|ch|co|eu|sx)/(dl/|download\.php\?id=)|likeupload\.org/)\w+' __description__ = """NowDownload.sx hoster plugin""" __license__ = "GPLv3" -- cgit v1.2.3 From 2907ad099a4ac1faa1c5661feb02bbdbce0b5244 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Thu, 1 Jan 2015 01:47:26 +0100 Subject: [NowVideoSx] Improve __pattern__ --- module/plugins/hoster/NowVideoSx.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/NowVideoSx.py b/module/plugins/hoster/NowVideoSx.py index d0777ca4b..0dedfbd42 100644 --- a/module/plugins/hoster/NowVideoSx.py +++ b/module/plugins/hoster/NowVideoSx.py @@ -8,9 +8,9 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class NowVideoSx(SimpleHoster): __name__ = "NowVideoSx" __type__ = "hoster" - __version__ = "0.08" + __version__ = "0.09" - __pattern__ = r'http://(?:www\.)?nowvideo\.(at|ch|co|eu|sx)/(video|mobile/#/videos)/(?P\w+)' + __pattern__ = r'http://(?:www\.)?nowvideo\.(at|ch|co|eu|li|sx)/(video|mobile/#/videos)/(?P\w+)' __description__ = """NowVideo.sx hoster plugin""" __license__ = "GPLv3" -- cgit v1.2.3 From c06dbc2e7b7fbba6ad6de3a28b4fcf21df04814d Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 2 Jan 2015 01:11:12 +0100 Subject: [RapiduNet] Fixup (2) --- module/plugins/hoster/RapiduNet.py | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/RapiduNet.py b/module/plugins/hoster/RapiduNet.py index a3b2cffcd..163edfe34 100644 --- a/module/plugins/hoster/RapiduNet.py +++ b/module/plugins/hoster/RapiduNet.py @@ -13,13 +13,13 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class RapiduNet(SimpleHoster): __name__ = "RapiduNet" __type__ = "hoster" - __version__ = "0.02" + __version__ = "0.03" __pattern__ = r'https?://(?:www\.)?rapidu\.net/(?P\d{10})' __description__ = """Rapidu.net hoster plugin""" __license__ = "GPLv3" - __authors__ = [("prOq", None)] + __authors__ = [("prOq", "")] COOKIES = [("rapidu.net", "rapidu_lang", "en")] @@ -34,22 +34,24 @@ class RapiduNet(SimpleHoster): def setup(self): self.resumeDownload = True - self.multiDL = True - self.limitDL = 0 if self.premium else 2 + self.multiDL = self.premium def handleFree(self): self.req.http.lastURL = self.pyfile.url self.req.http.c.setopt(HTTPHEADER, ["X-Requested-With: XMLHttpRequest"]) - jsvars = self.getJsonResponse("https://rapidu.net/ajax.php?a=getLoadTimeToDownload", {'_go': None}) + jsvars = self.getJsonResponse("https://rapidu.net/ajax.php", + get={'a': "getLoadTimeToDownload"}, + post={'_go': ""}, + decode=True) if str(jsvars['timeToDownload']) is "stop": - t = (24 * 60 * 60) - (int(time()) % (24 *60 * 60)) + altzone + t = (24 * 60 * 60) - (int(time()) % (24 * 60 * 60)) + altzone self.logInfo("You've reach your daily download transfer") - self.retry(10, 10 if t < 1 else None, "Try tomorrow again") #@NOTE: check t in case of not synchronised clock + self.retry(10, 10 if t < 1 else None, _("Try tomorrow again")) #@NOTE: check t in case of not synchronised clock else: self.wait(int(jsvars['timeToDownload']) - int(time())) @@ -59,18 +61,20 @@ class RapiduNet(SimpleHoster): for _i in xrange(10): challenge, response = recaptcha.challenge(self.RECAPTCHA_KEY) - jsvars = self.getJsonResponse("https://rapidu.net/ajax.php?a=getCheckCaptcha", - {'_go' : None, - 'captcha1': challenge, - 'captcha2': response, - 'fileId' : self.info['ID']}) + jsvars = self.getJsonResponse("https://rapidu.net/ajax.php", + get={'a': "getCheckCaptcha"}, + post={'_go' : "", + 'captcha1': challenge, + 'captcha2': response, + 'fileId' : self.info['ID']}, + decode=True) if jsvars['message'] == 'success': self.download(jsvars['url']) break - def getJsonResponse(self, url, post_data): - res = self.load(url, post=post_data, decode=True) + def getJsonResponse(self, *args, **kwargs): + res = self.load(*args, **kwargs) if not res.startswith('{'): self.retry() -- cgit v1.2.3 From e0cba81ae8d59ee24e1cd1f1cf1697c5e61118ce Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 2 Jan 2015 02:37:18 +0100 Subject: [PremiumTo] Fixup --- module/plugins/hoster/PremiumTo.py | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/PremiumTo.py b/module/plugins/hoster/PremiumTo.py index fa4caad5a..5dd8e3bec 100644 --- a/module/plugins/hoster/PremiumTo.py +++ b/module/plugins/hoster/PremiumTo.py @@ -3,8 +3,6 @@ from __future__ import with_statement from os import remove -from os.path import exists -from urllib import quote from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo from module.utils import fs_encode @@ -13,7 +11,7 @@ from module.utils import fs_encode class PremiumTo(MultiHoster): __name__ = "PremiumTo" __type__ = "hoster" - __version__ = "0.16" + __version__ = "0.17" __pattern__ = r'https?://(?:www\.)?premium\.to/.+' @@ -24,20 +22,12 @@ class PremiumTo(MultiHoster): ("stickell", "l.stickell@yahoo.it")] - def setup(self): - self.resumeDownload = True - self.chunkLimit = 1 - - def handlePremium(self): #raise timeout to 2min - self.req.setOption("timeout", 120) - - self.link = True self.download("http://premium.to/api/getfile.php", get={'username': self.account.username, 'password': self.account.password, - 'link' : quote(self.pyfile.url, "")}, + 'link' : self.pyfile.url}, disposition=True) -- cgit v1.2.3 From ea58af3c625d90aec6becfd943289e42e4a71a9a Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 2 Jan 2015 02:49:26 +0100 Subject: Code cosmetics --- module/plugins/hoster/AlldebridCom.py | 3 +-- module/plugins/hoster/DebridItaliaCom.py | 5 ----- module/plugins/hoster/EuroshareEu.py | 5 ----- module/plugins/hoster/FastixRu.py | 3 +-- module/plugins/hoster/FreeWayMe.py | 12 +++++++----- module/plugins/hoster/LinksnappyCom.py | 5 ----- module/plugins/hoster/MyfastfileCom.py | 3 +-- module/plugins/hoster/OverLoadMe.py | 3 +-- module/plugins/hoster/RPNetBiz.py | 3 +-- module/plugins/hoster/RealdebridCom.py | 3 +-- module/plugins/hoster/SimplyPremiumCom.py | 3 +-- module/plugins/hoster/SimplydebridCom.py | 6 ------ module/plugins/hoster/ZeveraCom.py | 6 ------ 13 files changed, 14 insertions(+), 46 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/AlldebridCom.py b/module/plugins/hoster/AlldebridCom.py index d7dbe31a6..751ff415c 100644 --- a/module/plugins/hoster/AlldebridCom.py +++ b/module/plugins/hoster/AlldebridCom.py @@ -35,8 +35,7 @@ class AlldebridCom(MultiHoster): def setup(self): - self.chunkLimit = 16 - self.resumeDownload = True + self.chunkLimit = 16 def handlePremium(self): diff --git a/module/plugins/hoster/DebridItaliaCom.py b/module/plugins/hoster/DebridItaliaCom.py index 842e3cd63..11b6da918 100644 --- a/module/plugins/hoster/DebridItaliaCom.py +++ b/module/plugins/hoster/DebridItaliaCom.py @@ -21,11 +21,6 @@ class DebridItaliaCom(MultiHoster): URL_REPLACEMENTS = [("https://", "http://")] - def setup(self): - self.chunkLimit = 1 - self.resumeDownload = True - - def handlePremium(self): self.html = self.load("http://www.debriditalia.com/api.php", get={'generate': "on", 'link': self.pyfile.url, 'p': self.getPassword()}) diff --git a/module/plugins/hoster/EuroshareEu.py b/module/plugins/hoster/EuroshareEu.py index cc10abb37..2ebdfb3ff 100644 --- a/module/plugins/hoster/EuroshareEu.py +++ b/module/plugins/hoster/EuroshareEu.py @@ -27,11 +27,6 @@ class EuroshareEu(SimpleHoster): URL_REPLACEMENTS = [(r"(http://[^/]*\.)(sk|cz|hu|pl)/", r"\1eu/")] - def setup(self): - self.multiDL = self.resumeDownload = self.premium - self.req.setOption("timeout", 120) - - def handlePremium(self): if self.ERR_NOT_LOGGED_IN_PATTERN in self.html: self.account.relogin(self.user) diff --git a/module/plugins/hoster/FastixRu.py b/module/plugins/hoster/FastixRu.py index 5f6fd2d4c..b68c79ebc 100644 --- a/module/plugins/hoster/FastixRu.py +++ b/module/plugins/hoster/FastixRu.py @@ -32,8 +32,7 @@ class FastixRu(MultiHoster): def setup(self): - self.chunkLimit = 3 - self.resumeDownload = True + self.chunkLimit = 3 def handlePremium(self): diff --git a/module/plugins/hoster/FreeWayMe.py b/module/plugins/hoster/FreeWayMe.py index 80d0b8515..50131e28e 100644 --- a/module/plugins/hoster/FreeWayMe.py +++ b/module/plugins/hoster/FreeWayMe.py @@ -24,11 +24,13 @@ class FreeWayMe(MultiHoster): def handlePremium(self): user, data = self.account.selectAccount() - self.link = True - self.download( - "https://www.free-way.me/load.php", - get={"multiget": 7, "url": self.pyfile.url, "user": user, "pw": self.account.getpw(user), "json": ""}, - disposition=True) + self.download("https://www.free-way.me/load.php", + get={'multiget': 7, + 'url' : self.pyfile.url, + 'user' : user, + 'pw' : self.account.getpw(user), + 'json' : ""}, + disposition=True) getInfo = create_getInfo(FreeWayMe) diff --git a/module/plugins/hoster/LinksnappyCom.py b/module/plugins/hoster/LinksnappyCom.py index 90a47d1ac..b7127c066 100644 --- a/module/plugins/hoster/LinksnappyCom.py +++ b/module/plugins/hoster/LinksnappyCom.py @@ -23,11 +23,6 @@ class LinksnappyCom(MultiHoster): SINGLE_CHUNK_HOSTERS = ('easybytez.com') - def setup(self): - self.chunkLimit = -1 - self.resumeDownload = True - - def handlePremium(self): host = self._get_host(self.pyfile.url) json_params = json_dumps({'link': self.pyfile.url, diff --git a/module/plugins/hoster/MyfastfileCom.py b/module/plugins/hoster/MyfastfileCom.py index b5b9ec820..13ba2af21 100644 --- a/module/plugins/hoster/MyfastfileCom.py +++ b/module/plugins/hoster/MyfastfileCom.py @@ -19,8 +19,7 @@ class MyfastfileCom(MultiHoster): def setup(self): - self.chunkLimit = -1 - self.resumeDownload = True + self.chunkLimit = -1 def handlePremium(self): diff --git a/module/plugins/hoster/OverLoadMe.py b/module/plugins/hoster/OverLoadMe.py index 54f869635..f7c068b58 100644 --- a/module/plugins/hoster/OverLoadMe.py +++ b/module/plugins/hoster/OverLoadMe.py @@ -33,8 +33,7 @@ class OverLoadMe(MultiHoster): def setup(self): - self.chunkLimit = 5 - self.resumeDownload = True + self.chunkLimit = 5 def handlePremium(self): diff --git a/module/plugins/hoster/RPNetBiz.py b/module/plugins/hoster/RPNetBiz.py index bffa5ef85..efd5d54ee 100644 --- a/module/plugins/hoster/RPNetBiz.py +++ b/module/plugins/hoster/RPNetBiz.py @@ -19,8 +19,7 @@ class RPNetBiz(MultiHoster): def setup(self): - self.chunkLimit = -1 - self.resumeDownload = True + self.chunkLimit = -1 def handlePremium(self): diff --git a/module/plugins/hoster/RealdebridCom.py b/module/plugins/hoster/RealdebridCom.py index 0332ae9da..49cfc01f7 100644 --- a/module/plugins/hoster/RealdebridCom.py +++ b/module/plugins/hoster/RealdebridCom.py @@ -34,8 +34,7 @@ class RealdebridCom(MultiHoster): def setup(self): - self.chunkLimit = 3 - self.resumeDownload = True + self.chunkLimit = 3 def handlePremium(self): diff --git a/module/plugins/hoster/SimplyPremiumCom.py b/module/plugins/hoster/SimplyPremiumCom.py index bf7c43af6..fe38cff6e 100644 --- a/module/plugins/hoster/SimplyPremiumCom.py +++ b/module/plugins/hoster/SimplyPremiumCom.py @@ -21,8 +21,7 @@ class SimplyPremiumCom(MultiHoster): def setup(self): - self.chunkLimit = 16 - self.resumeDownload = False + self.chunkLimit = 16 def handlePremium(self): diff --git a/module/plugins/hoster/SimplydebridCom.py b/module/plugins/hoster/SimplydebridCom.py index 5e6b47efc..8211d40d4 100644 --- a/module/plugins/hoster/SimplydebridCom.py +++ b/module/plugins/hoster/SimplydebridCom.py @@ -17,12 +17,6 @@ class SimplydebridCom(MultiHoster): __authors__ = [("Kagenoshin", "kagenoshin@gmx.ch")] - def setup(self): - self.resumeDownload = True - self.multiDL = True - self.chunkLimit = 1 - - def handlePremium(self): #fix the links for simply-debrid.com! self.link = self.pyfile.url diff --git a/module/plugins/hoster/ZeveraCom.py b/module/plugins/hoster/ZeveraCom.py index 40ef5de0f..60fc2a12b 100644 --- a/module/plugins/hoster/ZeveraCom.py +++ b/module/plugins/hoster/ZeveraCom.py @@ -15,12 +15,6 @@ class ZeveraCom(MultiHoster): __authors__ = [("zoidberg", "zoidberg@mujmail.cz")] - def setup(self): - self.resumeDownload = True - self.multiDL = True - self.chunkLimit = 1 - - def handlePremium(self): if self.account.getAPIData(self.req, cmd="checklink", olink=self.pyfile.url) != "Alive": self.fail(_("Offline or not downloadable")) -- cgit v1.2.3 From f1d3c4cdd0a983087648a2524b5e13b263ef5a71 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 2 Jan 2015 02:50:07 +0100 Subject: [MultishareCz] Parse download content-disposition --- module/plugins/hoster/MultishareCz.py | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/MultishareCz.py b/module/plugins/hoster/MultishareCz.py index af09581c8..ee84f613f 100644 --- a/module/plugins/hoster/MultishareCz.py +++ b/module/plugins/hoster/MultishareCz.py @@ -10,7 +10,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class MultishareCz(SimpleHoster): __name__ = "MultishareCz" __type__ = "hoster" - __version__ = "0.37" + __version__ = "0.38" __pattern__ = r'http://(?:www\.)?multishare\.cz/stahnout/(?P\d+)' @@ -47,13 +47,11 @@ class MultishareCz(SimpleHoster): if not self.checkCredit(): self.fail(_("Not enough credit left to download file")) - url = "http://dl%d.mms.multishare.cz/html/mms_process.php" % round(random() * 10000 * random()) - params = {"u_ID": self.acc_info['u_ID'], "u_hash": self.acc_info['u_hash'], "link": pyfile.url} - - self.logDebug(url, params) - - self.link = True - self.download(url, get=params) + self.download("http://dl%d.mms.multishare.cz/html/mms_process.php" % round(random() * 10000 * random()), + get={'u_ID' : self.acc_info['u_ID'], + 'u_hash': self.acc_info['u_hash'], + 'link' : pyfile.url}, + disposition=True) def checkCredit(self): -- cgit v1.2.3 From ca08d2dacde1685807bfdb4c876e070af2032f25 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 2 Jan 2015 02:51:21 +0100 Subject: [RehostTo] Fixup --- module/plugins/hoster/RehostTo.py | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/RehostTo.py b/module/plugins/hoster/RehostTo.py index 2971a6781..8cfe833fd 100644 --- a/module/plugins/hoster/RehostTo.py +++ b/module/plugins/hoster/RehostTo.py @@ -8,7 +8,7 @@ from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo class RehostTo(MultiHoster): __name__ = "RehostTo" __type__ = "hoster" - __version__ = "0.16" + __version__ = "0.17" __pattern__ = r'https?://.*rehost\.to\..+' @@ -21,21 +21,14 @@ class RehostTo(MultiHoster): return unquote(url.rsplit("/", 1)[1]) - def setup(self): - self.chunkLimit = 1 - self.resumeDownload = True - - def handlePremium(self): - data = self.account.getAccountInfo(self.user) + data = self.account.getAccountInfo(self.user) long_ses = data['long_ses'] - #raise timeout to 2min - self.req.setOption("timeout", 120) - - self.link = True self.download("http://rehost.to/process_download.php", - get={'user': "cookie", 'pass': long_ses, 'dl': quote(self.pyfile.url, "")}, + get={'user': "cookie", + 'pass': long_ses, + 'dl' : self.pyfile.url}, disposition=True) -- cgit v1.2.3 From ce9e5bf944d33c762cc18b118b5325049d1d0fec Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 2 Jan 2015 13:40:13 +0100 Subject: [PremiumTo] Don't handle direct link --- module/plugins/hoster/PremiumTo.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/PremiumTo.py b/module/plugins/hoster/PremiumTo.py index 5dd8e3bec..8a998c816 100644 --- a/module/plugins/hoster/PremiumTo.py +++ b/module/plugins/hoster/PremiumTo.py @@ -11,9 +11,9 @@ from module.utils import fs_encode class PremiumTo(MultiHoster): __name__ = "PremiumTo" __type__ = "hoster" - __version__ = "0.17" + __version__ = "0.18" - __pattern__ = r'https?://(?:www\.)?premium\.to/.+' + __pattern__ = r'^unmatchable$' __description__ = """Premium.to hoster plugin""" __license__ = "GPLv3" @@ -34,7 +34,7 @@ class PremiumTo(MultiHoster): def checkFile(self): super(PremiumTo, self).checkFile() - check = self.checkDownload({"nopremium": "No premium account available"}) + check = self.checkDownload({'nopremium': "No premium account available"}) if check == "nopremium": self.retry(60, 5 * 60, "No premium account available") -- cgit v1.2.3 From 8d1231901b3ccccdc2d3d2593c0baf4ff7be4220 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 2 Jan 2015 15:46:46 +0100 Subject: Spare code cosmetics --- module/plugins/hoster/RealdebridCom.py | 2 +- module/plugins/hoster/RehostTo.py | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/RealdebridCom.py b/module/plugins/hoster/RealdebridCom.py index 49cfc01f7..5a31cc388 100644 --- a/module/plugins/hoster/RealdebridCom.py +++ b/module/plugins/hoster/RealdebridCom.py @@ -3,7 +3,7 @@ import re from random import randrange -from urllib import quote, unquote +from urllib import unquote from time import time from module.common.json_layer import json_loads diff --git a/module/plugins/hoster/RehostTo.py b/module/plugins/hoster/RehostTo.py index 8cfe833fd..5dd17e374 100644 --- a/module/plugins/hoster/RehostTo.py +++ b/module/plugins/hoster/RehostTo.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -from urllib import quote, unquote +from urllib import unquote from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo @@ -22,12 +22,11 @@ class RehostTo(MultiHoster): def handlePremium(self): - data = self.account.getAccountInfo(self.user) - long_ses = data['long_ses'] + data = self.account.getAccountInfo(self.user) self.download("http://rehost.to/process_download.php", get={'user': "cookie", - 'pass': long_ses, + 'pass': data['long_ses'], 'dl' : self.pyfile.url}, disposition=True) -- cgit v1.2.3 From d811bb9a436888e5c0f50c71fb6cdafa053ceb51 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 3 Jan 2015 01:00:24 +0100 Subject: [StreamcloudEu] Fix WAIT_PATTERN --- module/plugins/hoster/StreamcloudEu.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/StreamcloudEu.py b/module/plugins/hoster/StreamcloudEu.py index 4f854a99d..b9d6d9ae6 100644 --- a/module/plugins/hoster/StreamcloudEu.py +++ b/module/plugins/hoster/StreamcloudEu.py @@ -8,7 +8,7 @@ from module.plugins.internal.XFSHoster import XFSHoster, create_getInfo class StreamcloudEu(XFSHoster): __name__ = "StreamcloudEu" __type__ = "hoster" - __version__ = "0.09" + __version__ = "0.10" __pattern__ = r'http://(?:www\.)?streamcloud\.eu/\w{12}' @@ -19,12 +19,14 @@ class StreamcloudEu(XFSHoster): HOSTER_DOMAIN = "streamcloud.eu" + WAIT_PATTERN = r'var count = (\d+)' + LINK_PATTERN = r'file: "(http://(stor|cdn)\d+\.streamcloud\.eu:?\d*/.*/video\.(mp4|flv))",' def setup(self): - self.multiDL = True - self.chunkLimit = 1 + self.multiDL = True + self.chunkLimit = 1 self.resumeDownload = self.premium -- cgit v1.2.3 From 90985bb401a647e476ac760d0d73bcb0f7651e7a Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 3 Jan 2015 01:01:15 +0100 Subject: [MegaCoNz] Fix https://github.com/pyload/pyload/issues/367 --- module/plugins/hoster/MegaCoNz.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/MegaCoNz.py b/module/plugins/hoster/MegaCoNz.py index 55a2c5abf..ed334601a 100644 --- a/module/plugins/hoster/MegaCoNz.py +++ b/module/plugins/hoster/MegaCoNz.py @@ -14,7 +14,7 @@ from Crypto.Util import Counter from module.common.json_layer import json_loads, json_dumps from module.plugins.Hoster import Hoster -from module.utils import decode +from module.utils import decode, fs_decode, fs_encode ############################ General errors ################################### @@ -49,7 +49,7 @@ from module.utils import decode class MegaCoNz(Hoster): __name__ = "MegaCoNz" __type__ = "hoster" - __version__ = "0.23" + __version__ = "0.24" __pattern__ = r'https?://(?:www\.)?mega\.co\.nz/#(?PN|)!(?P[\w^_]+)!(?P[\w,\\-]+)' @@ -117,7 +117,7 @@ class MegaCoNz(Hoster): self.pyfile.setStatus("decrypting") self.pyfile.setProgress(0) - file_crypted = self.lastDownload + file_crypted = fs_encode(self.lastDownload) file_decrypted = file_crypted.rsplit(self.FILE_SUFFIX)[0] try: @@ -164,7 +164,7 @@ class MegaCoNz(Hoster): # self.fail("Checksum mismatch") os.remove(file_crypted) - self.lastDownload = file_decrypted + self.lastDownload = fs_decode(file_decrypted) def checkError(self, code): -- cgit v1.2.3 From 3ca3abd993612970b564e8d1dadfb206f7d74c05 Mon Sep 17 00:00:00 2001 From: marley2013 Date: Sat, 3 Jan 2015 19:12:57 +0100 Subject: Update OverLoadMe.py Fixes SSL/NoSSL setitings --- module/plugins/hoster/OverLoadMe.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/OverLoadMe.py b/module/plugins/hoster/OverLoadMe.py index f7c068b58..7cd439e15 100644 --- a/module/plugins/hoster/OverLoadMe.py +++ b/module/plugins/hoster/OverLoadMe.py @@ -13,7 +13,7 @@ from module.utils import parseFileSize class OverLoadMe(MultiHoster): __name__ = "OverLoadMe" __type__ = "hoster" - __version__ = "0.06" + __version__ = "0.07" __pattern__ = r'https?://.*overload\.me/.+' @@ -38,8 +38,8 @@ class OverLoadMe(MultiHoster): def handlePremium(self): data = self.account.getAccountData(self.user) - - page = self.load("https://api.over-load.me/getdownload.php", + https = "https" if self.getConfig("https") else "http" + page = self.load(https + "://api.over-load.me/getdownload.php", get={"auth": data['password'], "link": self.pyfile.url}) data = json_loads(page) -- cgit v1.2.3 From 5f8de1193343d162963d167aa1f26e411e882a4a Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 3 Jan 2015 22:13:18 +0100 Subject: [OverLoadMe] Code cosmetics --- module/plugins/hoster/OverLoadMe.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/OverLoadMe.py b/module/plugins/hoster/OverLoadMe.py index 7cd439e15..cb6bb98ac 100644 --- a/module/plugins/hoster/OverLoadMe.py +++ b/module/plugins/hoster/OverLoadMe.py @@ -27,8 +27,10 @@ class OverLoadMe(MultiHoster): name = unquote(url.rsplit("/", 1)[1]) except IndexError: name = "Unknown_Filename..." + if name.endswith("..."): #: incomplete filename, append random stuff name += "%s.tmp" % randrange(100, 999) + return name @@ -37,13 +39,14 @@ class OverLoadMe(MultiHoster): def handlePremium(self): - data = self.account.getAccountData(self.user) https = "https" if self.getConfig("https") else "http" - page = self.load(https + "://api.over-load.me/getdownload.php", - get={"auth": data['password'], "link": self.pyfile.url}) - data = json_loads(page) + data = self.account.getAccountData(self.user) + page = self.load(https + "://api.over-load.me/getdownload.php", + get={'auth': data['password'], + 'link': self.pyfile.url}) - self.logDebug("Returned Data: %s" % data) + data = json_loads(page) + self.logDebug(data) if data['error'] == 1: self.logWarning(data['msg']) @@ -52,12 +55,9 @@ class OverLoadMe(MultiHoster): if self.pyfile.name is not None and self.pyfile.name.endswith('.tmp') and data['filename']: self.pyfile.name = data['filename'] self.pyfile.size = parseFileSize(data['filesize']) - self.link = data['downloadlink'] - if self.getConfig("https"): - self.link = self.link.replace("http://", "https://") - else: - self.link = self.link.replace("https://", "http://") + http_repl = ["http://", "https://"] + self.link = data['downloadlink'].replace(*http_repl if self.getConfig("https") else *http_repl[::-1]) if self.link != self.pyfile.url: self.logDebug("New URL: %s" % self.link) -- cgit v1.2.3 From 538c8e20249c8ffca8b98a736d2d81dbc2447ee1 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 4 Jan 2015 20:24:44 +0100 Subject: [PremiumTo] CHECK_TRAFFIC --- module/plugins/hoster/PremiumTo.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/PremiumTo.py b/module/plugins/hoster/PremiumTo.py index 8a998c816..11d4e9541 100644 --- a/module/plugins/hoster/PremiumTo.py +++ b/module/plugins/hoster/PremiumTo.py @@ -11,7 +11,7 @@ from module.utils import fs_encode class PremiumTo(MultiHoster): __name__ = "PremiumTo" __type__ = "hoster" - __version__ = "0.18" + __version__ = "0.19" __pattern__ = r'^unmatchable$' @@ -22,6 +22,9 @@ class PremiumTo(MultiHoster): ("stickell", "l.stickell@yahoo.it")] + CHECK_TRAFFIC = True + + def handlePremium(self): #raise timeout to 2min self.download("http://premium.to/api/getfile.php", -- cgit v1.2.3 From 7979d0833573a107baae8c45330b8b5874630a76 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 4 Jan 2015 20:26:13 +0100 Subject: Spare code improvements --- module/plugins/hoster/MultishareCz.py | 19 ++++--------------- module/plugins/hoster/NoPremiumPl.py | 5 +++-- module/plugins/hoster/RapideoPl.py | 5 +++-- module/plugins/hoster/RehostTo.py | 4 ++-- module/plugins/hoster/ShareonlineBiz.py | 6 +++--- module/plugins/hoster/SimplydebridCom.py | 2 +- 6 files changed, 16 insertions(+), 25 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/MultishareCz.py b/module/plugins/hoster/MultishareCz.py index ee84f613f..421ad111b 100644 --- a/module/plugins/hoster/MultishareCz.py +++ b/module/plugins/hoster/MultishareCz.py @@ -10,7 +10,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class MultishareCz(SimpleHoster): __name__ = "MultishareCz" __type__ = "hoster" - __version__ = "0.38" + __version__ = "0.39" __pattern__ = r'http://(?:www\.)?multishare\.cz/stahnout/(?P\d+)' @@ -21,7 +21,8 @@ class MultishareCz(SimpleHoster): SIZE_REPLACEMENTS = [(' ', '')] - MULTI_HOSTER = True + CHECK_TRAFFIC = True + MULTI_HOSTER = True INFO_PATTERN = ur'(?:
  • Název|Soubor): (?P[^<]+)<(?:/li>Velikost: (?P[^<]+)' OFFLINE_PATTERN = ur'

    Stáhnout soubor

    Požadovaný soubor neexistuje.

    ' @@ -32,10 +33,6 @@ class MultishareCz(SimpleHoster): def handlePremium(self): - if not self.checkCredit(): - self.logWarning(_("Not enough credit left to download file")) - self.resetAccount() - self.download("http://www.multishare.cz/html/download_premium.php?ID=%s" % self.info['pattern']['ID']) @@ -44,7 +41,7 @@ class MultishareCz(SimpleHoster): self.checkInfo() - if not self.checkCredit(): + if not self.checkTrafficLeft(): self.fail(_("Not enough credit left to download file")) self.download("http://dl%d.mms.multishare.cz/html/mms_process.php" % round(random() * 10000 * random()), @@ -54,12 +51,4 @@ class MultishareCz(SimpleHoster): disposition=True) - def checkCredit(self): - self.acc_info = self.account.getAccountInfo(self.user, True) - - self.logInfo(_("User %s has %i MB left") % (self.user, self.acc_info['trafficleft'] / 1024)) - - return self.pyfile.size / 1024 <= self.acc_info['trafficleft'] - - getInfo = create_getInfo(MultishareCz) diff --git a/module/plugins/hoster/NoPremiumPl.py b/module/plugins/hoster/NoPremiumPl.py index f4f7ba56a..feedd7651 100644 --- a/module/plugins/hoster/NoPremiumPl.py +++ b/module/plugins/hoster/NoPremiumPl.py @@ -43,8 +43,9 @@ class NoPremiumPl(SimpleHoster): if not self.account: self.fail(_("Please enter your %s account or deactivate this plugin") % "NoPremium.pl") else: - self._usr = self.account.getAccountData(self.user).get('usr') - self._pwd = self.account.getAccountData(self.user).get('pwd') + data = self.account.getAccountData(self.user) + self._usr = data['usr'] + self._pwd = data['pwd'] def runFileQuery(self, url, mode=None): query = self._api_query.copy() diff --git a/module/plugins/hoster/RapideoPl.py b/module/plugins/hoster/RapideoPl.py index 9fd20e69e..7260ebbe3 100644 --- a/module/plugins/hoster/RapideoPl.py +++ b/module/plugins/hoster/RapideoPl.py @@ -41,8 +41,9 @@ class RapideoPl(SimpleHoster): if not self.account: self.fail(_("Please enter your %s account or deactivate this plugin") % "Rapideo.pl") else: - self._usr = self.account.getAccountData(self.user).get('usr') - self._pwd = self.account.getAccountData(self.user).get('pwd') + data = self.account.getAccountData(self.user) + self._usr = data['usr'] + self._pwd = data['pwd'] def runFileQuery(self, url, mode=None): query = self._api_query.copy() diff --git a/module/plugins/hoster/RehostTo.py b/module/plugins/hoster/RehostTo.py index 5dd17e374..96443d5f5 100644 --- a/module/plugins/hoster/RehostTo.py +++ b/module/plugins/hoster/RehostTo.py @@ -8,7 +8,7 @@ from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo class RehostTo(MultiHoster): __name__ = "RehostTo" __type__ = "hoster" - __version__ = "0.17" + __version__ = "0.18" __pattern__ = r'https?://.*rehost\.to\..+' @@ -22,7 +22,7 @@ class RehostTo(MultiHoster): def handlePremium(self): - data = self.account.getAccountInfo(self.user) + data = self.account.getAccountData(self.user) self.download("http://rehost.to/process_download.php", get={'user': "cookie", diff --git a/module/plugins/hoster/ShareonlineBiz.py b/module/plugins/hoster/ShareonlineBiz.py index dc3d5093c..bbf75c94a 100644 --- a/module/plugins/hoster/ShareonlineBiz.py +++ b/module/plugins/hoster/ShareonlineBiz.py @@ -14,7 +14,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class ShareonlineBiz(SimpleHoster): __name__ = "ShareonlineBiz" __type__ = "hoster" - __version__ = "0.45" + __version__ = "0.46" __pattern__ = r'https?://(?:www\.)?(share-online\.biz|egoshare\.com)/(download\.php\?id=|dl/)(?P\w+)' @@ -28,6 +28,8 @@ class ShareonlineBiz(SimpleHoster): URL_REPLACEMENTS = [(__pattern__ + ".*", "http://www.share-online.biz/dl/\g")] + CHECK_TRAFFIC = True + RECAPTCHA_KEY = "6LdatrsSAAAAAHZrB70txiV5p-8Iv8BtVxlTtjKX" ERROR_INFO_PATTERN = r'

    Information:

    \s*
    \s*(.*?)' @@ -125,8 +127,6 @@ class ShareonlineBiz(SimpleHoster): def handlePremium(self): #: should be working better loading (account) api internally - self.account.getAccountInfo(self.user, True) - html = self.load("http://api.share-online.biz/account.php", {"username": self.user, "password": self.account.accounts[self.user]['password'], "act": "download", "lid": self.info['fileid']}) diff --git a/module/plugins/hoster/SimplydebridCom.py b/module/plugins/hoster/SimplydebridCom.py index 8211d40d4..0be9bfa12 100644 --- a/module/plugins/hoster/SimplydebridCom.py +++ b/module/plugins/hoster/SimplydebridCom.py @@ -36,7 +36,7 @@ class SimplydebridCom(MultiHoster): self.logDebug("New URL: %s" % self.link) if not re.match(self.__pattern__, self.link): - page = self.load("http://simply-debrid.com/api.php", get={'dl': self.link}) # +'&u='+self.user+'&p='+self.account.getAccountData(self.user)['password']) + page = self.load("http://simply-debrid.com/api.php", get={'dl': self.link}) if 'tiger Link' in page or 'Invalid Link' in page or ('API' in page and 'ERROR' in page): self.fail(_("Unable to unrestrict link")) self.link = page -- cgit v1.2.3 From 75b6540be746d66d3fba3ab364c78addbc50c485 Mon Sep 17 00:00:00 2001 From: Smoozed Date: Mon, 5 Jan 2015 16:49:39 +0100 Subject: Added multihoster smoozed.com --- module/plugins/hoster/SmoozedCom.py | 70 +++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 module/plugins/hoster/SmoozedCom.py (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/SmoozedCom.py b/module/plugins/hoster/SmoozedCom.py new file mode 100644 index 000000000..ce0eeedda --- /dev/null +++ b/module/plugins/hoster/SmoozedCom.py @@ -0,0 +1,70 @@ +# -*- coding: utf-8 -*- + +from module.plugins.Hoster import Hoster + +from module.common.json_layer import json_loads + + +class SmoozedCom(Hoster): + __name__ = "SmoozedCom" + __type__ = "hoster" + __version__ = "0.01" + + __pattern__ = r'^unmatchable$' #: Since we want to allow the user to specify the list of hoster to use we let MultiHoster.coreReady + + __description__ = """Smoozed.com hoster plugin""" + __license__ = "GPLv3" + __authors__ = [] + + + def process(self, pyfile): + # Check account + if not self.account or not self.account.canUse(): + self.logError(_("Please enter your %s account or deactivate this plugin") % "smoozed.com") + self.fail(_("No valid smoozed.com account provided")) + + # In some cases hostsers do not supply us with a filename at download, so we + # are going to set a fall back filename (e.g. for freakshare or xfileshare) + pyfile.name = pyfile.name.split('/').pop() # Remove everthing before last slash + + # Correction for automatic assigned filename: Removing html at end if needed + suffix_to_remove = ["html", "htm", "php", "php3", "asp", "shtm", "shtml", "cfml", "cfm"] + temp = pyfile.name.split('.') + if temp.pop() in suffix_to_remove: + pyfile.name = ".".join(temp) + + # Get account data + (user, data) = self.account.selectAccount() + account_info = self.account.getAccountInfo(user, True) + + # Check the link + get_data = { + "session_key": account_info['session_key'], + "url": pyfile.url + } + answer = self.load("http://www2.smoozed.com/api/check", get=get_data) + data = json_loads(answer) + if data["state"] != "ok": + self.fail(_(data["message"])) + if data["data"].get("state", "ok") != "ok": + if data["data"] == "Offline": + self.offline() + else: + self.fail(_(data["data"]["message"])) + pyfile.name = data["data"]["name"] + pyfile.size = int(data["data"]["size"]) + + # Start the download + header = self.load("http://www2.smoozed.com/api/download", get=get_data, just_header=True) + if not "location" in header: + self.fail(_("Unable to initialize download")) + + if isinstance(header["location"], list): + url = header["location"][-1] + else: + url = header["location"] + self.download(url, disposition=True) + + check = self.checkDownload({"error": '{"state":"error"}', "retry": '{"state":"retry"}'}) + if check == "error" or check == "retry": + self.fail(_("Error response received - contact Smoozed support")) -- cgit v1.2.3 From 3b8330037e09edd5f1d7475a4b176131f89bcd41 Mon Sep 17 00:00:00 2001 From: Sahil Shekhawat Date: Tue, 6 Jan 2015 00:00:26 +0530 Subject: Created plugin for Nitroflare.com --- module/plugins/hoster/NitroflareCom.py | 86 ++++++++++++++++++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 module/plugins/hoster/NitroflareCom.py (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/NitroflareCom.py b/module/plugins/hoster/NitroflareCom.py new file mode 100644 index 000000000..c31431cc2 --- /dev/null +++ b/module/plugins/hoster/NitroflareCom.py @@ -0,0 +1,86 @@ +# -*- coding: utf-8 -*- + +import re +import json + +from module.plugins.Hoster import Hoster +from module.plugins.internal.CaptchaService import ReCaptcha + + +""" + Right now premium support is not added + Thus, any file that require premium support + cannot be downloaded. Only the file that is free to + download can be downloaded. +""" +class NitroflareCom(Hoster): + __name__ = "NitroflareCom" + __type__ = "hoster" + __version__ = "0.01" + + __pattern__ = r'https?://(?:www\.)?(nitroflare\.com/view)/(?P[A-Z0-9]+)' + __description__ = """Nitroflare.com hoster plugin""" + __license__ = "GPLv3" + __authors__ = [("sahil", None)] + + BASE_URL = "https://nitroflare.com" + API_URL = "https://nitroflare.com/api/" + DOWNLOAD_PATTERN = "\"(https?://[a-z0-9\\-_]+\\.nitroflare\\.com/[^<>\"]*?)\"" + + def process(self, pyfile): + + if "https://" not in pyfile.url: + pyfile.url = self.correct_download_link(pyfile.url) + + url_match = re.match(self.__pattern__, pyfile.url) + file_uid = url_match.group('ID') + if self.checkLink(file_uid): + file_info = self.load(self.API_URL + "getDownloadLink?file=" + file_uid) + self.logWarning(file_info[3:]) + file_info = json.loads(file_info[3:]) # removing non ascii characters + if file_info['type'] == "success": + result = file_info['result'] # already a dict + if result['linkType'] == "free": + delay = result['delay'] # Don't need the delay for free downloads + captch_key = result['recaptchaPublic'] + filename = result['name'] + recaptcha = ReCaptcha(self) + # try upto 3 times to solve reCaptcha + for i in xrange(3): + challenge, response = recaptcha.challenge(key=captch_key) + res = self.load(self.BASE_URL + "/ajax/freeDownload.php", + post={"method": "fetchDownload", + "recaptcha_challenge_field": challenge, + "recaptcha_response_field": response}) + if self.handleCaptchaErrors(res): + break + if "The captcha wasn't entered correctly" or "You have to fill the captcha" in res: + continue + else: + break + + if "The captcha wasn't entered correctly" or "You have to fill the captcha" in res: + self.logError("Captcha Failed") + self.offline() + # Captcha failed + else: + self.logInfo("result of the captcha is") + self.logInfo(res) + # self.offline() + download_link = re.search(self.DOWNLOAD_PATTERN, res) + if download_link is None: + print "downloasd link failed" + # Download link failed + else: + self.download(download_link) + else: + print "link is invalid" + self.offline() + # Link is invalid + # self.download() + + def correct_download_link(self, url): + return url.replace("http://", "https://") + + def checkLink(self, url): + return True \ No newline at end of file -- cgit v1.2.3 From fd105f8e51768ec1943cda2375bdfdbe5b0a3951 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 9 Jan 2015 00:35:51 +0100 Subject: "New Year" Update: hoster plugins --- module/plugins/hoster/AlldebridCom.py | 26 ++--- module/plugins/hoster/BasePlugin.py | 11 ++- module/plugins/hoster/BezvadataCz.py | 4 +- module/plugins/hoster/BitshareCom.py | 9 +- module/plugins/hoster/CatShareNet.py | 10 +- module/plugins/hoster/CloudzillaTo.py | 8 +- module/plugins/hoster/CrockoCom.py | 10 +- module/plugins/hoster/CzshareCom.py | 34 ++++--- module/plugins/hoster/DataHu.py | 12 +-- module/plugins/hoster/DataportCz.py | 10 +- module/plugins/hoster/DateiTo.py | 4 +- module/plugins/hoster/DebridItaliaCom.py | 10 +- module/plugins/hoster/DepositfilesCom.py | 20 ++-- module/plugins/hoster/DevhostSt.py | 17 +--- module/plugins/hoster/DlFreeFr.py | 6 +- module/plugins/hoster/DropboxCom.py | 10 +- module/plugins/hoster/EdiskCz.py | 6 +- module/plugins/hoster/EuroshareEu.py | 30 +++--- module/plugins/hoster/ExtabitCom.py | 12 +-- module/plugins/hoster/FastixRu.py | 20 ++-- module/plugins/hoster/FastshareCz.py | 16 +-- module/plugins/hoster/FileParadoxIn.py | 23 ----- module/plugins/hoster/FileSharkPl.py | 12 +-- module/plugins/hoster/FileStoreTo.py | 6 +- module/plugins/hoster/FilecloudIo.py | 37 +++---- module/plugins/hoster/FilefactoryCom.py | 31 +++--- module/plugins/hoster/FilepostCom.py | 4 +- module/plugins/hoster/FilepupNet.py | 12 +-- module/plugins/hoster/FilerNet.py | 8 +- module/plugins/hoster/FilesMailRu.py | 5 +- module/plugins/hoster/FileserveCom.py | 15 ++- module/plugins/hoster/FourSharedCom.py | 61 ------------ module/plugins/hoster/FreakshareCom.py | 12 ++- module/plugins/hoster/FreeWayMe.py | 10 +- module/plugins/hoster/FshareVn.py | 46 +++------ module/plugins/hoster/Ftp.py | 4 +- module/plugins/hoster/GigapetaCom.py | 6 +- module/plugins/hoster/GooIm.py | 8 +- module/plugins/hoster/HellshareCz.py | 37 +++---- module/plugins/hoster/HundredEightyUploadCom.py | 24 ----- module/plugins/hoster/IfileIt.py | 55 +---------- module/plugins/hoster/IfolderRu.py | 24 ++--- module/plugins/hoster/JumbofilesCom.py | 14 ++- module/plugins/hoster/KingfilesNet.py | 20 ++-- module/plugins/hoster/LetitbitNet.py | 30 ++++-- module/plugins/hoster/LinestorageCom.py | 21 ---- module/plugins/hoster/LinksnappyCom.py | 23 ++--- module/plugins/hoster/LoadTo.py | 20 +--- module/plugins/hoster/LuckyShareNet.py | 7 +- module/plugins/hoster/MediafireCom.py | 8 +- module/plugins/hoster/MegaDebridEu.py | 14 +-- module/plugins/hoster/MegaRapidCz.py | 18 ++-- module/plugins/hoster/MegacrypterCom.py | 13 +-- module/plugins/hoster/MegasharesCom.py | 6 +- module/plugins/hoster/MultihostersCom.py | 44 ++------- module/plugins/hoster/MultishareCz.py | 10 +- module/plugins/hoster/MyfastfileCom.py | 12 +-- module/plugins/hoster/NarodRu.py | 16 ++- module/plugins/hoster/NetloadIn.py | 6 +- module/plugins/hoster/NitroflareCom.py | 123 +++++++++++------------- module/plugins/hoster/NoPremiumPl.py | 118 +++++++++++------------ module/plugins/hoster/NowDownloadSx.py | 8 +- module/plugins/hoster/NowVideoSx.py | 4 +- module/plugins/hoster/OneFichierCom.py | 60 ------------ module/plugins/hoster/OverLoadMe.py | 29 +++--- module/plugins/hoster/PremiumTo.py | 19 ++-- module/plugins/hoster/PremiumizeMe.py | 14 +-- module/plugins/hoster/PromptfileCom.py | 12 +-- module/plugins/hoster/PutdriveCom.py | 15 +++ module/plugins/hoster/QuickshareCz.py | 13 ++- module/plugins/hoster/RPNetBiz.py | 12 +-- module/plugins/hoster/RapideoPl.py | 116 +++++++++++----------- module/plugins/hoster/RapidfileshareNet.py | 6 +- module/plugins/hoster/RapidgatorNet.py | 23 ++--- module/plugins/hoster/RapiduNet.py | 8 +- module/plugins/hoster/RealdebridCom.py | 29 +++--- module/plugins/hoster/RehostTo.py | 12 +-- module/plugins/hoster/RemixshareCom.py | 10 +- module/plugins/hoster/SendmywayCom.py | 21 ---- module/plugins/hoster/SendspaceCom.py | 10 +- module/plugins/hoster/ShareonlineBiz.py | 36 +++---- module/plugins/hoster/ShareplaceCom.py | 4 +- module/plugins/hoster/SimplyPremiumCom.py | 6 +- module/plugins/hoster/SimplydebridCom.py | 16 ++- module/plugins/hoster/SmoozedCom.py | 57 +++++------ module/plugins/hoster/SpeedyshareCom.py | 12 +-- module/plugins/hoster/TurbobitNet.py | 14 ++- module/plugins/hoster/TusfilesNet.py | 15 ++- module/plugins/hoster/TwoSharedCom.py | 41 -------- module/plugins/hoster/UlozTo.py | 39 +++----- module/plugins/hoster/UloziskoSk.py | 23 +++-- module/plugins/hoster/UnibytesCom.py | 14 ++- module/plugins/hoster/UnrestrictLi.py | 10 +- module/plugins/hoster/UpleaCom.py | 6 +- module/plugins/hoster/UploadableCh.py | 22 ++--- module/plugins/hoster/UploadheroCom.py | 19 ++-- module/plugins/hoster/UploadingCom.py | 27 +++--- module/plugins/hoster/UpstoreNet.py | 12 +-- module/plugins/hoster/VeohCom.py | 7 +- module/plugins/hoster/VimeoCom.py | 9 +- module/plugins/hoster/WebshareCz.py | 11 +-- module/plugins/hoster/WrzucTo.py | 8 +- module/plugins/hoster/XFileSharingPro.py | 19 ++-- module/plugins/hoster/YibaishiwuCom.py | 14 ++- module/plugins/hoster/YourfilesTo.py | 4 +- module/plugins/hoster/ZeveraCom.py | 35 ++++--- module/plugins/hoster/ZippyshareCom.py | 17 ++-- module/plugins/hoster/_1FichierCom.py | 60 ++++++++++++ module/plugins/hoster/_2SharedCom.py | 32 ++++++ module/plugins/hoster/_4SharedCom.py | 62 ++++++++++++ 110 files changed, 1030 insertions(+), 1290 deletions(-) delete mode 100644 module/plugins/hoster/FileParadoxIn.py delete mode 100644 module/plugins/hoster/FourSharedCom.py delete mode 100644 module/plugins/hoster/HundredEightyUploadCom.py delete mode 100644 module/plugins/hoster/LinestorageCom.py delete mode 100644 module/plugins/hoster/OneFichierCom.py create mode 100644 module/plugins/hoster/PutdriveCom.py delete mode 100644 module/plugins/hoster/SendmywayCom.py delete mode 100644 module/plugins/hoster/TwoSharedCom.py create mode 100644 module/plugins/hoster/_1FichierCom.py create mode 100644 module/plugins/hoster/_2SharedCom.py create mode 100644 module/plugins/hoster/_4SharedCom.py (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/AlldebridCom.py b/module/plugins/hoster/AlldebridCom.py index 751ff415c..4db32da5d 100644 --- a/module/plugins/hoster/AlldebridCom.py +++ b/module/plugins/hoster/AlldebridCom.py @@ -13,11 +13,11 @@ from module.utils import parseFileSize class AlldebridCom(MultiHoster): __name__ = "AlldebridCom" __type__ = "hoster" - __version__ = "0.42" + __version__ = "0.43" __pattern__ = r'https?://(?:www\.|s\d+\.)?alldebrid\.com/dl/[\w^_]+' - __description__ = """Alldebrid.com hoster plugin""" + __description__ = """Alldebrid.com multi-hoster plugin""" __license__ = "GPLv3" __authors__ = [("Andy Voigt", "spamsales@online.de")] @@ -38,11 +38,11 @@ class AlldebridCom(MultiHoster): self.chunkLimit = 16 - def handlePremium(self): + def handlePremium(self, pyfile): password = self.getPassword() data = json_loads(self.load("http://www.alldebrid.com/service.php", - get={'link': self.pyfile.url, 'json': "true", 'pw': password})) + get={'link': pyfile.url, 'json': "true", 'pw': password})) self.logDebug("Json data", data) @@ -53,9 +53,9 @@ class AlldebridCom(MultiHoster): self.logWarning(data['error']) self.tempOffline() else: - if self.pyfile.name and not self.pyfile.name.endswith('.tmp'): - self.pyfile.name = data['filename'] - self.pyfile.size = parseFileSize(data['filesize']) + if pyfile.name and not pyfile.name.endswith('.tmp'): + pyfile.name = data['filename'] + pyfile.size = parseFileSize(data['filesize']) self.link = data['link'] if self.getConfig("https"): @@ -63,19 +63,19 @@ class AlldebridCom(MultiHoster): else: self.link = self.link.replace("https://", "http://") - if self.link != self.pyfile.url: + if self.link != pyfile.url: self.logDebug("New URL: %s" % self.link) - if self.pyfile.name.startswith("http") or self.pyfile.name.startswith("Unknown"): + if pyfile.name.startswith("http") or pyfile.name.startswith("Unknown"): #only use when name wasnt already set - self.pyfile.name = self.getFilename(self.link) + pyfile.name = self.getFilename(self.link) def checkFile(self): - super(AlldebridCom, self).checkFile() - - if self.checkDownload({'error': "An error occured while processing your request"}) is "error": + if self.checkDownload({'error': "An error occured while processing your request"}) == "error": self.retry(wait_time=60, reason=_("An error occured while generating link")) + return super(AlldebridCom, self).checkFile() + getInfo = create_getInfo(AlldebridCom) diff --git a/module/plugins/hoster/BasePlugin.py b/module/plugins/hoster/BasePlugin.py index d0d8e7cc8..32ba7094a 100644 --- a/module/plugins/hoster/BasePlugin.py +++ b/module/plugins/hoster/BasePlugin.py @@ -13,7 +13,7 @@ from module.plugins.Hoster import Hoster class BasePlugin(Hoster): __name__ = "BasePlugin" __type__ = "hoster" - __version__ = "0.26" + __version__ = "0.27" __pattern__ = r'^unmatchable$' @@ -58,7 +58,7 @@ class BasePlugin(Hoster): if server in servers: self.logDebug("Logging on to %s" % server) - self.req.addAuth(account.accounts[server]['password']) + self.req.addAuth(account.getAccountData(server)['password']) else: pwd = self.getPassword() if ':' in pwd: @@ -72,8 +72,11 @@ class BasePlugin(Hoster): else: self.fail(_("No file downloaded")) #@TODO: Move to hoster class in 0.4.10 - if self.checkDownload({'empty': re.compile(r"^$")}) is "empty": #@TODO: Move to hoster in 0.4.10 - self.fail(_("Empty file")) + check = self.checkDownload('empty file': re.compile(r'\A\Z'), + 'html file' : re.compile(r'\A\s*)?\d{3}(\Z|\s+)')}): + if check: + self.fail(check.capitalize()) def downloadFile(self, pyfile): diff --git a/module/plugins/hoster/BezvadataCz.py b/module/plugins/hoster/BezvadataCz.py index 9ca4b4b1a..8d56f1ff6 100644 --- a/module/plugins/hoster/BezvadataCz.py +++ b/module/plugins/hoster/BezvadataCz.py @@ -8,7 +8,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class BezvadataCz(SimpleHoster): __name__ = "BezvadataCz" __type__ = "hoster" - __version__ = "0.25" + __version__ = "0.26" __pattern__ = r'http://(?:www\.)?bezvadata\.cz/stahnout/.+' @@ -27,7 +27,7 @@ class BezvadataCz(SimpleHoster): self.multiDL = True - def handleFree(self): + def handleFree(self, pyfile): #download button m = re.search(r'\w+)(?(1)/(?P.+?)\.html)' @@ -73,12 +73,7 @@ class BitshareCom(SimpleHoster): # This may either download our file or forward us to an error page self.download(self.getDownloadUrl()) - check = self.checkDownload({"404": ">404 Not Found<", "Error": ">Error occured<"}) - - if check == "404": - self.retry(3, 60, 'Error 404') - - elif check == "error": + if self.checkDownload({"error": ">Error occured<"}): self.retry(5, 5 * 60, "Bitshare host : Error occured") diff --git a/module/plugins/hoster/CatShareNet.py b/module/plugins/hoster/CatShareNet.py index 949a021dd..f2ddd64a0 100644 --- a/module/plugins/hoster/CatShareNet.py +++ b/module/plugins/hoster/CatShareNet.py @@ -9,7 +9,7 @@ from module.plugins.internal.CaptchaService import ReCaptcha class CatShareNet(SimpleHoster): __name__ = "CatShareNet" __type__ = "hoster" - __version__ = "0.08" + __version__ = "0.09" __pattern__ = r'http://(?:www\.)?catshare\.net/\w{16}' @@ -27,7 +27,7 @@ class CatShareNet(SimpleHoster): IP_BLOCKED_PATTERN = ur'>Nasz serwis wykrył że Twój adres IP nie pochodzi z Polski.<' SECONDS_PATTERN = 'var\scount\s=\s(\d+);' - LINK_PATTERN = r'
    ' + LINK_FREE_PATTERN = r'' def setup(self): @@ -42,7 +42,7 @@ class CatShareNet(SimpleHoster): return super(CatShareNet, self).getFileInfo() - def handleFree(self): + def handleFree(self, pyfile): m = re.search(self.SECONDS_PATTERN, self.html) if m: wait_time = int(m.group(1)) @@ -51,11 +51,11 @@ class CatShareNet(SimpleHoster): recaptcha = ReCaptcha(self) challenge, response = recaptcha.challenge() - self.html = self.load(self.pyfile.url, + self.html = self.load(pyfile.url, post={'recaptcha_challenge_field': challenge, 'recaptcha_response_field' : response}) - m = re.search(self.LINK_PATTERN, self.html) + m = re.search(self.LINK_FREE_PATTERN, self.html) if m is None: self.invalidCaptcha() self.retry(reason=_("Wrong captcha entered")) diff --git a/module/plugins/hoster/CloudzillaTo.py b/module/plugins/hoster/CloudzillaTo.py index d8b5e8b5d..58b1ac0dd 100644 --- a/module/plugins/hoster/CloudzillaTo.py +++ b/module/plugins/hoster/CloudzillaTo.py @@ -8,7 +8,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class CloudzillaTo(SimpleHoster): __name__ = "CloudzillaTo" __type__ = "hoster" - __version__ = "0.05" + __version__ = "0.06" __pattern__ = r'http://(?:www\.)?cloudzilla\.to/share/file/(?P[\w^_]+)' @@ -32,7 +32,7 @@ class CloudzillaTo(SimpleHoster): self.retry(reason="Wrong password") - def handleFree(self): + def handleFree(self, pyfile): self.html = self.load("http://www.cloudzilla.to/generateticket/", post={'file_id': self.info['pattern']['ID'], 'key': self.getPassword()}) @@ -54,8 +54,8 @@ class CloudzillaTo(SimpleHoster): 'ticket_id': ticket['ticket_id']} - def handlePremium(self): - return self.handleFree() + def handlePremium(self, pyfile): + return self.handleFree(pyfile) getInfo = create_getInfo(CloudzillaTo) diff --git a/module/plugins/hoster/CrockoCom.py b/module/plugins/hoster/CrockoCom.py index e5f94800b..31d0eec95 100644 --- a/module/plugins/hoster/CrockoCom.py +++ b/module/plugins/hoster/CrockoCom.py @@ -9,7 +9,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class CrockoCom(SimpleHoster): __name__ = "CrockoCom" __type__ = "hoster" - __version__ = "0.17" + __version__ = "0.18" __pattern__ = r'http://(?:www\.)?(crocko|easy-share)\.com/\w+' @@ -30,7 +30,7 @@ class CrockoCom(SimpleHoster): NAME_REPLACEMENTS = [(r'<[^>]*>', '')] - def handleFree(self): + def handleFree(self, pyfile): if "You need Premium membership to download this file." in self.html: self.fail(_("You need Premium membership to download this file")) @@ -55,11 +55,7 @@ class CrockoCom(SimpleHoster): inputs['recaptcha_challenge_field'], inputs['recaptcha_response_field'] = recaptcha.challenge() self.download(action, post=inputs) - check = self.checkDownload({ - "captcha_err": recaptcha.KEY_AJAX_PATTERN - }) - - if check == "captcha_err": + if self.checkDownload({"captcha": recaptcha.KEY_AJAX_PATTERN}): self.invalidCaptcha() else: break diff --git a/module/plugins/hoster/CzshareCom.py b/module/plugins/hoster/CzshareCom.py index aa381d712..fb9e7f457 100644 --- a/module/plugins/hoster/CzshareCom.py +++ b/module/plugins/hoster/CzshareCom.py @@ -12,7 +12,7 @@ from module.utils import parseFileSize class CzshareCom(SimpleHoster): __name__ = "CzshareCom" __type__ = "hoster" - __version__ = "0.96" + __version__ = "0.97" __pattern__ = r'http://(?:www\.)?(czshare|sdilej)\.(com|cz)/(\d+/|download\.php\?).+' @@ -63,7 +63,7 @@ class CzshareCom(SimpleHoster): return True - def handlePremium(self): + def handlePremium(self, pyfile): # parse download link try: form = re.search(self.PREMIUM_FORM_PATTERN, self.html, re.S).group(1) @@ -77,12 +77,14 @@ class CzshareCom(SimpleHoster): self.checkDownloadedFile() - def handleFree(self): + def handleFree(self, pyfile): # get free url m = re.search(self.FREE_URL_PATTERN, self.html) if m is None: self.error(_("FREE_URL_PATTERN not found")) + parsed_url = "http://sdilej.cz" + m.group(1) + self.logDebug("PARSED_URL:" + parsed_url) # get download ticket and parse html @@ -93,7 +95,8 @@ class CzshareCom(SimpleHoster): try: form = re.search(self.FREE_FORM_PATTERN, self.html, re.S).group(1) inputs = dict(re.findall(self.FORM_INPUT_PATTERN, form)) - self.pyfile.size = int(inputs['size']) + pyfile.size = int(inputs['size']) + except Exception, e: self.logError(e) self.error(_("Form")) @@ -103,10 +106,13 @@ class CzshareCom(SimpleHoster): for _i in xrange(5): inputs['captchastring2'] = self.decryptCaptcha(captcha_url) self.html = self.load(parsed_url, cookies=True, post=inputs, decode=True) + if u"
  • Zadaný ověřovací kód nesouhlasí!
  • " in self.html: self.invalidCaptcha() + elif re.search(self.MULTIDL_PATTERN, self.html): self.longWait(5 * 60, 12) + else: self.correctCaptcha() break @@ -118,6 +124,7 @@ class CzshareCom(SimpleHoster): # download the file, destination is determined by pyLoad self.logDebug("WAIT URL", self.req.lastEffectiveURL) + m = re.search("free_wait.php\?server=(.*?)&(.*)", self.req.lastEffectiveURL) if m is None: self.error(_("Download URL not found")) @@ -132,19 +139,22 @@ class CzshareCom(SimpleHoster): def checkDownloadedFile(self): # check download check = self.checkDownload({ - "temp_offline": re.compile(r"^Soubor je do.*asn.* nedostupn.*$"), - "credit": re.compile(r"^Nem.*te dostate.*n.* kredit.$"), - "multi_dl": re.compile(self.MULTIDL_PATTERN), - "captcha_err": "
  • Zadaný ověřovací kód nesouhlasí!
  • " + "temp offline" : re.compile(r"^Soubor je do.*asn.* nedostupn.*$"), + "credit" : re.compile(r"^Nem.*te dostate.*n.* kredit.$"), + "multi-dl" : re.compile(self.MULTIDL_PATTERN), + "captcha" : "
  • Zadaný ověřovací kód nesouhlasí!
  • " }) - if check == "temp_offline": + if check == "temp offline": self.fail(_("File not available - try later")) - if check == "credit": + + elif check == "credit": self.resetAccount() - elif check == "multi_dl": + + elif check == "multi-dl": self.longWait(5 * 60, 12) - elif check == "captcha_err": + + elif check == "captcha": self.invalidCaptcha() self.retry() diff --git a/module/plugins/hoster/DataHu.py b/module/plugins/hoster/DataHu.py index 437fea7cd..f4b0692a8 100644 --- a/module/plugins/hoster/DataHu.py +++ b/module/plugins/hoster/DataHu.py @@ -11,7 +11,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class DataHu(SimpleHoster): __name__ = "DataHu" __type__ = "hoster" - __version__ = "0.02" + __version__ = "0.03" __pattern__ = r'http://(?:www\.)?data\.hu/get/\w+' @@ -23,7 +23,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_PATTERN = r'
    ' + LINK_FREE_PATTERN = r'
    ' def setup(self): @@ -31,12 +31,4 @@ class DataHu(SimpleHoster): self.multiDL = self.premium - def handleFree(self): - m = re.search(self.LINK_PATTERN, self.html) - if m is None: - self.error(_("LINK_PATTERN not found")) - - self.download(m.group(1), disposition=True) - - getInfo = create_getInfo(DataHu) diff --git a/module/plugins/hoster/DataportCz.py b/module/plugins/hoster/DataportCz.py index 8e74f5553..266199616 100644 --- a/module/plugins/hoster/DataportCz.py +++ b/module/plugins/hoster/DataportCz.py @@ -6,7 +6,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class DataportCz(SimpleHoster): __name__ = "DataportCz" __type__ = "hoster" - __version__ = "0.40" + __version__ = "0.41" __pattern__ = r'http://(?:www\.)?dataport\.cz/file/(.+)' @@ -23,7 +23,7 @@ class DataportCz(SimpleHoster): FREE_SLOTS_PATTERN = ur'Počet volných slotů: (\d+)
    ' - def handleFree(self): + def handleFree(self, pyfile): captchas = {"1": "jkeG", "2": "hMJQ", "3": "vmEK", "4": "ePQM", "5": "blBd"} for _i in xrange(60): @@ -40,14 +40,16 @@ class DataportCz(SimpleHoster): self.html = self.download("http://www.dataport.cz%s" % action, post=inputs) check = self.checkDownload({"captcha": 'alert("\u0160patn\u011b opsan\u00fd k\u00f3d z obr\u00e1zu");', - "slot": 'alert("Je n\u00e1m l\u00edto, ale moment\u00e1ln\u011b nejsou'}) + "slot" : 'alert("Je n\u00e1m l\u00edto, ale moment\u00e1ln\u011b nejsou'}) if check == "captcha": self.error(_("invalid captcha")) + elif check == "slot": self.logDebug("No free slots - wait 60s and retry") self.wait(60, False) - self.html = self.load(self.pyfile.url, decode=True) + self.html = self.load(pyfile.url, decode=True) continue + else: break diff --git a/module/plugins/hoster/DateiTo.py b/module/plugins/hoster/DateiTo.py index e4bff8458..99b86e000 100644 --- a/module/plugins/hoster/DateiTo.py +++ b/module/plugins/hoster/DateiTo.py @@ -9,7 +9,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class DateiTo(SimpleHoster): __name__ = "DateiTo" __type__ = "hoster" - __version__ = "0.05" + __version__ = "0.06" __pattern__ = r'http://(?:www\.)?datei\.to/datei/(?P\w+)\.html' @@ -28,7 +28,7 @@ class DateiTo(SimpleHoster): DATA_PATTERN = r'url: "(.*?)", data: "(.*?)",' - def handleFree(self): + def handleFree(self, pyfile): url = 'http://datei.to/ajax/download.php' data = {'P': 'I', 'ID': self.info['pattern']['ID']} recaptcha = ReCaptcha(self) diff --git a/module/plugins/hoster/DebridItaliaCom.py b/module/plugins/hoster/DebridItaliaCom.py index 11b6da918..8cda56c0c 100644 --- a/module/plugins/hoster/DebridItaliaCom.py +++ b/module/plugins/hoster/DebridItaliaCom.py @@ -8,11 +8,11 @@ from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo class DebridItaliaCom(MultiHoster): __name__ = "DebridItaliaCom" __type__ = "hoster" - __version__ = "0.16" + __version__ = "0.17" __pattern__ = r'https?://(?:www\.|s\d+\.)?debriditalia\.com/dl/\d+' - __description__ = """Debriditalia.com hoster plugin""" + __description__ = """Debriditalia.com multi-hoster plugin""" __license__ = "GPLv3" __authors__ = [("stickell", "l.stickell@yahoo.it"), ("Walter Purcaro", "vuolter@gmail.com")] @@ -21,9 +21,9 @@ class DebridItaliaCom(MultiHoster): URL_REPLACEMENTS = [("https://", "http://")] - def handlePremium(self): + def handlePremium(self, pyfile): self.html = self.load("http://www.debriditalia.com/api.php", - get={'generate': "on", 'link': self.pyfile.url, 'p': self.getPassword()}) + get={'generate': "on", 'link': pyfile.url, 'p': self.getPassword()}) if "ERROR:" not in self.html: self.link = self.html.strip() @@ -32,7 +32,7 @@ class DebridItaliaCom(MultiHoster): self.html = self.load("http://debriditalia.com/linkgen2.php", post={'xjxfun' : "convertiLink", - 'xjxargs[]': "S" % self.pyfile.url, + 'xjxargs[]': "S" % pyfile.url, 'xjxargs[]': "S%s" % self.getPassword()}) try: self.link = re.search(r'
    \w+)' @@ -32,14 +32,12 @@ class DepositfilesCom(SimpleHoster): COOKIES = [("dfiles.eu", "lang_current", "en")] - FREE_LINK_PATTERN = r'' in self.html: self.logWarning(_("Download limit reached")) self.retry(25, 60 * 60, "Download limit reached") @@ -109,8 +107,8 @@ class DepositfilesCom(SimpleHoster): self.account.relogin(self.user) self.retry() else: - link = re.search(self.PREMIUM_LINK_PATTERN, self.html) - mirror = re.search(self.PREMIUM_MIRROR_PATTERN, self.html) + link = re.search(self.LINK_PREMIUM_PATTERN, self.html) + mirror = re.search(self.LINK_MIRROR_PATTERN, self.html) if link: dlink = link.group(1) elif mirror: diff --git a/module/plugins/hoster/DevhostSt.py b/module/plugins/hoster/DevhostSt.py index 85e36edb3..2a8734655 100644 --- a/module/plugins/hoster/DevhostSt.py +++ b/module/plugins/hoster/DevhostSt.py @@ -11,7 +11,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class DevhostSt(SimpleHoster): __name__ = "DevhostSt" __type__ = "hoster" - __version__ = "0.03" + __version__ = "0.04" __pattern__ = r'http://(?:www\.)?d-h\.st/(?!users/)\w{3}' @@ -24,7 +24,7 @@ class DevhostSt(SimpleHoster): SIZE_PATTERN = r'>Size: (?P[\d.,]+) (?P[\w^_]+)' OFFLINE_PATTERN = r'>File Not Found<' - LINK_PATTERN = r'id="downloadfile" href="(.+?)"' + LINK_FREE_PATTERN = r'id="downloadfile" href="(.+?)"' def setup(self): @@ -32,17 +32,4 @@ class DevhostSt(SimpleHoster): self.chunkLimit = 1 - def handleFree(self): - m = re.search(self.LINK_PATTERN, self.html) - if m is None: - self.error(_("Download link not found")) - - dl_url = m.group(1) - self.download(dl_url, disposition=True) - - check = self.checkDownload({'html': re.compile("html")}) - if check == "html": - self.error(_("Downloaded file is an html page")) - - getInfo = create_getInfo(DevhostSt) diff --git a/module/plugins/hoster/DlFreeFr.py b/module/plugins/hoster/DlFreeFr.py index 793c81b1c..ec40b64ce 100644 --- a/module/plugins/hoster/DlFreeFr.py +++ b/module/plugins/hoster/DlFreeFr.py @@ -36,7 +36,7 @@ class CustomBrowser(Browser): class DlFreeFr(SimpleHoster): __name__ = "DlFreeFr" __type__ = "hoster" - __version__ = "0.26" + __version__ = "0.27" __pattern__ = r'http://(?:www\.)?dl\.free\.fr/(\w+|getfile\.pl\?file=/\w+)' @@ -78,7 +78,7 @@ class DlFreeFr(SimpleHoster): if content_type and content_type.startswith("text/html"): # Undirect acces to requested file, with a web page providing it (captcha) self.html = self.load(valid_url) - self.handleFree() + self.handleFree(pyfile) else: # Direct access to requested file for users using free.fr as Internet Service Provider. self.download(valid_url, disposition=True) @@ -88,7 +88,7 @@ class DlFreeFr(SimpleHoster): self.fail(_("Invalid return code: ") + str(headers.get('code'))) - def handleFree(self): + def handleFree(self, pyfile): action, inputs = self.parseHtmlForm('action="getfile.pl"') adyoulike = AdYouLike(self) diff --git a/module/plugins/hoster/DropboxCom.py b/module/plugins/hoster/DropboxCom.py index 658974d13..a8ef5b4bc 100644 --- a/module/plugins/hoster/DropboxCom.py +++ b/module/plugins/hoster/DropboxCom.py @@ -8,7 +8,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class DropboxCom(SimpleHoster): __name__ = "DropboxCom" __type__ = "hoster" - __version__ = "0.03" + __version__ = "0.04" __pattern__ = r'https?://(?:www\.)?dropbox\.com/.+' @@ -31,12 +31,8 @@ class DropboxCom(SimpleHoster): self.resumeDownload = True - def handleFree(self): - self.download(self.pyfile.url, get={'dl': "1"}) - - check = self.checkDownload({'html': re.compile("html")}) - if check == "html": - self.error(_("Downloaded file is an html page")) + def handleFree(self, pyfile): + self.download(pyfile.url, get={'dl': "1"}) getInfo = create_getInfo(DropboxCom) diff --git a/module/plugins/hoster/EdiskCz.py b/module/plugins/hoster/EdiskCz.py index eb9338871..f8ccc972e 100644 --- a/module/plugins/hoster/EdiskCz.py +++ b/module/plugins/hoster/EdiskCz.py @@ -8,7 +8,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class EdiskCz(SimpleHoster): __name__ = "EdiskCz" __type__ = "hoster" - __version__ = "0.22" + __version__ = "0.23" __pattern__ = r'http://(?:www\.)?edisk\.(cz|sk|eu)/(stahni|sk/stahni|en/download)/.+' @@ -21,7 +21,7 @@ class EdiskCz(SimpleHoster): OFFLINE_PATTERN = r'

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

  • |

    Naraz je z jednej IP adresy mo.n. s.ahova. iba jeden s.bor' + 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/"' URL_REPLACEMENTS = [(r"(http://[^/]*\.)(sk|cz|hu|pl)/", r"\1eu/")] - def handlePremium(self): + def handlePremium(self, pyfile): if self.ERR_NOT_LOGGED_IN_PATTERN in self.html: self.account.relogin(self.user) self.retry(reason=_("User not logged in")) - self.download(self.pyfile.url.rstrip('/') + "/download/") + self.download(pyfile.url.rstrip('/') + "/download/") check = self.checkDownload({"login": re.compile(self.ERR_NOT_LOGGED_IN_PATTERN), - "json": re.compile(r'\{"status":"error".*?"message":"(.*?)"')}) + "json" : re.compile(r'\{"status":"error".*?"message":"(.*?)"')}) + if check == "login" or (check == "json" and self.lastCheck.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)) - def handleFree(self): + def handleFree(self, pyfile): if re.search(self.ERR_PARDL_PATTERN, self.html) is not None: self.longWait(5 * 60, 12) - m = re.search(self.FREE_URL_PATTERN, self.html) + m = re.search(self.LINK_FREE_PATTERN, self.html) if m is None: - self.error(_("FREE_URL_PATTERN not found")) + self.error(_("LINK_FREE_PATTERN not found")) parsed_url = "http://euroshare.eu%s" % m.group(1) self.logDebug("URL", parsed_url) self.download(parsed_url, disposition=True) - check = self.checkDownload({"multi_dl": re.compile(self.ERR_PARDL_PATTERN)}) - if check == "multi_dl": + + def checkFile(): + if self.checkDownload({"multi-dl": re.compile(self.ERR_PARDL_PATTERN)}) self.longWait(5 * 60, 12) + return super(EuroshareEu, self).checkFile() + getInfo = create_getInfo(EuroshareEu) diff --git a/module/plugins/hoster/ExtabitCom.py b/module/plugins/hoster/ExtabitCom.py index 7609954d3..5c2976a29 100644 --- a/module/plugins/hoster/ExtabitCom.py +++ b/module/plugins/hoster/ExtabitCom.py @@ -11,7 +11,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo, s class ExtabitCom(SimpleHoster): __name__ = "ExtabitCom" __type__ = "hoster" - __version__ = "0.63" + __version__ = "0.64" __pattern__ = r'http://(?:www\.)?extabit\.com/(file|go|fid)/(?P\w+)' @@ -25,10 +25,10 @@ class ExtabitCom(SimpleHoster): OFFLINE_PATTERN = r'>File not found<' TEMP_OFFLINE_PATTERN = r'>(File is temporary unavailable|No download mirror)<' - LINK_PATTERN = r'[\'"](http://guest\d+\.extabit\.com/\w+/.*?)[\'"]' + LINK_FREE_PATTERN = r'[\'"](http://guest\d+\.extabit\.com/\w+/.*?)[\'"]' - def handleFree(self): + def handleFree(self, pyfile): if r">Only premium users can download this file" in self.html: self.fail(_("Only premium users can download this file")) @@ -41,7 +41,7 @@ class ExtabitCom(SimpleHoster): self.logDebug("URL: " + self.req.http.lastEffectiveURL) m = re.match(self.__pattern__, self.req.http.lastEffectiveURL) - fileID = m.group('ID') if m else self.info('ID') + fileID = m.group('ID') if m else self.info['pattern']['ID'] m = re.search(r'recaptcha/api/challenge\?k=(\w+)', self.html) if m: @@ -67,9 +67,9 @@ class ExtabitCom(SimpleHoster): self.html = self.load("http://extabit.com/file/%s%s" % (fileID, res['href'])) - m = re.search(self.LINK_PATTERN, self.html) + m = re.search(self.LINK_FREE_PATTERN, self.html) if m is None: - self.error(_("LINK_PATTERN not found")) + self.error(_("LINK_FREE_PATTERN not found")) url = m.group(1) self.download(url) diff --git a/module/plugins/hoster/FastixRu.py b/module/plugins/hoster/FastixRu.py index b68c79ebc..9a38f5a72 100644 --- a/module/plugins/hoster/FastixRu.py +++ b/module/plugins/hoster/FastixRu.py @@ -12,11 +12,11 @@ from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo class FastixRu(MultiHoster): __name__ = "FastixRu" __type__ = "hoster" - __version__ = "0.08" + __version__ = "0.09" __pattern__ = r'http://(?:www\.)?fastix\.(ru|it)/file/\w{24}' - __description__ = """Fastix hoster plugin""" + __description__ = """Fastix multi-hoster plugin""" __license__ = "GPLv3" __authors__ = [("Massimo Rosamilia", "max@spiritix.eu")] @@ -35,12 +35,12 @@ class FastixRu(MultiHoster): self.chunkLimit = 3 - def handlePremium(self): + def handlePremium(self, pyfile): api_key = self.account.getAccountData(self.user) api_key = api_key['api'] page = self.load("http://fastix.ru/api_v2/", - get={'apikey': api_key, 'sub': "getdirectlink", 'link': self.pyfile.url}) + get={'apikey': api_key, 'sub': "getdirectlink", 'link': pyfile.url}) data = json_loads(page) self.logDebug("Json data", data) @@ -50,19 +50,19 @@ class FastixRu(MultiHoster): else: self.link = data['downloadlink'] - if self.link != self.pyfile.url: + if self.link != pyfile.url: self.logDebug("New URL: %s" % self.link) - if self.pyfile.name.startswith("http") or self.pyfile.name.startswith("Unknown"): + if pyfile.name.startswith("http") or pyfile.name.startswith("Unknown"): #only use when name wasnt already set - self.pyfile.name = self.getFilename(self.link) + pyfile.name = self.getFilename(self.link) def checkFile(self): - super(FastixRu, self).checkFile() - - if self.checkDownload({"error": "An error occurred while processing your request"}) is "error": + if self.checkDownload({"error": "An error occurred while processing your request"}): self.retry(wait_time=60, reason=_("An error occurred while generating link")) + return super(FastixRu, self).checkFile() + getInfo = create_getInfo(FastixRu) diff --git a/module/plugins/hoster/FastshareCz.py b/module/plugins/hoster/FastshareCz.py index 31437c6e7..6fe871ad4 100644 --- a/module/plugins/hoster/FastshareCz.py +++ b/module/plugins/hoster/FastshareCz.py @@ -10,7 +10,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class FastshareCz(SimpleHoster): __name__ = "FastshareCz" __type__ = "hoster" - __version__ = "0.26" + __version__ = "0.27" __pattern__ = r'http://(?:www\.)?fastshare\.cz/\d+/.+' @@ -45,7 +45,7 @@ class FastshareCz(SimpleHoster): self.info.pop('error', None) - def handleFree(self): + def handleFree(self, pyfile): m = re.search(self.FREE_URL_PATTERN, self.html) if m: action, captcha_src = m.groups() @@ -58,22 +58,22 @@ class FastshareCz(SimpleHoster): def checkFile(self): - super(FastshareCz, self).checkFile() - check = self.checkDownload({ - 'paralell_dl' : re.compile(r"FastShare.cz|', self.html) + if m is None: + self.fail(_("could not find required json data")) + + json = m.group(1) + + res = json_loads(json) + + yadisk_ver = yadisk_sk = yadisk_id = yadisk_size = yadisk_name = yadisk_hash = None + try: + for sect in res: + if 'model' in sect: + if sect['model'] == 'config': + yadisk_ver = sect['data']['version'] + yadisk_sk = sect['data']['sk'] + elif sect['model'] == 'resource': + yadisk_id = sect['data']['id'] + yadisk_size = sect['data']['meta']['size'] + yadisk_name = sect['data']['name'] + except: + self.fail(_("Unexpected server response")) + if yadisk_id is None or yadisk_sk is None or yadisk_id is None or yadisk_size is None or yadisk_name is None: + self.fail(_("json data is missing important information, cannot continue")) + + + self.pyfile.size = yadisk_size + self.pyfile.name = yadisk_name + + yadisk_idclient = "" + for i in range(1, 32): + yadisk_idclient += random.choice('0123456abcdef') + + post_data = {'idClient': yadisk_idclient, + 'version': yadisk_ver, + '_model.0': 'do-get-resource-url', + 'sk': yadisk_sk, + 'id.0': yadisk_id} + + result_json = self.load("https://yadi.sk/models/?_m=do-get-resource-url", post=post_data) + + res = json_loads(result_json) + try: + url = res['models'][0]['data']['file'] + except: + self.fail(_("faild to retrieve the download url")) + + self.download(url) + + +getInfo = create_getInfo(YadiSk) -- cgit v1.2.3 From a4a358ce15ecac4aaa35935a074819058e6333a8 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 7 Apr 2015 16:47:50 +0200 Subject: [YadiSk] Cleanup --- module/plugins/hoster/YadiSk | 84 ---------------------------------------- module/plugins/hoster/YadiSk.py | 85 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 85 insertions(+), 84 deletions(-) delete mode 100644 module/plugins/hoster/YadiSk create mode 100644 module/plugins/hoster/YadiSk.py (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/YadiSk b/module/plugins/hoster/YadiSk deleted file mode 100644 index 33f791352..000000000 --- a/module/plugins/hoster/YadiSk +++ /dev/null @@ -1,84 +0,0 @@ -# -*- coding: utf-8 -*- - -import re -import pycurl -import random - -from module.common.json_layer import json_loads -from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo - - -class YadiSk(SimpleHoster): - __name__ = "YadiSk" - __type__ = "hoster" - __version__ = "0.01" - - __pattern__ = r'https?://yadi\.sk/d/.+' - - __description__ = """yadi.sk hoster plugin""" - __license__ = "GPLv3" - __authors__ = [("GammaC0de", "nomail@fakemailbox.com")] - - OFFLINE_PATTERN = r"Nothing found" - - - def setup(self): - self.resumeDownload = False - self.multiDL = False - self.chunkLimit = 1 - - def prepare(self): - self.req.http.c.setopt(pycurl.USERAGENT, "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:36.0) Gecko/20100101 Firefox/36.0") - return super(YadiSk, self).prepare() - - def handleFree(self, pyfile): - m = re.search(r'', self.html) - if m is None: - self.fail(_("could not find required json data")) - - json = m.group(1) - - res = json_loads(json) - - yadisk_ver = yadisk_sk = yadisk_id = yadisk_size = yadisk_name = yadisk_hash = None - try: - for sect in res: - if 'model' in sect: - if sect['model'] == 'config': - yadisk_ver = sect['data']['version'] - yadisk_sk = sect['data']['sk'] - elif sect['model'] == 'resource': - yadisk_id = sect['data']['id'] - yadisk_size = sect['data']['meta']['size'] - yadisk_name = sect['data']['name'] - except: - self.fail(_("Unexpected server response")) - if yadisk_id is None or yadisk_sk is None or yadisk_id is None or yadisk_size is None or yadisk_name is None: - self.fail(_("json data is missing important information, cannot continue")) - - - self.pyfile.size = yadisk_size - self.pyfile.name = yadisk_name - - yadisk_idclient = "" - for i in range(1, 32): - yadisk_idclient += random.choice('0123456abcdef') - - post_data = {'idClient': yadisk_idclient, - 'version': yadisk_ver, - '_model.0': 'do-get-resource-url', - 'sk': yadisk_sk, - 'id.0': yadisk_id} - - result_json = self.load("https://yadi.sk/models/?_m=do-get-resource-url", post=post_data) - - res = json_loads(result_json) - try: - url = res['models'][0]['data']['file'] - except: - self.fail(_("faild to retrieve the download url")) - - self.download(url) - - -getInfo = create_getInfo(YadiSk) diff --git a/module/plugins/hoster/YadiSk.py b/module/plugins/hoster/YadiSk.py new file mode 100644 index 000000000..c71d16cf2 --- /dev/null +++ b/module/plugins/hoster/YadiSk.py @@ -0,0 +1,85 @@ +# -*- coding: utf-8 -*- + +import re +import pycurl +import random + +from module.common.json_layer import json_loads +from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo + + +class YadiSk(SimpleHoster): + __name__ = "YadiSk" + __type__ = "hoster" + __version__ = "0.02" + + __pattern__ = r'https?://yadi\.sk/d/\w+' + + __description__ = """Yadi.sk hoster plugin""" + __license__ = "GPLv3" + __authors__ = [("GammaC0de", "nomail@fakemailbox.com")] + + + OFFLINE_PATTERN = r'Nothing found' + + + def setup(self): + self.resumeDownload = False + self.multiDL = False + self.chunkLimit = 1 + + + def handleFree(self, pyfile): + m = re.search(r'', self.html) + if m is None: + self.fail(_("could not find required json data")) + + res = json_loads(m.group(1)) + + yadisk_ver = None + yadisk_sk = None + yadisk_id = None + yadisk_size = None + yadisk_name = None + yadisk_hash = None + try: #@TODO: Copy to apiInfo method + for sect in res: + if 'model' in sect: + if sect['model'] == 'config': + yadisk_ver = sect['data']['version'] + yadisk_sk = sect['data']['sk'] + + elif sect['model'] == 'resource': + yadisk_id = sect['data']['id'] + yadisk_size = sect['data']['meta']['size'] + yadisk_name = sect['data']['name'] + + except Exception: + self.fail(_("Unexpected server response")) + + if None is in (yadisk_id, yadisk_sk, yadisk_id, yadisk_size, yadisk_name): + self.fail(_("json data is missing important information, cannot continue")) + + self.pyfile.size = yadisk_size + self.pyfile.name = yadisk_name + + yadisk_idclient = "" + for _i in range(1, 32): + yadisk_idclient += random.choice('0123456abcdef') + + result_json = self.load("https://yadi.sk/models/?_m=do-get-resource-url", + post={'idClient': yadisk_idclient, + 'version' : yadisk_ver, + '_model.0': 'do-get-resource-url', + 'sk' : yadisk_sk, + 'id.0' : yadisk_id}) + + res = json_loads(result_json) + try: + self.link = res['models'][0]['data']['file'] + + except Exception: + self.fail(_("faild to retrieve the download url")) + + +getInfo = create_getInfo(YadiSk) -- cgit v1.2.3 From 1cfc960fd3ec384364ffb1e09d3ee98fc657eddb Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 7 Apr 2015 16:51:14 +0200 Subject: [SimpleDereferer][SimpleHoster] Update user-agent --- module/plugins/hoster/Keep2ShareCc.py | 13 ++++++------- module/plugins/hoster/YadiSk.py | 2 +- 2 files changed, 7 insertions(+), 8 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/Keep2ShareCc.py b/module/plugins/hoster/Keep2ShareCc.py index 296226e3c..65e9ddc2d 100644 --- a/module/plugins/hoster/Keep2ShareCc.py +++ b/module/plugins/hoster/Keep2ShareCc.py @@ -30,7 +30,7 @@ class Keep2ShareCc(SimpleHoster): OFFLINE_PATTERN = r'File not found or deleted|Sorry, this file is blocked or deleted|Error 404' TEMP_OFFLINE_PATTERN = r'Downloading blocked due to' - LINK_FREE_PATTERN = r'"([^"]+url.html\?file=.+?)"|window\.location\.href = \'(.+?)\';' + LINK_FREE_PATTERN = r'"(.+?url.html\?file=.+?)"|window\.location\.href = \'(.+?)\';' LINK_PREMIUM_PATTERN = r'window\.location\.href = \'(.+?)\';' CAPTCHA_PATTERN = r'src="(/file/captcha\.html.+?)"' @@ -67,20 +67,18 @@ class Keep2ShareCc(SimpleHoster): def handleFree(self, pyfile): - self.fid = re.search(r'', self.html).group(1) + self.fid = re.search(r'', self.html).group(1) self.html = self.load(pyfile.url, post={'yt0': '', 'slow_id': self.fid}) - self.logDebug(self.fid) - self.logDebug(pyfile.url) + + # self.logDebug(self.fid) + # self.logDebug(pyfile.url) self.checkErrors() m = re.search(self.LINK_FREE_PATTERN, self.html) - if m is None: self.handleCaptcha() - self.wait(31) - self.html = self.load(pyfile.url) m = re.search(self.LINK_FREE_PATTERN, self.html) @@ -98,6 +96,7 @@ class Keep2ShareCc(SimpleHoster): m = re.search(r'id="(captcha\-form)"', self.html) self.logDebug("captcha-form found %s" % m) + m = re.search(self.CAPTCHA_PATTERN, self.html) self.logDebug("CAPTCHA_PATTERN found %s" % m) if m: diff --git a/module/plugins/hoster/YadiSk.py b/module/plugins/hoster/YadiSk.py index c71d16cf2..57d8ae786 100644 --- a/module/plugins/hoster/YadiSk.py +++ b/module/plugins/hoster/YadiSk.py @@ -70,7 +70,7 @@ class YadiSk(SimpleHoster): result_json = self.load("https://yadi.sk/models/?_m=do-get-resource-url", post={'idClient': yadisk_idclient, 'version' : yadisk_ver, - '_model.0': 'do-get-resource-url', + '_model.0': "do-get-resource-url", 'sk' : yadisk_sk, 'id.0' : yadisk_id}) -- cgit v1.2.3 From 795eb0814fcf6be6ca4ca0ec322e77f00a6efeab Mon Sep 17 00:00:00 2001 From: sraedler Date: Tue, 7 Apr 2015 17:34:01 +0200 Subject: Fixed RemixshareCom --- module/plugins/hoster/RemixshareCom.py | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/RemixshareCom.py b/module/plugins/hoster/RemixshareCom.py index 803256d86..b62db8af3 100644 --- a/module/plugins/hoster/RemixshareCom.py +++ b/module/plugins/hoster/RemixshareCom.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # # Test links: -# http://remixshare.com/download/p946u +# http://remixshare.com/download/z8uli # # Note: # The remixshare.com website is very very slow, so @@ -16,7 +16,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class RemixshareCom(SimpleHoster): __name__ = "RemixshareCom" __type__ = "hoster" - __version__ = "0.03" + __version__ = "0.04" __pattern__ = r'https?://remixshare\.com/(download|dl)/\w+' __config__ = [("use_premium", "bool", "Use premium account if available", True)] @@ -24,15 +24,16 @@ class RemixshareCom(SimpleHoster): __description__ = """Remixshare.com hoster plugin""" __license__ = "GPLv3" __authors__ = [("zapp-brannigan", "fuerst.reinje@web.de"), - ("Walter Purcaro", "vuolter@gmail.com")] + ("Walter Purcaro", "vuolter@gmail.com"), + ("sraedler", "simon.raedler@yahoo.de")] INFO_PATTERN = r'title=\'.+?\'>(?P.+?) \((?P\d+) (?P[\w^_]+)\)<' OFFLINE_PATTERN = r'

    Ooops!<' - LINK_FREE_PATTERN = r'(http://remixshare\.com/downloadfinal/.+?)"' + LINK_FREE_PATTERN = r'(http:\/\/remixshare\.com\/startloading(\w|\/)+)' TOKEN_PATTERN = r'var acc = (\d+)' - WAIT_PATTERN = r'var XYZ = r"(\d+)"' + WAIT_PATTERN = r'var XYZ = "(\d+)"' def setup(self): @@ -49,13 +50,15 @@ class RemixshareCom(SimpleHoster): if not c: self.error(_("Cannot parse file token")) - self.link = b.group(1) + c.group(1) + self.link = b.group(1) + "/zzz/" + c.group(1) + self.logDebug(self.link) #Check if we have to wait seconds = re.search(self.WAIT_PATTERN, self.html) if seconds: - self.logDebug("Wait " + seconds.group(1)) + self.logDebug("Wait " + seconds.group(1) + " Seconds") self.wait(seconds.group(1)) + self.download(self.link) getInfo = create_getInfo(RemixshareCom) -- cgit v1.2.3 From 034d87c836f9fba82142a06b5f666c84ca10bd50 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 7 Apr 2015 21:26:23 +0200 Subject: [YadiSk] Fix https://github.com/pyload/pyload/issues/1321 --- module/plugins/hoster/YadiSk.py | 45 ++++++++++++++++++++--------------------- 1 file changed, 22 insertions(+), 23 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/YadiSk.py b/module/plugins/hoster/YadiSk.py index 57d8ae786..c3749d30d 100644 --- a/module/plugins/hoster/YadiSk.py +++ b/module/plugins/hoster/YadiSk.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- import re -import pycurl import random from module.common.json_layer import json_loads @@ -11,13 +10,13 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class YadiSk(SimpleHoster): __name__ = "YadiSk" __type__ = "hoster" - __version__ = "0.02" + __version__ = "0.03" __pattern__ = r'https?://yadi\.sk/d/\w+' __description__ = """Yadi.sk hoster plugin""" __license__ = "GPLv3" - __authors__ = [("GammaC0de", "nomail@fakemailbox.com")] + __authors__ = [("GammaC0de", None)] OFFLINE_PATTERN = r'Nothing found' @@ -32,7 +31,7 @@ class YadiSk(SimpleHoster): def handleFree(self, pyfile): m = re.search(r'', self.html) if m is None: - self.fail(_("could not find required json data")) + self.error(_("could not find required json data")) res = json_loads(m.group(1)) @@ -41,45 +40,45 @@ class YadiSk(SimpleHoster): yadisk_id = None yadisk_size = None yadisk_name = None - yadisk_hash = None - try: #@TODO: Copy to apiInfo method + + try: #@TODO: Copy to apiInfo for sect in res: if 'model' in sect: - if sect['model'] == 'config': + if sect['model'] == "config": yadisk_ver = sect['data']['version'] yadisk_sk = sect['data']['sk'] - elif sect['model'] == 'resource': + elif sect['model'] == "resource": yadisk_id = sect['data']['id'] yadisk_size = sect['data']['meta']['size'] yadisk_name = sect['data']['name'] - except Exception: - self.fail(_("Unexpected server response")) + except Exception, e: + self.fail(_("Unexpected server response"), e) - if None is in (yadisk_id, yadisk_sk, yadisk_id, yadisk_size, yadisk_name): - self.fail(_("json data is missing important information, cannot continue")) + if None in (yadisk_id, yadisk_sk, yadisk_id, yadisk_size, yadisk_name): + self.error(_("Missing JSON data")) self.pyfile.size = yadisk_size self.pyfile.name = yadisk_name yadisk_idclient = "" - for _i in range(1, 32): + for _i in range(32): yadisk_idclient += random.choice('0123456abcdef') - result_json = self.load("https://yadi.sk/models/?_m=do-get-resource-url", - post={'idClient': yadisk_idclient, - 'version' : yadisk_ver, - '_model.0': "do-get-resource-url", - 'sk' : yadisk_sk, - 'id.0' : yadisk_id}) - - res = json_loads(result_json) try: - self.link = res['models'][0]['data']['file'] + self.html = self.load("https://yadi.sk/models/", + get={'_m': "do-get-resource-url"}, + post={'idClient': yadisk_idclient, + 'version' : yadisk_ver, + '_model.0': "do-get-resource-url", + 'sk' : yadisk_sk, + 'id.0' : yadisk_id}) + + self.link = json_loads(self.html)['models'][0]['data']['file'] except Exception: - self.fail(_("faild to retrieve the download url")) + pass getInfo = create_getInfo(YadiSk) -- cgit v1.2.3 From f33c80efb9437b815deea56a03897a57ae255d06 Mon Sep 17 00:00:00 2001 From: sraedler Date: Wed, 8 Apr 2015 02:00:00 +0200 Subject: Added Solidfiles Hoster --- module/plugins/hoster/Solidfiles.py | 42 +++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 module/plugins/hoster/Solidfiles.py (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/Solidfiles.py b/module/plugins/hoster/Solidfiles.py new file mode 100644 index 000000000..54631ee50 --- /dev/null +++ b/module/plugins/hoster/Solidfiles.py @@ -0,0 +1,42 @@ +# -*- coding: utf-8 -*- +# +# Test links: +# http://www.solidfiles.com/d/609cdb4b1b + +import re + +from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo + + +class solidfiles(SimpleHoster): + __name__ = "solidfiles" + __type__ = "hoster" + __version__ = "0.01" + + __pattern__ = r'http:\/\/(?:www\.)?solidfiles\.com\/\w+\/(\w)+\/(\w|.|\d)*' + + __description__ = """ solidfiles.com hoster plugin """ + __license__ = "GPLv3" + __authors__ = [("sraedler", "simon.raedler@yahoo.de")] + + + NAME_PATTERN = r'

    (?P(\d|\.)+) (?P(\w)+)' + OFFLINE_PATTERN = r'

    404<\/h1>' + + LINK_FREE_PATTERN = r'id="ddl-text" href="(https:\/\/(\w|\d|\.|\/)+)"' + + def setup(self): + self.multiDL = True + self.chunkLimit = 1 + + + def handleFree(self, pyfile): + # Search for Download URL + m = re.search(self.LINK_FREE_PATTERN, self.html) + if m is None: + self.error(_("LINK_FREE_PATTERN not found")) + self.logDebug("Downloadlink: " + m.group(1)) + self.download(m.group(1)) + +getInfo = create_getInfo(solidfiles) \ No newline at end of file -- cgit v1.2.3 From eb9edff095dd9f83966723be506a4fd91f64a8c9 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Wed, 8 Apr 2015 03:23:09 +0200 Subject: [SolidfilesCom] Cleanup --- module/plugins/hoster/Solidfiles.py | 42 ---------------------------------- module/plugins/hoster/SolidfilesCom.py | 33 ++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 42 deletions(-) delete mode 100644 module/plugins/hoster/Solidfiles.py create mode 100644 module/plugins/hoster/SolidfilesCom.py (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/Solidfiles.py b/module/plugins/hoster/Solidfiles.py deleted file mode 100644 index 54631ee50..000000000 --- a/module/plugins/hoster/Solidfiles.py +++ /dev/null @@ -1,42 +0,0 @@ -# -*- coding: utf-8 -*- -# -# Test links: -# http://www.solidfiles.com/d/609cdb4b1b - -import re - -from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo - - -class solidfiles(SimpleHoster): - __name__ = "solidfiles" - __type__ = "hoster" - __version__ = "0.01" - - __pattern__ = r'http:\/\/(?:www\.)?solidfiles\.com\/\w+\/(\w)+\/(\w|.|\d)*' - - __description__ = """ solidfiles.com hoster plugin """ - __license__ = "GPLv3" - __authors__ = [("sraedler", "simon.raedler@yahoo.de")] - - - NAME_PATTERN = r'

    (?P(\d|\.)+) (?P(\w)+)' - OFFLINE_PATTERN = r'

    404<\/h1>' - - LINK_FREE_PATTERN = r'id="ddl-text" href="(https:\/\/(\w|\d|\.|\/)+)"' - - def setup(self): - self.multiDL = True - self.chunkLimit = 1 - - - def handleFree(self, pyfile): - # Search for Download URL - m = re.search(self.LINK_FREE_PATTERN, self.html) - if m is None: - self.error(_("LINK_FREE_PATTERN not found")) - self.logDebug("Downloadlink: " + m.group(1)) - self.download(m.group(1)) - -getInfo = create_getInfo(solidfiles) \ No newline at end of file diff --git a/module/plugins/hoster/SolidfilesCom.py b/module/plugins/hoster/SolidfilesCom.py new file mode 100644 index 000000000..d359577d6 --- /dev/null +++ b/module/plugins/hoster/SolidfilesCom.py @@ -0,0 +1,33 @@ +# -*- coding: utf-8 -*- +# +# Test links: +# http://www.solidfiles.com/d/609cdb4b1b + +from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo + + +class SolidfilesCom(SimpleHoster): + __name__ = "SolidfilesCom" + __type__ = "hoster" + __version__ = "0.02" + + __pattern__ = r'http://(?:www\.)?solidfiles\.com\/d/\w+' + + __description__ = """Solidfiles.com hoster plugin""" + __license__ = "GPLv3" + __authors__ = [("sraedler", "simon.raedler@yahoo.de")] + + + NAME_PATTERN = r'

    (?P[\d.,]+) (?P[\w_^]+)' + OFFLINE_PATTERN = r'

    404' + + LINK_FREE_PATTERN = r'id="ddl-text" href="(.+?)"' + + + def setup(self): + self.multiDL = True + self.chunkLimit = 1 + + +getInfo = create_getInfo(SolidfilesCom) -- cgit v1.2.3 From a667e20cfc029672801f28e6db3b05483658c13d Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Wed, 8 Apr 2015 03:37:42 +0200 Subject: [RemixshareCom] Cleanup --- module/plugins/hoster/RemixshareCom.py | 30 ++++++++++++------------------ 1 file changed, 12 insertions(+), 18 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/RemixshareCom.py b/module/plugins/hoster/RemixshareCom.py index b62db8af3..d60101aed 100644 --- a/module/plugins/hoster/RemixshareCom.py +++ b/module/plugins/hoster/RemixshareCom.py @@ -16,23 +16,25 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class RemixshareCom(SimpleHoster): __name__ = "RemixshareCom" __type__ = "hoster" - __version__ = "0.04" + __version__ = "0.05" __pattern__ = r'https?://remixshare\.com/(download|dl)/\w+' __config__ = [("use_premium", "bool", "Use premium account if available", True)] __description__ = """Remixshare.com hoster plugin""" __license__ = "GPLv3" - __authors__ = [("zapp-brannigan", "fuerst.reinje@web.de"), - ("Walter Purcaro", "vuolter@gmail.com"), - ("sraedler", "simon.raedler@yahoo.de")] + __authors__ = [("zapp-brannigan", "fuerst.reinje@web.de" ), + ("Walter Purcaro", "vuolter@gmail.com" ), + ("sraedler" , "simon.raedler@yahoo.de")] - INFO_PATTERN = r'title=\'.+?\'>(?P.+?) \((?P\d+) (?P[\w^_]+)\)<' - OFFLINE_PATTERN = r'

    Ooops!<' + INFO_PATTERN = r'title=\'.+?\'>(?P.+?) \((?P\d+) (?P[\w^_]+)\)<' + HASHSUM_PATTERN = r'>(?PMD5): (?P\w+)' + OFFLINE_PATTERN = r'

    Ooops!' - LINK_FREE_PATTERN = r'(http:\/\/remixshare\.com\/startloading(\w|\/)+)' + LINK_PATTERN = r'var uri = "(.+?)"' TOKEN_PATTERN = r'var acc = (\d+)' + WAIT_PATTERN = r'var XYZ = "(\d+)"' @@ -42,23 +44,15 @@ class RemixshareCom(SimpleHoster): def handleFree(self, pyfile): - b = re.search(self.LINK_FREE_PATTERN, self.html) + b = re.search(self.LINK_PATTERN, self.html) if not b: - self.error(_("Cannot parse download url")) + self.error(_("File url")) c = re.search(self.TOKEN_PATTERN, self.html) if not c: - self.error(_("Cannot parse file token")) + self.error(_("File token")) self.link = b.group(1) + "/zzz/" + c.group(1) - self.logDebug(self.link) - - #Check if we have to wait - seconds = re.search(self.WAIT_PATTERN, self.html) - if seconds: - self.logDebug("Wait " + seconds.group(1) + " Seconds") - self.wait(seconds.group(1)) - self.download(self.link) getInfo = create_getInfo(RemixshareCom) -- cgit v1.2.3 From 58980accb36660d200d2239f7c801173ec899b56 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Wed, 8 Apr 2015 14:22:26 +0200 Subject: [CatShareNet] https://github.com/pyload/pyload/issues/1325 --- module/plugins/hoster/CatShareNet.py | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/CatShareNet.py b/module/plugins/hoster/CatShareNet.py index ec9c62a23..9e3f28cfa 100644 --- a/module/plugins/hoster/CatShareNet.py +++ b/module/plugins/hoster/CatShareNet.py @@ -9,7 +9,7 @@ from module.plugins.internal.CaptchaService import ReCaptcha class CatShareNet(SimpleHoster): __name__ = "CatShareNet" __type__ = "hoster" - __version__ = "0.12" + __version__ = "0.13" __pattern__ = r'http://(?:www\.)?catshare\.net/\w{16}' __config__ = [("use_premium", "bool", "Use premium account if available", True)] @@ -24,12 +24,13 @@ class CatShareNet(SimpleHoster): TEXT_ENCODING = True INFO_PATTERN = r'(?P<N>.+) \((?P<S>[\d.,]+) (?P<U>[\w^_]+)\)<' - OFFLINE_PATTERN = ur'Podany plik został usunięty\s*</div>' + OFFLINE_PATTERN = r'<div class="alert alert-error"' IP_BLOCKED_PATTERN = ur'>Nasz serwis wykrył że Twój adres IP nie pochodzi z Polski.<' WAIT_PATTERN = r'var\scount\s=\s(\d+);' - LINK_FREE_PATTERN = LINK_PREMIUM_PATTERN = r'<form action="(.+?)" method="GET">' + LINK_FREE_PATTERN = r'<form action="(.+?)" method="GET">' + LINK_PREMIUM_PATTERN = r'<form action="(.+?)" method="GET">' def setup(self): @@ -54,11 +55,8 @@ class CatShareNet(SimpleHoster): 'recaptcha_response_field' : response}) m = re.search(self.LINK_FREE_PATTERN, self.html) - if m is None: - self.invalidCaptcha() - self.retry(reason=_("Wrong captcha entered")) - - self.link = m.group(1) + if m: + self.link = m.group(1) getInfo = create_getInfo(CatShareNet) -- cgit v1.2.3 From 138e514ce4dd9ccce8af5b4dfbecdfcc03b62cbe Mon Sep 17 00:00:00 2001 From: Walter Purcaro <vuolter@users.noreply.github.com> Date: Wed, 8 Apr 2015 14:29:06 +0200 Subject: [RapiduNet] https://github.com/pyload/pyload/issues/1326 --- module/plugins/hoster/RapiduNet.py | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/RapiduNet.py b/module/plugins/hoster/RapiduNet.py index f43eda0cb..8a85bc844 100644 --- a/module/plugins/hoster/RapiduNet.py +++ b/module/plugins/hoster/RapiduNet.py @@ -13,7 +13,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class RapiduNet(SimpleHoster): __name__ = "RapiduNet" __type__ = "hoster" - __version__ = "0.07" + __version__ = "0.08" __pattern__ = r'https?://(?:www\.)?rapidu\.net/(?P<ID>\d{10})' __config__ = [("use_premium", "bool", "Use premium account if available", True)] @@ -26,7 +26,7 @@ class RapiduNet(SimpleHoster): COOKIES = [("rapidu.net", "rapidu_lang", "en")] INFO_PATTERN = r'<h1 title="(?P<N>.*)">.*</h1>\s*<small>(?P<S>\d+(\.\d+)?)\s(?P<U>\w+)</small>' - OFFLINE_PATTERN = r'404 - File not found' + OFFLINE_PATTERN = r'<h1>404' ERROR_PATTERN = r'<div class="error">' @@ -58,20 +58,18 @@ class RapiduNet(SimpleHoster): self.wait(int(jsvars['timeToDownload']) - int(time.time())) recaptcha = ReCaptcha(self) + response, challenge = recaptcha.challenge(self.RECAPTCHA_KEY) - for _i in xrange(10): - response, challenge = recaptcha.challenge(self.RECAPTCHA_KEY) - - jsvars = self.getJsonResponse("https://rapidu.net/ajax.php", - get={'a': "getCheckCaptcha"}, - post={'_go' : "", - 'captcha1': challenge, - 'captcha2': response, - 'fileId' : self.info['pattern']['ID']}, - decode=True) - if jsvars['message'] == 'success': - self.download(jsvars['url']) - break + jsvars = self.getJsonResponse("https://rapidu.net/ajax.php", + get={'a': "getCheckCaptcha"}, + post={'_go' : "", + 'captcha1': challenge, + 'captcha2': response, + 'fileId' : self.info['pattern']['ID']}, + decode=True) + + if jsvars['message'] == 'success': + self.link = jsvars['url'] def getJsonResponse(self, *args, **kwargs): -- cgit v1.2.3 From 02e3ede3edcf4415ac466fbea9d4f25d9ccc8671 Mon Sep 17 00:00:00 2001 From: Walter Purcaro <vuolter@users.noreply.github.com> Date: Wed, 8 Apr 2015 15:38:01 +0200 Subject: Spare code cosmetics --- module/plugins/hoster/EuroshareEu.py | 2 +- module/plugins/hoster/FreakshareCom.py | 20 +++++++++++--------- module/plugins/hoster/NetloadIn.py | 2 +- module/plugins/hoster/OverLoadMe.py | 2 +- module/plugins/hoster/PornhubCom.py | 2 +- module/plugins/hoster/RealdebridCom.py | 2 +- module/plugins/hoster/RedtubeCom.py | 2 +- module/plugins/hoster/ShareplaceCom.py | 2 +- module/plugins/hoster/XHamsterCom.py | 2 +- module/plugins/hoster/YoupornCom.py | 2 +- module/plugins/hoster/YourfilesTo.py | 2 +- 11 files changed, 21 insertions(+), 19 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/EuroshareEu.py b/module/plugins/hoster/EuroshareEu.py index c5059e69e..922665c2e 100644 --- a/module/plugins/hoster/EuroshareEu.py +++ b/module/plugins/hoster/EuroshareEu.py @@ -48,7 +48,7 @@ class EuroshareEu(SimpleHoster): def handleFree(self, pyfile): - if re.search(self.ERR_PARDL_PATTERN, self.html) is not None: + if re.search(self.ERR_PARDL_PATTERN, self.html): self.longWait(5 * 60, 12) m = re.search(self.LINK_FREE_PATTERN, self.html) diff --git a/module/plugins/hoster/FreakshareCom.py b/module/plugins/hoster/FreakshareCom.py index 9a11f933d..6a595e75b 100644 --- a/module/plugins/hoster/FreakshareCom.py +++ b/module/plugins/hoster/FreakshareCom.py @@ -107,12 +107,14 @@ class FreakshareCom(Hoster): def get_file_name(self): if not self.html: self.download_html() + if not self.wantReconnect: - file_name = re.search(r"<h1\sclass=\"box_heading\"\sstyle=\"text-align:center;\">([^ ]+)", self.html) - if file_name is not None: - file_name = file_name.group(1) + m = re.search(r"<h1\sclass=\"box_heading\"\sstyle=\"text-align:center;\">([^ ]+)", self.html) + if m: + file_name = m.group(1) else: file_name = self.pyfile.url + return file_name else: return self.pyfile.url @@ -122,12 +124,12 @@ class FreakshareCom(Hoster): size = 0 if not self.html: self.download_html() + if not self.wantReconnect: - file_size_check = re.search( - r"<h1\sclass=\"box_heading\"\sstyle=\"text-align:center;\">[^ ]+ - ([^ ]+) (\w\w)yte", self.html) - if file_size_check is not None: - units = float(file_size_check.group(1).replace(",", "")) - pow = {'KB': 1, 'MB': 2, 'GB': 3}[file_size_check.group(2)] + m = re.search(r"<h1\sclass=\"box_heading\"\sstyle=\"text-align:center;\">[^ ]+ - ([^ ]+) (\w\w)yte", self.html) + if m: + units = float(m.group(1).replace(",", "")) + pow = {'KB': 1, 'MB': 2, 'GB': 3}[m.group(2)] size = int(units * 1024 ** pow) return size @@ -153,7 +155,7 @@ class FreakshareCom(Hoster): """ if not self.html: self.download_html() - if re.search(r"This file does not exist!", self.html) is not None: + if re.search(r"This file does not exist!", self.html): return False else: return True diff --git a/module/plugins/hoster/NetloadIn.py b/module/plugins/hoster/NetloadIn.py index 0ff3c25d3..57af3f18e 100644 --- a/module/plugins/hoster/NetloadIn.py +++ b/module/plugins/hoster/NetloadIn.py @@ -268,7 +268,7 @@ class NetloadIn(Hoster): try: file_url_pattern = r'<a class="Orange_Link" href="(http://.+)".?>Or click here' attempt = re.search(file_url_pattern, page) - if attempt is not None: + if attempt: return attempt.group(1) else: self.logDebug("Backup try for final link") diff --git a/module/plugins/hoster/OverLoadMe.py b/module/plugins/hoster/OverLoadMe.py index 398946e43..934de5746 100644 --- a/module/plugins/hoster/OverLoadMe.py +++ b/module/plugins/hoster/OverLoadMe.py @@ -42,7 +42,7 @@ class OverLoadMe(MultiHoster): self.logWarning(data['msg']) self.tempOffline() else: - if pyfile.name is not None and pyfile.name.endswith('.tmp') and data['filename']: + if pyfile.name and pyfile.name.endswith('.tmp') and data['filename']: pyfile.name = data['filename'] pyfile.size = parseFileSize(data['filesize']) diff --git a/module/plugins/hoster/PornhubCom.py b/module/plugins/hoster/PornhubCom.py index 9e0b16a85..16ce36ea9 100644 --- a/module/plugins/hoster/PornhubCom.py +++ b/module/plugins/hoster/PornhubCom.py @@ -83,7 +83,7 @@ class PornhubCom(Hoster): if not self.html: self.download_html() - if re.search(r'This video is no longer in our database or is in conversion', self.html) is not None: + if re.search(r'This video is no longer in our database or is in conversion', self.html): return False else: return True diff --git a/module/plugins/hoster/RealdebridCom.py b/module/plugins/hoster/RealdebridCom.py index 1a8715e0e..f35eb5e03 100644 --- a/module/plugins/hoster/RealdebridCom.py +++ b/module/plugins/hoster/RealdebridCom.py @@ -44,7 +44,7 @@ class RealdebridCom(MultiHoster): self.logWarning(data['message']) self.tempOffline() else: - if pyfile.name is not None and pyfile.name.endswith('.tmp') and data['file_name']: + if pyfile.name and pyfile.name.endswith('.tmp') and data['file_name']: pyfile.name = data['file_name'] pyfile.size = parseFileSize(data['file_size']) self.link = data['generated_links'][0][-1] diff --git a/module/plugins/hoster/RedtubeCom.py b/module/plugins/hoster/RedtubeCom.py index d68fbe262..9051c498a 100644 --- a/module/plugins/hoster/RedtubeCom.py +++ b/module/plugins/hoster/RedtubeCom.py @@ -56,7 +56,7 @@ class RedtubeCom(Hoster): if not self.html: self.download_html() - if re.search(r'This video has been removed.', self.html) is not None: + if re.search(r'This video has been removed.', self.html): return False else: return True diff --git a/module/plugins/hoster/ShareplaceCom.py b/module/plugins/hoster/ShareplaceCom.py index 07724a9d1..c540dd2df 100644 --- a/module/plugins/hoster/ShareplaceCom.py +++ b/module/plugins/hoster/ShareplaceCom.py @@ -83,7 +83,7 @@ class ShareplaceCom(Hoster): if not self.html: self.download_html() - if re.search(r"HTTP Status 404", self.html) is not None: + if re.search(r"HTTP Status 404", self.html): return False else: return True diff --git a/module/plugins/hoster/XHamsterCom.py b/module/plugins/hoster/XHamsterCom.py index fd494e099..9004dbac0 100644 --- a/module/plugins/hoster/XHamsterCom.py +++ b/module/plugins/hoster/XHamsterCom.py @@ -123,7 +123,7 @@ class XHamsterCom(Hoster): """ if not self.html: self.download_html() - if re.search(r"(.*Video not found.*)", self.html) is not None: + if re.search(r"(.*Video not found.*)", self.html): return False else: return True diff --git a/module/plugins/hoster/YoupornCom.py b/module/plugins/hoster/YoupornCom.py index 4bb2520e6..19d07fa36 100644 --- a/module/plugins/hoster/YoupornCom.py +++ b/module/plugins/hoster/YoupornCom.py @@ -54,7 +54,7 @@ class YoupornCom(Hoster): """ if not self.html: self.download_html() - if re.search(r"(.*invalid video_id.*)", self.html) is not None: + if re.search(r"(.*invalid video_id.*)", self.html): return False else: return True diff --git a/module/plugins/hoster/YourfilesTo.py b/module/plugins/hoster/YourfilesTo.py index e0def108e..fd65a6a41 100644 --- a/module/plugins/hoster/YourfilesTo.py +++ b/module/plugins/hoster/YourfilesTo.py @@ -81,7 +81,7 @@ class YourfilesTo(Hoster): if not self.html: self.download_html() - if re.search(r"HTTP Status 404", self.html) is not None: + if re.search(r"HTTP Status 404", self.html): return False else: return True -- cgit v1.2.3 From e5ab79dc23dd5a50a4b4a3d5a51427eed55dcad5 Mon Sep 17 00:00:00 2001 From: Walter Purcaro <vuolter@users.noreply.github.com> Date: Wed, 8 Apr 2015 23:19:29 +0200 Subject: [ZippyshareCom] Fix https://github.com/pyload/pyload/issues/1311 --- module/plugins/hoster/ZippyshareCom.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/ZippyshareCom.py b/module/plugins/hoster/ZippyshareCom.py index 3f392133a..7af2c3370 100644 --- a/module/plugins/hoster/ZippyshareCom.py +++ b/module/plugins/hoster/ZippyshareCom.py @@ -11,7 +11,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class ZippyshareCom(SimpleHoster): __name__ = "ZippyshareCom" __type__ = "hoster" - __version__ = "0.77" + __version__ = "0.78" __pattern__ = r'http://www\d{0,2}\.zippyshare\.com/v(/|iew\.jsp.*key=)(?P<KEY>[\w^_]+)' __config__ = [("use_premium", "bool", "Use premium account if available", True)] @@ -24,7 +24,7 @@ class ZippyshareCom(SimpleHoster): COOKIES = [("zippyshare.com", "ziplocale", "en")] - NAME_PATTERN = r'("/|<title>Zippyshare.com - )(?P<N>[^/]+?)("\);|)' + NAME_PATTERN = r'(Zippyshare.com - |"/)(?P<N>[^/]+)(|";)' SIZE_PATTERN = r'>Size:.+?">(?P[\d.,]+) (?P[\w^_]+)' OFFLINE_PATTERN = r'does not exist (anymore )?on this server<' -- cgit v1.2.3 From 73f99ea811d01a2e113a882fe5ab86b0aa9c4f4c Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Thu, 9 Apr 2015 00:22:51 +0200 Subject: [SimpleHoster] Improve file name handling --- module/plugins/hoster/ZippyshareCom.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/ZippyshareCom.py b/module/plugins/hoster/ZippyshareCom.py index cdb37a18c..fbac432cd 100644 --- a/module/plugins/hoster/ZippyshareCom.py +++ b/module/plugins/hoster/ZippyshareCom.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- import re -from urllib import unquote +import urllib from BeautifulSoup import BeautifulSoup @@ -53,8 +53,8 @@ class ZippyshareCom(SimpleHoster): else: self.link = self.get_link() - if pyfile.name == 'file.html' and self.link: - pyfile.name = unquote(self.link.split('/')[-1]) + if self.link and pyfile.name == 'file.html': + pyfile.name = urllib.unquote(self.link.split('/')[-1]) def get_link(self): -- cgit v1.2.3 From 686d51fb3a43cb49ee4c3f44ea48b052d36616e0 Mon Sep 17 00:00:00 2001 From: valdi74 Date: Fri, 10 Apr 2015 00:06:18 +0200 Subject: Update - new links pattern --- module/plugins/hoster/FileSharkPl.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/FileSharkPl.py b/module/plugins/hoster/FileSharkPl.py index 63475958a..9f6070806 100644 --- a/module/plugins/hoster/FileSharkPl.py +++ b/module/plugins/hoster/FileSharkPl.py @@ -10,7 +10,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class FileSharkPl(SimpleHoster): __name__ = "FileSharkPl" __type__ = "hoster" - __version__ = "0.09" + __version__ = "0.10" __pattern__ = r'http://(?:www\.)?fileshark\.pl/pobierz/\d+/\w+' __config__ = [("use_premium", "bool", "Use premium account if available", True)] @@ -25,8 +25,8 @@ class FileSharkPl(SimpleHoster): SIZE_PATTERN = r'

    (.*?)(?P\d+\.?\d*)\s(?P\w+)

    ' OFFLINE_PATTERN = r'(P|p)lik zosta. (usuni.ty|przeniesiony)' - LINK_FREE_PATTERN = r'' - LINK_PREMIUM_PATTERN = r'' + LINK_FREE_PATTERN = r'' + LINK_PREMIUM_PATTERN = r'' WAIT_PATTERN = r'var timeToDownload = (\d+);' ERROR_PATTERN = r'

    (.*?)

    ' -- cgit v1.2.3 From d3f6b9936d45c5eb0308c0d2542dea6e3c001507 Mon Sep 17 00:00:00 2001 From: GammaC0de Date: Fri, 10 Apr 2015 03:02:37 +0300 Subject: Update DepositfilesCom.py --- module/plugins/hoster/DepositfilesCom.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/DepositfilesCom.py b/module/plugins/hoster/DepositfilesCom.py index 95fd7c1b1..48b325b48 100644 --- a/module/plugins/hoster/DepositfilesCom.py +++ b/module/plugins/hoster/DepositfilesCom.py @@ -52,7 +52,9 @@ class DepositfilesCom(SimpleHoster): params = {'fid': m.group(1)} self.logDebug("FID: %s" % params['fid']) + self.setWait(60) self.wait() + recaptcha = ReCaptcha(self) captcha_key = recaptcha.detect_key() if captcha_key is None: -- cgit v1.2.3 From b92e851691faa9f1f8af5226c77a80c21f55b30e Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 10 Apr 2015 03:32:41 +0200 Subject: [DepositfilesCom] Update --- module/plugins/hoster/DepositfilesCom.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/DepositfilesCom.py b/module/plugins/hoster/DepositfilesCom.py index 48b325b48..cc24e351e 100644 --- a/module/plugins/hoster/DepositfilesCom.py +++ b/module/plugins/hoster/DepositfilesCom.py @@ -11,7 +11,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class DepositfilesCom(SimpleHoster): __name__ = "DepositfilesCom" __type__ = "hoster" - __version__ = "0.54" + __version__ = "0.55" __pattern__ = r'https?://(?:www\.)?(depositfiles\.com|dfiles\.(eu|ru))(/\w{1,3})?/files/(?P\w+)' __config__ = [("use_premium", "bool", "Use premium account if available", True)] @@ -28,7 +28,7 @@ class DepositfilesCom(SimpleHoster): OFFLINE_PATTERN = r'' NAME_REPLACEMENTS = [(r'\%u([0-9A-Fa-f]{4})', lambda m: unichr(int(m.group(1), 16))), - (r'.*")] + (r'.*")] URL_REPLACEMENTS = [(__pattern__ + ".*", "https://dfiles.eu/files/\g")] COOKIES = [("dfiles.eu", "lang_current", "en")] @@ -52,8 +52,7 @@ class DepositfilesCom(SimpleHoster): params = {'fid': m.group(1)} self.logDebug("FID: %s" % params['fid']) - self.setWait(60) - self.wait() + self.checkErrors() recaptcha = ReCaptcha(self) captcha_key = recaptcha.detect_key() @@ -68,9 +67,6 @@ class DepositfilesCom(SimpleHoster): m = re.search(self.LINK_FREE_PATTERN, self.html) if m: - if 'response' in params: - self.correctCaptcha() - self.link = unquote(m.group(1)) -- cgit v1.2.3 From 1e6846b3c435b0d71be83670d09bd019a84823ec Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 10 Apr 2015 14:36:59 +0200 Subject: Spare code cosmetics --- module/plugins/hoster/BezvadataCz.py | 2 +- module/plugins/hoster/BitshareCom.py | 2 +- module/plugins/hoster/DataportCz.py | 2 +- module/plugins/hoster/DateiTo.py | 2 +- module/plugins/hoster/DropboxCom.py | 4 ++-- module/plugins/hoster/EdiskCz.py | 2 +- module/plugins/hoster/EuroshareEu.py | 2 +- module/plugins/hoster/ExtabitCom.py | 3 +-- module/plugins/hoster/FilecloudIo.py | 3 +-- module/plugins/hoster/FilepostCom.py | 11 +---------- module/plugins/hoster/FlyFilesNet.py | 4 +--- module/plugins/hoster/GigapetaCom.py | 3 +-- module/plugins/hoster/GooIm.py | 2 +- module/plugins/hoster/LetitbitNet.py | 11 +---------- module/plugins/hoster/LoadTo.py | 8 +++----- module/plugins/hoster/LuckyShareNet.py | 2 +- module/plugins/hoster/MegasharesCom.py | 5 ++--- module/plugins/hoster/NarodRu.py | 4 +--- module/plugins/hoster/NowDownloadSx.py | 6 +++--- module/plugins/hoster/NowVideoSx.py | 2 +- module/plugins/hoster/QuickshareCz.py | 10 ++++------ module/plugins/hoster/SendspaceCom.py | 4 +--- module/plugins/hoster/ShareonlineBiz.py | 13 +++++-------- module/plugins/hoster/UloziskoSk.py | 3 +-- module/plugins/hoster/UnibytesCom.py | 6 ++---- module/plugins/hoster/UploadingCom.py | 5 ++--- module/plugins/hoster/VeohCom.py | 3 +-- module/plugins/hoster/VimeoCom.py | 4 ++-- module/plugins/hoster/WrzucTo.py | 3 +-- module/plugins/hoster/YibaishiwuCom.py | 5 ++--- 30 files changed, 47 insertions(+), 89 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/BezvadataCz.py b/module/plugins/hoster/BezvadataCz.py index 37dd38e02..fbb17635c 100644 --- a/module/plugins/hoster/BezvadataCz.py +++ b/module/plugins/hoster/BezvadataCz.py @@ -76,7 +76,7 @@ class BezvadataCz(SimpleHoster): wait_time = (int(m.group(1)) * 60 + int(m.group(2))) if m else 120 self.wait(wait_time, False) - self.download(url) + self.link = url def checkErrors(self): diff --git a/module/plugins/hoster/BitshareCom.py b/module/plugins/hoster/BitshareCom.py index 43f29c41f..79aaedcd9 100644 --- a/module/plugins/hoster/BitshareCom.py +++ b/module/plugins/hoster/BitshareCom.py @@ -72,7 +72,7 @@ class BitshareCom(SimpleHoster): self.logDebug("File ajax id is [%s]" % self.ajaxid) # This may either download our file or forward us to an error page - self.download(self.getDownloadUrl()) + self.link = self.getDownloadUrl() if self.checkDownload({"error": ">Error occured<"}): self.retry(5, 5 * 60, "Bitshare host : Error occured") diff --git a/module/plugins/hoster/DataportCz.py b/module/plugins/hoster/DataportCz.py index 89882d7f1..ad514f5eb 100644 --- a/module/plugins/hoster/DataportCz.py +++ b/module/plugins/hoster/DataportCz.py @@ -38,7 +38,7 @@ class DataportCz(SimpleHoster): else: self.error(_("captcha")) - self.html = self.download("http://www.dataport.cz%s" % action, post=inputs) + self.download("http://www.dataport.cz%s" % action, post=inputs) check = self.checkDownload({"captcha": 'alert("\u0160patn\u011b opsan\u00fd k\u00f3d z obr\u00e1zu");', "slot" : 'alert("Je n\u00e1m l\u00edto, ale moment\u00e1ln\u011b nejsou'}) diff --git a/module/plugins/hoster/DateiTo.py b/module/plugins/hoster/DateiTo.py index e93ebcf04..71a9eb4bf 100644 --- a/module/plugins/hoster/DateiTo.py +++ b/module/plugins/hoster/DateiTo.py @@ -57,7 +57,7 @@ class DateiTo(SimpleHoster): else: self.fail(_("Too bad...")) - self.download(self.html) + self.link = self.html def checkErrors(self): diff --git a/module/plugins/hoster/DropboxCom.py b/module/plugins/hoster/DropboxCom.py index c948039ac..eec968f5a 100644 --- a/module/plugins/hoster/DropboxCom.py +++ b/module/plugins/hoster/DropboxCom.py @@ -27,8 +27,8 @@ class DropboxCom(SimpleHoster): def setup(self): - self.multiDL = True - self.chunkLimit = 1 + self.multiDL = True + self.chunkLimit = 1 self.resumeDownload = True diff --git a/module/plugins/hoster/EdiskCz.py b/module/plugins/hoster/EdiskCz.py index cfa6da4eb..b8485001e 100644 --- a/module/plugins/hoster/EdiskCz.py +++ b/module/plugins/hoster/EdiskCz.py @@ -51,7 +51,7 @@ class EdiskCz(SimpleHoster): if not re.match(self.LINK_FREE_PATTERN, url): self.fail(_("Unexpected server response")) - self.download(url) + self.link = url getInfo = create_getInfo(EdiskCz) diff --git a/module/plugins/hoster/EuroshareEu.py b/module/plugins/hoster/EuroshareEu.py index 922665c2e..842e0cb87 100644 --- a/module/plugins/hoster/EuroshareEu.py +++ b/module/plugins/hoster/EuroshareEu.py @@ -34,7 +34,7 @@ class EuroshareEu(SimpleHoster): self.account.relogin(self.user) self.retry(reason=_("User not logged in")) - self.download(pyfile.url.rstrip('/') + "/download/") + self.link = pyfile.url.rstrip('/') + "/download/" check = self.checkDownload({"login": re.compile(self.ERR_NOT_LOGGED_IN_PATTERN), "json" : re.compile(r'\{"status":"error".*?"message":"(.*?)"')}) diff --git a/module/plugins/hoster/ExtabitCom.py b/module/plugins/hoster/ExtabitCom.py index a485f0c4d..f3b4d28be 100644 --- a/module/plugins/hoster/ExtabitCom.py +++ b/module/plugins/hoster/ExtabitCom.py @@ -72,8 +72,7 @@ class ExtabitCom(SimpleHoster): if m is None: self.error(_("LINK_FREE_PATTERN not found")) - url = m.group(1) - self.download(url) + self.link = m.group(1) getInfo = create_getInfo(ExtabitCom) diff --git a/module/plugins/hoster/FilecloudIo.py b/module/plugins/hoster/FilecloudIo.py index f4c8fedd6..38d2972a1 100644 --- a/module/plugins/hoster/FilecloudIo.py +++ b/module/plugins/hoster/FilecloudIo.py @@ -104,8 +104,7 @@ class FilecloudIo(SimpleHoster): if "size" in self.info and self.info['size']: self.check_data = {"size": int(self.info['size'])} - download_url = m.group(1) - self.download(download_url) + self.link = m.group(1) else: self.fail(_("Unexpected server response")) diff --git a/module/plugins/hoster/FilepostCom.py b/module/plugins/hoster/FilepostCom.py index 78960dc6d..2a9e3dc26 100644 --- a/module/plugins/hoster/FilepostCom.py +++ b/module/plugins/hoster/FilepostCom.py @@ -79,20 +79,11 @@ class FilepostCom(SimpleHoster): self.logDebug(u"RECAPTCHA: %s : %s : %s" % ( captcha_key, post_dict['recaptcha_challenge_field'], post_dict['recaptcha_response_field'])) - download_url = self.getJsonResponse(get_dict, post_dict, 'link') - if download_url: - if i: - self.correctCaptcha() - break - elif i: - self.invalidCaptcha() + self.link = self.getJsonResponse(get_dict, post_dict, 'link') else: self.fail(_("Invalid captcha")) - # Download - self.download(download_url) - def getJsonResponse(self, get_dict, post_dict, field): res = json_loads(self.load('https://filepost.com/files/get/', get=get_dict, post=post_dict)) diff --git a/module/plugins/hoster/FlyFilesNet.py b/module/plugins/hoster/FlyFilesNet.py index bcfaaab69..4420d5d60 100644 --- a/module/plugins/hoster/FlyFilesNet.py +++ b/module/plugins/hoster/FlyFilesNet.py @@ -41,6 +41,4 @@ class FlyFilesNet(SimpleHoster): self.wait(10 * 60, True) self.retry() - download_url = parsed_url.replace('#downlink|', '') - - self.download(download_url) + self.link = parsed_url.replace('#downlink|', '') diff --git a/module/plugins/hoster/GigapetaCom.py b/module/plugins/hoster/GigapetaCom.py index bb53a12ee..2fe44ca85 100644 --- a/module/plugins/hoster/GigapetaCom.py +++ b/module/plugins/hoster/GigapetaCom.py @@ -45,7 +45,7 @@ class GigapetaCom(SimpleHoster): m = re.search(r'Location\s*:\s*(.+)', self.req.http.header, re.I) if m: - download_url = m.group(1).rstrip() #@TODO: Remove .rstrip() in 0.4.10 + self.link = m.group(1).rstrip() #@TODO: Remove .rstrip() in 0.4.10 break elif "Entered figures don`t coincide with the picture" in self.html: self.invalidCaptcha() @@ -53,7 +53,6 @@ class GigapetaCom(SimpleHoster): self.fail(_("No valid captcha code entered")) self.req.http.c.setopt(FOLLOWLOCATION, 1) - self.download(download_url) def checkErrors(self): diff --git a/module/plugins/hoster/GooIm.py b/module/plugins/hoster/GooIm.py index c6d8ce83d..4b27e6cc8 100644 --- a/module/plugins/hoster/GooIm.py +++ b/module/plugins/hoster/GooIm.py @@ -32,7 +32,7 @@ class GooIm(SimpleHoster): def handleFree(self, pyfile): self.wait(10) - self.download(pyfile.url) + self.link = pyfile.url getInfo = create_getInfo(GooIm) diff --git a/module/plugins/hoster/LetitbitNet.py b/module/plugins/hoster/LetitbitNet.py index 27f2cadb8..79dbd8133 100644 --- a/module/plugins/hoster/LetitbitNet.py +++ b/module/plugins/hoster/LetitbitNet.py @@ -119,16 +119,7 @@ class LetitbitNet(SimpleHoster): else: self.error(_("Unknown response - captcha check")) - self.correctCaptcha() - - for download_url in urls: - try: - self.download(download_url) - break - except Exception, e: - self.logError(e) - else: - self.fail(_("Download did not finish correctly")) + self.link = urls[0] def handlePremium(self, pyfile): diff --git a/module/plugins/hoster/LoadTo.py b/module/plugins/hoster/LoadTo.py index 8f4f8808c..2b4202051 100644 --- a/module/plugins/hoster/LoadTo.py +++ b/module/plugins/hoster/LoadTo.py @@ -45,7 +45,7 @@ class LoadTo(SimpleHoster): if m is None: self.error(_("LINK_FREE_PATTERN not found")) - download_url = m.group(1) + self.link = m.group(1) # Set Timer - may be obsolete m = re.search(self.WAIT_PATTERN, self.html) @@ -56,11 +56,9 @@ class LoadTo(SimpleHoster): solvemedia = SolveMedia(self) captcha_key = solvemedia.detect_key() - if captcha_key is None: - self.download(download_url) - else: + if captcha_key: response, challenge = solvemedia.challenge(captcha_key) - self.download(download_url, + self.download(self.link, post={'adcopy_challenge': challenge, 'adcopy_response' : response, 'returnUrl' : pyfile.url}) diff --git a/module/plugins/hoster/LuckyShareNet.py b/module/plugins/hoster/LuckyShareNet.py index 980072744..26af8153f 100644 --- a/module/plugins/hoster/LuckyShareNet.py +++ b/module/plugins/hoster/LuckyShareNet.py @@ -69,7 +69,7 @@ class LuckyShareNet(SimpleHoster): if not json['link']: self.fail(_("No Download url retrieved/all captcha attempts failed")) - self.download(json['link']) + self.link = json['link'] getInfo = create_getInfo(LuckyShareNet) diff --git a/module/plugins/hoster/MegasharesCom.py b/module/plugins/hoster/MegasharesCom.py index c6ccdb587..ed2363fe3 100644 --- a/module/plugins/hoster/MegasharesCom.py +++ b/module/plugins/hoster/MegasharesCom.py @@ -105,9 +105,8 @@ class MegasharesCom(SimpleHoster): if m is None: self.error(msg) - download_url = m.group(1) - self.logDebug("%s: %s" % (msg, download_url)) - self.download(download_url) + self.link = m.group(1) + self.logDebug("%s: %s" % (msg, self.link)) getInfo = create_getInfo(MegasharesCom) diff --git a/module/plugins/hoster/NarodRu.py b/module/plugins/hoster/NarodRu.py index 7de041f36..65ad90d17 100644 --- a/module/plugins/hoster/NarodRu.py +++ b/module/plugins/hoster/NarodRu.py @@ -48,7 +48,7 @@ class NarodRu(SimpleHoster): m = re.search(self.LINK_FREE_PATTERN, self.html) if m: - url = 'http://narod.ru' + m.group(1) + self.link = 'http://narod.ru' + m.group(1) self.correctCaptcha() break @@ -61,7 +61,5 @@ class NarodRu(SimpleHoster): else: self.fail(_("No valid captcha code entered")) - self.download(url) - getInfo = create_getInfo(NarodRu) diff --git a/module/plugins/hoster/NowDownloadSx.py b/module/plugins/hoster/NowDownloadSx.py index 5ef36d270..a1cf9baf7 100644 --- a/module/plugins/hoster/NowDownloadSx.py +++ b/module/plugins/hoster/NowDownloadSx.py @@ -55,11 +55,11 @@ class NowDownloadSx(SimpleHoster): self.html = self.load(baseurl + str(continuelink.group(1))) - url = re.search(self.LINK_FREE_PATTERN, self.html) - if url is None: + m = re.search(self.LINK_FREE_PATTERN, self.html) + if m is None: self.error(_("Download link not found")) - self.download(str(url.group(1))) + self.link = m.group(1) getInfo = create_getInfo(NowDownloadSx) diff --git a/module/plugins/hoster/NowVideoSx.py b/module/plugins/hoster/NowVideoSx.py index 04274ed82..477379597 100644 --- a/module/plugins/hoster/NowVideoSx.py +++ b/module/plugins/hoster/NowVideoSx.py @@ -39,7 +39,7 @@ class NowVideoSx(SimpleHoster): if m is None: self.error(_("Free download link not found")) - self.download(m.group(1)) + self.link = m.group(1) getInfo = create_getInfo(NowVideoSx) diff --git a/module/plugins/hoster/QuickshareCz.py b/module/plugins/hoster/QuickshareCz.py index 250a33d0d..893c3b6c7 100644 --- a/module/plugins/hoster/QuickshareCz.py +++ b/module/plugins/hoster/QuickshareCz.py @@ -68,11 +68,12 @@ class QuickshareCz(SimpleHoster): m = re.search(r'Location\s*:\s*(.+)', self.header, re.I) if m is None: self.fail(_("File not found")) - download_url = m.group(1).rstrip() #@TODO: Remove .rstrip() in 0.4.10 - self.logDebug("FREE URL2:" + download_url) + + self.link = m.group(1).rstrip() #@TODO: Remove .rstrip() in 0.4.10 + self.logDebug("FREE URL2:" + self.link) # check errors - m = re.search(r'/chyba/(\d+)', download_url) + m = re.search(r'/chyba/(\d+)', self.link) if m: if m.group(1) == '1': self.retry(60, 2 * 60, "This IP is already downloading") @@ -81,9 +82,6 @@ class QuickshareCz(SimpleHoster): else: self.fail(_("Error %d") % m.group(1)) - # download file - self.download(download_url) - def handlePremium(self, pyfile): download_url = '%s/download_premium.php' % self.jsvars['server'] diff --git a/module/plugins/hoster/SendspaceCom.py b/module/plugins/hoster/SendspaceCom.py index 148217fe6..0ab20949d 100644 --- a/module/plugins/hoster/SendspaceCom.py +++ b/module/plugins/hoster/SendspaceCom.py @@ -35,7 +35,7 @@ class SendspaceCom(SimpleHoster): if m: if 'captcha_hash' in params: self.correctCaptcha() - download_url = m.group(1) + self.link = m.group(1) break m = re.search(self.CAPTCHA_PATTERN, self.html) @@ -56,7 +56,5 @@ class SendspaceCom(SimpleHoster): else: self.fail(_("Download link not found")) - self.download(download_url) - getInfo = create_getInfo(SendspaceCom) diff --git a/module/plugins/hoster/ShareonlineBiz.py b/module/plugins/hoster/ShareonlineBiz.py index 102e91276..fea5781fe 100644 --- a/module/plugins/hoster/ShareonlineBiz.py +++ b/module/plugins/hoster/ShareonlineBiz.py @@ -98,16 +98,14 @@ class ShareonlineBiz(SimpleHoster): self.checkErrors() - res = self.handleCaptcha() - download_url = res.decode('base64') + res = self.handleCaptcha() + self.link = res.decode('base64') - if not download_url.startswith("http://"): + if not self.link.startswith("http://"): self.error(_("Wrong download url")) self.wait() - self.download(download_url) - def checkFile(self, rules={}): check = self.checkDownload({'cookie': re.compile(r'
    Somebody else is already downloading using your IP-address<' in self.html: @@ -52,7 +52,7 @@ class UnibytesCom(SimpleHoster): if post_data['step'] == 'last': m = re.search(self.LINK_FREE_PATTERN, self.html) if m: - url = m.group(1) + self.link = m.group(1) self.correctCaptcha() break else: @@ -73,7 +73,5 @@ class UnibytesCom(SimpleHoster): self.req.http.c.setopt(FOLLOWLOCATION, 1) - self.download(url) - getInfo = create_getInfo(UnibytesCom) diff --git a/module/plugins/hoster/UploadingCom.py b/module/plugins/hoster/UploadingCom.py index 164b7b243..d0e0b1fd7 100644 --- a/module/plugins/hoster/UploadingCom.py +++ b/module/plugins/hoster/UploadingCom.py @@ -53,8 +53,7 @@ class UploadingCom(SimpleHoster): self.html = self.load('http://uploading.com/files/get/?JsHttpRequest=%d-xml' % timestamp(), post=postData) url = re.search(r'"link"\s*:\s*"(.*?)"', self.html) if url: - url = url.group(1).replace("\\/", "/") - self.download(url) + self.link = url.group(1).replace("\\/", "/") raise Exception("Plugin defect") @@ -93,7 +92,7 @@ class UploadingCom(SimpleHoster): else: self.error(_("No URL")) - self.download(url) + self.link = url getInfo = create_getInfo(UploadingCom) diff --git a/module/plugins/hoster/VeohCom.py b/module/plugins/hoster/VeohCom.py index 2f79f5aa4..57b24623b 100644 --- a/module/plugins/hoster/VeohCom.py +++ b/module/plugins/hoster/VeohCom.py @@ -43,8 +43,7 @@ class VeohCom(SimpleHoster): m = re.search(pattern, self.html) if m: pyfile.name += ".mp4" - link = m.group(1).replace("\\", "") - self.download(link) + self.link = m.group(1).replace("\\", "") return else: self.logInfo(_("No %s quality video found") % q.upper()) diff --git a/module/plugins/hoster/VimeoCom.py b/module/plugins/hoster/VimeoCom.py index 02aef98ec..a5196cb92 100644 --- a/module/plugins/hoster/VimeoCom.py +++ b/module/plugins/hoster/VimeoCom.py @@ -49,7 +49,7 @@ class VimeoCom(SimpleHoster): if self.getConfig('original'): if "original" in link: - self.download(link[q]) + self.link = link[q] return else: self.logInfo(_("Original file not downloadable")) @@ -64,7 +64,7 @@ class VimeoCom(SimpleHoster): for q in qlevel: if q in link: - self.download(link[q]) + self.link = link[q] return else: self.logInfo(_("No %s quality video found") % q.upper()) diff --git a/module/plugins/hoster/WrzucTo.py b/module/plugins/hoster/WrzucTo.py index 0d78058d7..50a45babe 100644 --- a/module/plugins/hoster/WrzucTo.py +++ b/module/plugins/hoster/WrzucTo.py @@ -46,8 +46,7 @@ class WrzucTo(SimpleHoster): if len(data) != 4: self.error(_("No download URL")) - download_url = "http://%s.wrzuc.to/pobierz/%s" % (data['server_id'], data['download_link']) - self.download(download_url) + self.link = "http://%s.wrzuc.to/pobierz/%s" % (data['server_id'], data['download_link']) getInfo = create_getInfo(WrzucTo) diff --git a/module/plugins/hoster/YibaishiwuCom.py b/module/plugins/hoster/YibaishiwuCom.py index 44f2b7b83..7ca6e1ac0 100644 --- a/module/plugins/hoster/YibaishiwuCom.py +++ b/module/plugins/hoster/YibaishiwuCom.py @@ -47,9 +47,8 @@ class YibaishiwuCom(SimpleHoster): for mr in mirrors: try: - url = mr['url'].replace("\\", "") - self.logDebug("Trying URL: " + url) - self.download(url) + self.link = mr['url'].replace("\\", "") + self.logDebug("Trying URL: " + self.link) break except Exception: continue -- cgit v1.2.3 From 20d433b55b40203a8f302a8ecd3c58b47c2869e3 Mon Sep 17 00:00:00 2001 From: zapp-brannigan Date: Sat, 11 Apr 2015 11:23:36 +0200 Subject: [New Hoster] lolabits.es As requested in https://github.com/pyload/pyload/issues/1343 --- module/plugins/hoster/LolabitsEs.py | 46 +++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 module/plugins/hoster/LolabitsEs.py (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/LolabitsEs.py b/module/plugins/hoster/LolabitsEs.py new file mode 100644 index 000000000..fe25aa838 --- /dev/null +++ b/module/plugins/hoster/LolabitsEs.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -* + +import re +import HTMLParser + +from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo + + +class LolabitsEs(SimpleHoster): + __name__ = "LolabitsEs" + __type__ = "hoster" + __version__ = "0.01" + + __pattern__ = r'https?://(?:www\.)?lolabits.es/.*' + + __description__ = """lolabits.es hoster plugin""" + __license__ = "GPLv3" + __authors__ = [("zapp-brannigan", "fuerst.reinje@web.de")] + + + NAME_PATTERN = r'Descargar: (?P.+?)' + SIZE_PATTERN = r'class="fileSize">(?P[\d.,]+) (?P[\w^_]+)<' + + OFFLINE_PATTERN = r'Un usuario con este nombre no existe' + + + def setup(self): + self.chunkLimit = 1 + + def handleFree(self, pyfile): + fileid = re.search(r'name="FileId" value="(\d+)"',self.html).group(1) + self.logDebug("FileID: %s" %fileid) + + token = re.search(r'name="__RequestVerificationToken" type="hidden" value="(.+?)"',self.html).group(1) + self.logDebug("Token: %s" %token) + + self.html = self.load("http://lolabits.es/action/License/Download", + cookies = True, + post = {"fileId" : fileid, + "__RequestVerificationToken" : token} + ).decode('unicode-escape') + m = re.search(r'"redirectUrl":"(.+?)"',self.html) + self.link = HTMLParser.HTMLParser().unescape(m.group(1)) + + +getInfo = create_getInfo(LolabitsEs) -- cgit v1.2.3 From c7bbcf09791a3754c393e6f1e57dd768306aa63a Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 12 Apr 2015 19:18:24 +0200 Subject: [LolabitsEs] Cleanup --- module/plugins/hoster/LolabitsEs.py | 44 +++++++++++++++++++------------------ 1 file changed, 23 insertions(+), 21 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/LolabitsEs.py b/module/plugins/hoster/LolabitsEs.py index fe25aa838..61df5f0bb 100644 --- a/module/plugins/hoster/LolabitsEs.py +++ b/module/plugins/hoster/LolabitsEs.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -* -import re import HTMLParser +import re from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo @@ -9,38 +9,40 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class LolabitsEs(SimpleHoster): __name__ = "LolabitsEs" __type__ = "hoster" - __version__ = "0.01" + __version__ = "0.02" - __pattern__ = r'https?://(?:www\.)?lolabits.es/.*' + __pattern__ = r'https?://(?:www\.)?lolabits\.es/.+' - __description__ = """lolabits.es hoster plugin""" + __description__ = """Lolabits.es hoster plugin""" __license__ = "GPLv3" __authors__ = [("zapp-brannigan", "fuerst.reinje@web.de")] - NAME_PATTERN = r'Descargar: (?P.+?)' - SIZE_PATTERN = r'class="fileSize">(?P[\d.,]+) (?P[\w^_]+)<' - + NAME_PATTERN = r'Descargar: (?P.+?)<' + SIZE_PATTERN = r'class="fileSize">(?P[\d.,]+) (?P[\w^_]+)' OFFLINE_PATTERN = r'Un usuario con este nombre no existe' + FILEID_PATTERN = r'name="FileId" value="(\d+)"' + TOKEN_PATTERN = r'name="__RequestVerificationToken" type="hidden" value="(.+?)"' + LINK_PATTERN = r'"redirectUrl":"(.+?)"' + def setup(self): self.chunkLimit = 1 + def handleFree(self, pyfile): - fileid = re.search(r'name="FileId" value="(\d+)"',self.html).group(1) - self.logDebug("FileID: %s" %fileid) - - token = re.search(r'name="__RequestVerificationToken" type="hidden" value="(.+?)"',self.html).group(1) - self.logDebug("Token: %s" %token) - + fileid = re.search(self.FILEID_PATTERN, self.html).group(1) + self.logDebug("FileID: " + fileid) + + token = re.search(self.TOKEN_PATTERN, self.html).group(1) + self.logDebug("Token: " + token) + self.html = self.load("http://lolabits.es/action/License/Download", - cookies = True, - post = {"fileId" : fileid, - "__RequestVerificationToken" : token} - ).decode('unicode-escape') - m = re.search(r'"redirectUrl":"(.+?)"',self.html) - self.link = HTMLParser.HTMLParser().unescape(m.group(1)) - - + post={'fileId' : fileid, + '__RequestVerificationToken' : token}).decode('unicode-escape') + + self.link = HTMLParser.HTMLParser().unescape(re.search(self.LINK_PATTERN, self.html).group(1)) + + getInfo = create_getInfo(LolabitsEs) -- cgit v1.2.3 From 5c6f3886563654eb568b78356c187ccf43814787 Mon Sep 17 00:00:00 2001 From: GammaC0de Date: Tue, 14 Apr 2015 03:34:56 +0300 Subject: Update YadiSk.py --- module/plugins/hoster/YadiSk.py | 81 +++++++++++++++++++++-------------------- 1 file changed, 42 insertions(+), 39 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/YadiSk.py b/module/plugins/hoster/YadiSk.py index c3749d30d..ad63ffb32 100644 --- a/module/plugins/hoster/YadiSk.py +++ b/module/plugins/hoster/YadiSk.py @@ -10,7 +10,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class YadiSk(SimpleHoster): __name__ = "YadiSk" __type__ = "hoster" - __version__ = "0.03" + __version__ = "0.04" __pattern__ = r'https?://yadi\.sk/d/\w+' @@ -22,6 +22,42 @@ class YadiSk(SimpleHoster): OFFLINE_PATTERN = r'Nothing found' + @classmethod + def getInfo(cls, url="", html=""): + info = super(YadiSk, cls).getInfo(url, html) + + if html: + if 'idclient' not in info: + info['idclient'] = "" + for _i in xrange(32): + info ['idclient'] += random.choice('0123456abcdef') + + m = re.search(r'', html) + if m: + api_data = json_loads(m.group(1)) + try: + for sect in api_data: + if 'model' in sect: + if sect['model'] == "config": + info['version'] = sect['data']['version'] + info['sk'] = sect['data']['sk'] + + elif sect['model'] == "resource": + info['id'] = sect['data']['id'] + info['size'] = sect['data']['meta']['size'] + info['name'] = sect['data']['name'] + + except Exception, e: + info['status'] = 8 + info['error'] = _("Unexpected server response: %s") % e.message + + else: + info['status'] = 8 + info['error'] = _("could not find required json data") + + return info + + def setup(self): self.resumeDownload = False self.multiDL = False @@ -29,51 +65,18 @@ class YadiSk(SimpleHoster): def handleFree(self, pyfile): - m = re.search(r'', self.html) - if m is None: - self.error(_("could not find required json data")) - - res = json_loads(m.group(1)) - - yadisk_ver = None - yadisk_sk = None - yadisk_id = None - yadisk_size = None - yadisk_name = None - - try: #@TODO: Copy to apiInfo - for sect in res: - if 'model' in sect: - if sect['model'] == "config": - yadisk_ver = sect['data']['version'] - yadisk_sk = sect['data']['sk'] - - elif sect['model'] == "resource": - yadisk_id = sect['data']['id'] - yadisk_size = sect['data']['meta']['size'] - yadisk_name = sect['data']['name'] - - except Exception, e: - self.fail(_("Unexpected server response"), e) - - if None in (yadisk_id, yadisk_sk, yadisk_id, yadisk_size, yadisk_name): + if any(True for _k in ['id', 'sk', 'version', 'idclient'] if _k not in self.info): self.error(_("Missing JSON data")) - self.pyfile.size = yadisk_size - self.pyfile.name = yadisk_name - - yadisk_idclient = "" - for _i in range(32): - yadisk_idclient += random.choice('0123456abcdef') try: self.html = self.load("https://yadi.sk/models/", get={'_m': "do-get-resource-url"}, - post={'idClient': yadisk_idclient, - 'version' : yadisk_ver, + post={'idClient': self.info['idclient'], + 'version' : self.info['version'], '_model.0': "do-get-resource-url", - 'sk' : yadisk_sk, - 'id.0' : yadisk_id}) + 'sk' : self.info['sk'], + 'id.0' : self.info['id']}) self.link = json_loads(self.html)['models'][0]['data']['file'] -- cgit v1.2.3 From 6b271a669cd4b08cdbd8d55d9b3b4f6deec7c8ac Mon Sep 17 00:00:00 2001 From: GammaC0de Date: Thu, 16 Apr 2015 01:29:39 +0300 Subject: HostujeNet --- module/plugins/hoster/HostujeNet.py | 51 +++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 module/plugins/hoster/HostujeNet.py (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/HostujeNet.py b/module/plugins/hoster/HostujeNet.py new file mode 100644 index 000000000..2dabb72d2 --- /dev/null +++ b/module/plugins/hoster/HostujeNet.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +# + + +import re + +from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo + + +class HostujeNet(SimpleHoster): + __name__ = "HostujeNet" + __type__ = "hoster" + __version__ = "0.01" + + __pattern__ = r'http://(?:www\.)?hostuje\.net/\w+' + + __description__ = """Hostuje.net hoster plugin""" + __license__ = "GPLv3" + __authors__ = [("GammaC0de", None)] + + + NAME_PATTERN = r'' + SIZE_PATTERN = r'Rozmiar: (?P[\d.,]+) (?P[\w^_]+)
    ' + OFFLINE_PATTERN = ur'Podany plik nie został odnaleziony\.\.\.' + + + def setup(self): + self.multiDL = True + self.chunkLimit = 1 + + + def handleFree(self, pyfile): + m = re.search(r'', self.html) + if m: + jscript = self.load("http://hostuje.net/" + m.group(1)) + m = re.search(r"\('(\w+\.php\?i=\w+)'\);", jscript) + if m: + self.load("http://hostuje.net/" + m.group(1)) + else: + self.error(_("unexpected javascript format")) + else: + self.error(_("script not found")) + + action, inputs = self.parseHtmlForm(pyfile.url.replace(".", "\.").replace( "?", "\?")) + if not action: + self.error(_("form not found")) + + self.download(action, post=inputs) + + +getInfo = create_getInfo(HostujeNet) -- cgit v1.2.3 From 11d3e8c59b1addf80a0971ea0ef97347604e45ce Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Thu, 16 Apr 2015 00:46:38 +0200 Subject: [HostujeNet] Tiny cleanup --- module/plugins/hoster/HostujeNet.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/HostujeNet.py b/module/plugins/hoster/HostujeNet.py index 2dabb72d2..ec91e50b9 100644 --- a/module/plugins/hoster/HostujeNet.py +++ b/module/plugins/hoster/HostujeNet.py @@ -1,6 +1,4 @@ # -*- coding: utf-8 -*- -# - import re @@ -19,13 +17,13 @@ class HostujeNet(SimpleHoster): __authors__ = [("GammaC0de", None)] - NAME_PATTERN = r'' - SIZE_PATTERN = r'Rozmiar: (?P[\d.,]+) (?P[\w^_]+)
    ' + NAME_PATTERN = r'' + SIZE_PATTERN = r'Rozmiar: (?P[\d.,]+) (?P[\w^_]+)
    ' OFFLINE_PATTERN = ur'Podany plik nie został odnaleziony\.\.\.' def setup(self): - self.multiDL = True + self.multiDL = True self.chunkLimit = 1 -- cgit v1.2.3 From e76a0a2386915cec650ca1a8eeeadc46ebf42aff Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Thu, 16 Apr 2015 16:16:24 +0200 Subject: [UploadedTo] Set DISPOSITION to False (temp) --- module/plugins/hoster/UploadedTo.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/UploadedTo.py b/module/plugins/hoster/UploadedTo.py index cc64a28eb..67f82d1f7 100644 --- a/module/plugins/hoster/UploadedTo.py +++ b/module/plugins/hoster/UploadedTo.py @@ -11,7 +11,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class UploadedTo(SimpleHoster): __name__ = "UploadedTo" __type__ = "hoster" - __version__ = "0.85" + __version__ = "0.86" __pattern__ = r'https?://(?:www\.)?(uploaded\.(to|net)|ul\.to)(/file/|/?\?id=|.*?&id=|/)(?P\w+)' __config__ = [("use_premium", "bool", "Use premium account if available", True)] @@ -21,6 +21,8 @@ class UploadedTo(SimpleHoster): __authors__ = [("Walter Purcaro", "vuolter@gmail.com")] + DISPOSITION = False + API_KEY = "lhF2IeeprweDfu9ccWlxXVVypA5nA3EL" URL_REPLACEMENTS = [(__pattern__ + ".*", r'http://uploaded.net/file/\g')] -- cgit v1.2.3 From 6cd0159921cf420f68ad1deb17d089e67d79d802 Mon Sep 17 00:00:00 2001 From: GammaC0de Date: Fri, 24 Apr 2015 05:36:13 +0300 Subject: Update UpleaCom.py --- module/plugins/hoster/UpleaCom.py | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/UpleaCom.py b/module/plugins/hoster/UpleaCom.py index 59c593c93..b79456ebe 100644 --- a/module/plugins/hoster/UpleaCom.py +++ b/module/plugins/hoster/UpleaCom.py @@ -10,23 +10,26 @@ from module.plugins.internal.XFSHoster import XFSHoster, create_getInfo class UpleaCom(XFSHoster): __name__ = "UpleaCom" __type__ = "hoster" - __version__ = "0.06" + __version__ = "0.07" __pattern__ = r'https?://(?:www\.)?uplea\.com/dl/\w{15}' __description__ = """Uplea.com hoster plugin""" __license__ = "GPLv3" - __authors__ = [("Redleon", None)] + __authors__ = [("Redleon", None), + ("GammaC0de", None)] NAME_PATTERN = r'class="agmd size18">(?P.+?)<' - SIZE_PATTERN = r'size14">(?P[\d.,]+) (?P[\w^_])' + SIZE_PATTERN = r'size14">(?P[\d.,]+) (?P[\w^_]+?)' + SIZE_REPLACEMENTS = [('Ko','KB'), ('Mo','MB'), ('Go','GB')] OFFLINE_PATTERN = r'>You followed an invalid or expired link' + PREMIUM_PATTERN = r'You need to have a Premium subscription to download this file' - LINK_PATTERN = r'"(http?://\w+\.uplea\.com/anonym/.*?)"' + LINK_PATTERN = r'"(https?://\w+\.uplea\.com/anonym/.*?)"' - WAIT_PATTERN = r'timeText:([\d.]+),' + WAIT_PATTERN = r'timeText: ?([\d.]+),' STEP_PATTERN = r'
    ' @@ -45,9 +48,14 @@ class UpleaCom(XFSHoster): m = re.search(self.WAIT_PATTERN, self.html) if m: - self.wait(m.group(1), True) + self.logDebug(_("Waiting %s seconds") % m.group(1)) + self.wait(int(m.group(1)), True) self.retry() + m = re.search(self.PREMIUM_PATTERN, self.html) + if m: + self.error(_("This URL requires a premium account")) + m = re.search(self.LINK_PATTERN, self.html) if m is None: self.error(_("LINK_PATTERN not found")) -- cgit v1.2.3 From 76dea6e0faffbb7343b36c9230d7dee3a1db0f89 Mon Sep 17 00:00:00 2001 From: GammaC0de Date: Fri, 24 Apr 2015 05:41:28 +0300 Subject: Update UpleaCom.py --- module/plugins/hoster/UpleaCom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/UpleaCom.py b/module/plugins/hoster/UpleaCom.py index b79456ebe..039d2f552 100644 --- a/module/plugins/hoster/UpleaCom.py +++ b/module/plugins/hoster/UpleaCom.py @@ -49,7 +49,7 @@ class UpleaCom(XFSHoster): m = re.search(self.WAIT_PATTERN, self.html) if m: self.logDebug(_("Waiting %s seconds") % m.group(1)) - self.wait(int(m.group(1)), True) + self.wait(m.group(1), True) self.retry() m = re.search(self.PREMIUM_PATTERN, self.html) -- cgit v1.2.3 From 1f5c090d4d7df29870b471a47dc7b29d809c62c9 Mon Sep 17 00:00:00 2001 From: GammaC0de Date: Sun, 26 Apr 2015 00:04:07 +0300 Subject: Update UpleaCom.py --- module/plugins/hoster/UpleaCom.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/UpleaCom.py b/module/plugins/hoster/UpleaCom.py index 039d2f552..65e0299ec 100644 --- a/module/plugins/hoster/UpleaCom.py +++ b/module/plugins/hoster/UpleaCom.py @@ -10,7 +10,7 @@ from module.plugins.internal.XFSHoster import XFSHoster, create_getInfo class UpleaCom(XFSHoster): __name__ = "UpleaCom" __type__ = "hoster" - __version__ = "0.07" + __version__ = "0.08" __pattern__ = r'https?://(?:www\.)?uplea\.com/dl/\w{15}' @@ -28,6 +28,7 @@ class UpleaCom(XFSHoster): PREMIUM_PATTERN = r'You need to have a Premium subscription to download this file' LINK_PATTERN = r'"(https?://\w+\.uplea\.com/anonym/.*?)"' + HOSTER_DOMAIN = "uplea.com" WAIT_PATTERN = r'timeText: ?([\d.]+),' STEP_PATTERN = r'' -- cgit v1.2.3 From b390a325d9c84f2eea0fd7307f18a18777523b13 Mon Sep 17 00:00:00 2001 From: GammaC0de Date: Mon, 27 Apr 2015 00:50:09 +0300 Subject: UpleaCom fix size calculation and Set DISPOSITION to False (temp) --- module/plugins/hoster/UpleaCom.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/UpleaCom.py b/module/plugins/hoster/UpleaCom.py index 65e0299ec..d9d1c8ef6 100644 --- a/module/plugins/hoster/UpleaCom.py +++ b/module/plugins/hoster/UpleaCom.py @@ -10,7 +10,7 @@ from module.plugins.internal.XFSHoster import XFSHoster, create_getInfo class UpleaCom(XFSHoster): __name__ = "UpleaCom" __type__ = "hoster" - __version__ = "0.08" + __version__ = "0.09" __pattern__ = r'https?://(?:www\.)?uplea\.com/dl/\w{15}' @@ -20,9 +20,11 @@ class UpleaCom(XFSHoster): ("GammaC0de", None)] + DISPOSITION = False #@TODO: Remove in 0.4.10 + NAME_PATTERN = r'class="agmd size18">(?P.+?)<' SIZE_PATTERN = r'size14">(?P[\d.,]+) (?P[\w^_]+?)' - SIZE_REPLACEMENTS = [('Ko','KB'), ('Mo','MB'), ('Go','GB')] + SIZE_REPLACEMENTS = [('ko','KB'), ('mo','MB'), ('go','GB'), ('Ko','KB'), ('Mo','MB'), ('Go','GB')] OFFLINE_PATTERN = r'>You followed an invalid or expired link' PREMIUM_PATTERN = r'You need to have a Premium subscription to download this file' -- cgit v1.2.3 From 6cb30f3923fa296ac7cb5aee9c2a935718df2529 Mon Sep 17 00:00:00 2001 From: GammaC0de Date: Wed, 29 Apr 2015 00:59:11 +0300 Subject: Update UpleaCom.py --- module/plugins/hoster/UpleaCom.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/UpleaCom.py b/module/plugins/hoster/UpleaCom.py index d9d1c8ef6..608282a60 100644 --- a/module/plugins/hoster/UpleaCom.py +++ b/module/plugins/hoster/UpleaCom.py @@ -10,7 +10,7 @@ from module.plugins.internal.XFSHoster import XFSHoster, create_getInfo class UpleaCom(XFSHoster): __name__ = "UpleaCom" __type__ = "hoster" - __version__ = "0.09" + __version__ = "0.10" __pattern__ = r'https?://(?:www\.)?uplea\.com/dl/\w{15}' @@ -22,8 +22,8 @@ class UpleaCom(XFSHoster): DISPOSITION = False #@TODO: Remove in 0.4.10 - NAME_PATTERN = r'class="agmd size18">(?P.+?)<' - SIZE_PATTERN = r'size14">(?P[\d.,]+) (?P[\w^_]+?)' + NAME_PATTERN = r'(?P.+?)' + SIZE_PATTERN = r'(?P[\d.,]+) (?P[\w^_]+?)' SIZE_REPLACEMENTS = [('ko','KB'), ('mo','MB'), ('go','GB'), ('Ko','KB'), ('Mo','MB'), ('Go','GB')] OFFLINE_PATTERN = r'>You followed an invalid or expired link' -- cgit v1.2.3 From 7c024578460b7db62de197541306ce30f5417f7e Mon Sep 17 00:00:00 2001 From: GammaC0de Date: Wed, 29 Apr 2015 11:00:09 +0300 Subject: UploadedTo - Detect Maintenance Mode --- module/plugins/hoster/UploadedTo.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/UploadedTo.py b/module/plugins/hoster/UploadedTo.py index 67f82d1f7..0bfed7d49 100644 --- a/module/plugins/hoster/UploadedTo.py +++ b/module/plugins/hoster/UploadedTo.py @@ -11,7 +11,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class UploadedTo(SimpleHoster): __name__ = "UploadedTo" __type__ = "hoster" - __version__ = "0.86" + __version__ = "0.87" __pattern__ = r'https?://(?:www\.)?(uploaded\.(to|net)|ul\.to)(/file/|/?\?id=|.*?&id=|/)(?P\w+)' __config__ = [("use_premium", "bool", "Use premium account if available", True)] @@ -27,6 +27,8 @@ class UploadedTo(SimpleHoster): URL_REPLACEMENTS = [(__pattern__ + ".*", r'http://uploaded.net/file/\g')] + TEMP_OFFLINE_PATTERN = r'uploaded.net - Maintenance - Wartungsarbeiten' + LINK_PREMIUM_PATTERN = r'
    (\d+)' -- cgit v1.2.3 From 6f2fc4424a7cfa6e755004490488e5d92fb36389 Mon Sep 17 00:00:00 2001 From: GammaC0de Date: Wed, 29 Apr 2015 18:52:03 +0300 Subject: Update UploadedTo.py --- module/plugins/hoster/UploadedTo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/UploadedTo.py b/module/plugins/hoster/UploadedTo.py index 0bfed7d49..8a426d28d 100644 --- a/module/plugins/hoster/UploadedTo.py +++ b/module/plugins/hoster/UploadedTo.py @@ -27,7 +27,7 @@ class UploadedTo(SimpleHoster): URL_REPLACEMENTS = [(__pattern__ + ".*", r'http://uploaded.net/file/\g')] - TEMP_OFFLINE_PATTERN = r'uploaded.net - Maintenance - Wartungsarbeiten' + TEMP_OFFLINE_PATTERN = r'uploaded\.net - Maintenance - Wartungsarbeiten' LINK_PREMIUM_PATTERN = r'
    Date: Thu, 30 Apr 2015 19:20:11 +0200 Subject: Spare code cosmetics --- module/plugins/hoster/BasePlugin.py | 4 ++-- module/plugins/hoster/Ftp.py | 4 ++-- module/plugins/hoster/UpleaCom.py | 17 +++++++---------- module/plugins/hoster/UploadedTo.py | 2 +- 4 files changed, 12 insertions(+), 15 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/BasePlugin.py b/module/plugins/hoster/BasePlugin.py index 418f446eb..28a916fe8 100644 --- a/module/plugins/hoster/BasePlugin.py +++ b/module/plugins/hoster/BasePlugin.py @@ -13,7 +13,7 @@ from module.plugins.Hoster import Hoster class BasePlugin(Hoster): __name__ = "BasePlugin" __type__ = "hoster" - __version__ = "0.41" + __version__ = "0.42" __pattern__ = r'^unmatchable$' @@ -46,7 +46,7 @@ class BasePlugin(Hoster): try: if disposition: content = urllib2.urlopen(url).info()['Content-Disposition'].split(';') - self.pyfile.name = content[1].split('filename=')[1][1:-1] or self.pyfile.name + self.pyfile.name = content[1].split('filename=')[1].strip('"\'') or self.pyfile.name finally: return super(BasePlugin, self).download(url, get, post, ref, cookies, False) diff --git a/module/plugins/hoster/Ftp.py b/module/plugins/hoster/Ftp.py index cfe230f42..546845ca0 100644 --- a/module/plugins/hoster/Ftp.py +++ b/module/plugins/hoster/Ftp.py @@ -12,7 +12,7 @@ from module.plugins.Hoster import Hoster class Ftp(Hoster): __name__ = "Ftp" __type__ = "hoster" - __version__ = "0.49" + __version__ = "0.50" __pattern__ = r'(?:ftps?|sftp)://([\w.-]+(:[\w.-]+)?@)?[\w.-]+(:\d+)?/.+' @@ -33,7 +33,7 @@ class Ftp(Hoster): try: if disposition: content = urllib2.urlopen(url).info()['Content-Disposition'].split(';') - self.pyfile.name = content[1].split('filename=')[1][1:-1] or self.pyfile.name + self.pyfile.name = content[1].split('filename=')[1].strip('"\'') or self.pyfile.name finally: return super(Ftp, self).download(url, get, post, ref, cookies, False) diff --git a/module/plugins/hoster/UpleaCom.py b/module/plugins/hoster/UpleaCom.py index 608282a60..4538b1c16 100644 --- a/module/plugins/hoster/UpleaCom.py +++ b/module/plugins/hoster/UpleaCom.py @@ -22,18 +22,19 @@ class UpleaCom(XFSHoster): DISPOSITION = False #@TODO: Remove in 0.4.10 - NAME_PATTERN = r'(?P.+?)' - SIZE_PATTERN = r'(?P[\d.,]+) (?P[\w^_]+?)' + HOSTER_DOMAIN = "uplea.com" + SIZE_REPLACEMENTS = [('ko','KB'), ('mo','MB'), ('go','GB'), ('Ko','KB'), ('Mo','MB'), ('Go','GB')] + NAME_PATTERN = r'(?P.+?)' + SIZE_PATTERN = r'(?P[\d.,]+) (?P[\w^_]+?)' OFFLINE_PATTERN = r'>You followed an invalid or expired link' - PREMIUM_PATTERN = r'You need to have a Premium subscription to download this file' LINK_PATTERN = r'"(https?://\w+\.uplea\.com/anonym/.*?)"' - HOSTER_DOMAIN = "uplea.com" - WAIT_PATTERN = r'timeText: ?([\d.]+),' - STEP_PATTERN = r'' + PREMIUM_ONLY_PATTERN = r'You need to have a Premium subscription to download this file' + WAIT_PATTERN = r'timeText: ?([\d.]+),' + STEP_PATTERN = r'' def setup(self): @@ -55,10 +56,6 @@ class UpleaCom(XFSHoster): self.wait(m.group(1), True) self.retry() - m = re.search(self.PREMIUM_PATTERN, self.html) - if m: - self.error(_("This URL requires a premium account")) - m = re.search(self.LINK_PATTERN, self.html) if m is None: self.error(_("LINK_PATTERN not found")) diff --git a/module/plugins/hoster/UploadedTo.py b/module/plugins/hoster/UploadedTo.py index 8a426d28d..75710ea8b 100644 --- a/module/plugins/hoster/UploadedTo.py +++ b/module/plugins/hoster/UploadedTo.py @@ -27,7 +27,7 @@ class UploadedTo(SimpleHoster): URL_REPLACEMENTS = [(__pattern__ + ".*", r'http://uploaded.net/file/\g')] - TEMP_OFFLINE_PATTERN = r'uploaded\.net - Maintenance - Wartungsarbeiten' + TEMP_OFFLINE_PATTERN = r'uploaded\.net - Maintenance' LINK_PREMIUM_PATTERN = r'<div class="tfree".*\s*<form method="post" action="(.+?)"' -- cgit v1.2.3 From 416acbd2adb459a04a52c3270ea0a31bfa40fd84 Mon Sep 17 00:00:00 2001 From: Walter Purcaro <vuolter@users.noreply.github.com> Date: Thu, 30 Apr 2015 22:04:29 +0200 Subject: Fix https://github.com/pyload/pyload/issues/1374 --- module/plugins/hoster/BasePlugin.py | 12 +----------- module/plugins/hoster/Ftp.py | 12 +----------- 2 files changed, 2 insertions(+), 22 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/BasePlugin.py b/module/plugins/hoster/BasePlugin.py index 28a916fe8..962c8887b 100644 --- a/module/plugins/hoster/BasePlugin.py +++ b/module/plugins/hoster/BasePlugin.py @@ -13,7 +13,7 @@ from module.plugins.Hoster import Hoster class BasePlugin(Hoster): __name__ = "BasePlugin" __type__ = "hoster" - __version__ = "0.42" + __version__ = "0.43" __pattern__ = r'^unmatchable$' @@ -41,16 +41,6 @@ class BasePlugin(Hoster): self.resumeDownload = True - #: Work-around to `filename*=UTF-8` bug; remove in 0.4.10 - def download(self, url, get={}, post={}, ref=True, cookies=True, disposition=False): - try: - if disposition: - content = urllib2.urlopen(url).info()['Content-Disposition'].split(';') - self.pyfile.name = content[1].split('filename=')[1].strip('"\'') or self.pyfile.name - finally: - return super(BasePlugin, self).download(url, get, post, ref, cookies, False) - - def process(self, pyfile): """main function""" diff --git a/module/plugins/hoster/Ftp.py b/module/plugins/hoster/Ftp.py index 546845ca0..5be380078 100644 --- a/module/plugins/hoster/Ftp.py +++ b/module/plugins/hoster/Ftp.py @@ -12,7 +12,7 @@ from module.plugins.Hoster import Hoster class Ftp(Hoster): __name__ = "Ftp" __type__ = "hoster" - __version__ = "0.50" + __version__ = "0.51" __pattern__ = r'(?:ftps?|sftp)://([\w.-]+(:[\w.-]+)?@)?[\w.-]+(:\d+)?/.+' @@ -28,16 +28,6 @@ class Ftp(Hoster): self.resumeDownload = True - #: Work-around to `filename*=UTF-8` bug; remove in 0.4.10 - def download(self, url, get={}, post={}, ref=True, cookies=True, disposition=False): - try: - if disposition: - content = urllib2.urlopen(url).info()['Content-Disposition'].split(';') - self.pyfile.name = content[1].split('filename=')[1].strip('"\'') or self.pyfile.name - finally: - return super(Ftp, self).download(url, get, post, ref, cookies, False) - - def process(self, pyfile): parsed_url = urlparse(pyfile.url) netloc = parsed_url.netloc -- cgit v1.2.3 From 1ef93e913238275f7657d496ba3d2e7eeb5a30a2 Mon Sep 17 00:00:00 2001 From: Walter Purcaro <vuolter@users.noreply.github.com> Date: Fri, 1 May 2015 01:06:01 +0200 Subject: Use 'import' instead 'from' --- module/plugins/hoster/AlldebridCom.py | 4 +--- module/plugins/hoster/BasePlugin.py | 13 ++++++------- module/plugins/hoster/DepositfilesCom.py | 5 ++--- module/plugins/hoster/FastixRu.py | 4 +--- module/plugins/hoster/FastshareCz.py | 7 +++---- module/plugins/hoster/FileSharkPl.py | 5 ++--- module/plugins/hoster/FilefactoryCom.py | 3 +-- module/plugins/hoster/FilerNet.py | 3 +-- module/plugins/hoster/FlyFilesNet.py | 5 ++--- module/plugins/hoster/FshareVn.py | 5 ++--- module/plugins/hoster/Ftp.py | 13 ++++++------- module/plugins/hoster/GigapetaCom.py | 11 +++++------ module/plugins/hoster/HellshareCz.py | 2 +- module/plugins/hoster/Keep2ShareCc.py | 5 ++--- module/plugins/hoster/LetitbitNet.py | 5 ++--- module/plugins/hoster/LinksnappyCom.py | 5 ++--- module/plugins/hoster/MegaCoNz.py | 16 ++++++++-------- module/plugins/hoster/MegaDebridEu.py | 3 +-- module/plugins/hoster/MegaRapidCz.py | 5 ++--- module/plugins/hoster/MegaRapidoNet.py | 4 ++-- module/plugins/hoster/MultishareCz.py | 5 ++--- module/plugins/hoster/NarodRu.py | 5 ++--- module/plugins/hoster/NetloadIn.py | 5 ++--- module/plugins/hoster/OverLoadMe.py | 4 +--- module/plugins/hoster/PremiumTo.py | 4 ++-- module/plugins/hoster/QuickshareCz.py | 7 +++---- module/plugins/hoster/RapidgatorNet.py | 7 +++---- module/plugins/hoster/RapiduNet.py | 5 ++--- module/plugins/hoster/RealdebridCom.py | 4 +--- module/plugins/hoster/RehostTo.py | 2 +- module/plugins/hoster/ShareonlineBiz.py | 7 +++---- module/plugins/hoster/ShareplaceCom.py | 5 ++--- module/plugins/hoster/SpeedyshareCom.py | 3 +-- module/plugins/hoster/TurbobitNet.py | 16 ++++++++-------- module/plugins/hoster/UnibytesCom.py | 14 ++++++-------- module/plugins/hoster/UpleaCom.py | 5 ++--- module/plugins/hoster/UploadheroCom.py | 7 +++---- module/plugins/hoster/UploadingCom.py | 5 ++--- module/plugins/hoster/WrzucTo.py | 5 ++--- module/plugins/hoster/XHamsterCom.py | 5 ++--- module/plugins/hoster/XVideosCom.py | 5 ++--- module/plugins/hoster/Xdcc.py | 2 -- module/plugins/hoster/YourfilesTo.py | 6 ++---- module/plugins/hoster/YoutubeCom.py | 6 ++---- module/plugins/hoster/ZeveraCom.py | 3 +-- 45 files changed, 109 insertions(+), 156 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/AlldebridCom.py b/module/plugins/hoster/AlldebridCom.py index 51fdad757..2ed09f58c 100644 --- a/module/plugins/hoster/AlldebridCom.py +++ b/module/plugins/hoster/AlldebridCom.py @@ -1,9 +1,7 @@ # -*- coding: utf-8 -*- import re - -from random import randrange -from urllib import unquote +import urllib from module.common.json_layer import json_loads from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo diff --git a/module/plugins/hoster/BasePlugin.py b/module/plugins/hoster/BasePlugin.py index 962c8887b..2228516aa 100644 --- a/module/plugins/hoster/BasePlugin.py +++ b/module/plugins/hoster/BasePlugin.py @@ -1,9 +1,8 @@ # -*- coding: utf-8 -*- import re - -from urllib import unquote -from urlparse import urljoin, urlparse +import urllib +import urlparse from module.network.HTTPRequest import BadHeader from module.plugins.internal.SimpleHoster import create_getInfo, getFileURL @@ -25,8 +24,8 @@ class BasePlugin(Hoster): @classmethod def getInfo(cls, url="", html=""): #@TODO: Move to hoster class in 0.4.10 - url = unquote(url) - url_p = urlparse(url) + url = urllib.unquote(url) + url_p = urlparse.urlparse(url) return {'name' : (url_p.path.split('/')[-1] or url_p.query.split('=', 1)[::-1][0].split('&', 1)[0] or url_p.netloc.split('.', 1)[0]), @@ -51,7 +50,7 @@ class BasePlugin(Hoster): for _i in xrange(5): try: - link = getFileURL(self, unquote(pyfile.url)) + link = getFileURL(self, urllib.unquote(pyfile.url)) if link: self.download(link, ref=False, disposition=True) @@ -67,7 +66,7 @@ class BasePlugin(Hoster): account = self.core.accountManager.getAccountPlugin('Http') servers = [x['login'] for x in account.getAllAccounts()] - server = urlparse(pyfile.url).netloc + server = urlparse.urlparse(pyfile.url).netloc if server in servers: self.logDebug("Logging on to %s" % server) diff --git a/module/plugins/hoster/DepositfilesCom.py b/module/plugins/hoster/DepositfilesCom.py index cc24e351e..8559bbc36 100644 --- a/module/plugins/hoster/DepositfilesCom.py +++ b/module/plugins/hoster/DepositfilesCom.py @@ -1,8 +1,7 @@ # -*- coding: utf-8 -*- import re - -from urllib import unquote +import urllib from module.plugins.internal.CaptchaService import ReCaptcha from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo @@ -67,7 +66,7 @@ class DepositfilesCom(SimpleHoster): m = re.search(self.LINK_FREE_PATTERN, self.html) if m: - self.link = unquote(m.group(1)) + self.link = urllib.unquote(m.group(1)) def handlePremium(self, pyfile): diff --git a/module/plugins/hoster/FastixRu.py b/module/plugins/hoster/FastixRu.py index 0dc12568d..cc50f4229 100644 --- a/module/plugins/hoster/FastixRu.py +++ b/module/plugins/hoster/FastixRu.py @@ -1,9 +1,7 @@ # -*- coding: utf-8 -*- import re - -from random import randrange -from urllib import unquote +import urllib from module.common.json_layer import json_loads from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo diff --git a/module/plugins/hoster/FastshareCz.py b/module/plugins/hoster/FastshareCz.py index cede2e906..330a6e3b9 100644 --- a/module/plugins/hoster/FastshareCz.py +++ b/module/plugins/hoster/FastshareCz.py @@ -1,8 +1,7 @@ # -*- coding: utf-8 -*- import re - -from urlparse import urljoin +import urlparse from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo @@ -55,8 +54,8 @@ class FastshareCz(SimpleHoster): self.error(_("FREE_URL_PATTERN not found")) baseurl = "http://www.fastshare.cz" - captcha = self.decryptCaptcha(urljoin(baseurl, captcha_src)) - self.download(urljoin(baseurl, action), post={'code': captcha, 'btn.x': 77, 'btn.y': 18}) + captcha = self.decryptCaptcha(urlparse.urljoin(baseurl, captcha_src)) + self.download(urlparse.urljoin(baseurl, action), post={'code': captcha, 'btn.x': 77, 'btn.y': 18}) def checkFile(self, rules={}): diff --git a/module/plugins/hoster/FileSharkPl.py b/module/plugins/hoster/FileSharkPl.py index 9f6070806..de030be9c 100644 --- a/module/plugins/hoster/FileSharkPl.py +++ b/module/plugins/hoster/FileSharkPl.py @@ -1,8 +1,7 @@ # -*- coding: utf-8 -*- import re - -from urlparse import urljoin +import urlparse from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo @@ -78,7 +77,7 @@ class FileSharkPl(SimpleHoster): if m is None: self.error(_("Download url not found")) - link = urljoin("http://fileshark.pl", m.group(1)) + link = urlparse.urljoin("http://fileshark.pl", m.group(1)) self.html = self.load(link) diff --git a/module/plugins/hoster/FilefactoryCom.py b/module/plugins/hoster/FilefactoryCom.py index 606fb25f0..0a9d5e2cc 100644 --- a/module/plugins/hoster/FilefactoryCom.py +++ b/module/plugins/hoster/FilefactoryCom.py @@ -1,8 +1,7 @@ # -*- coding: utf-8 -*- import re - -from urlparse import urljoin +import urlparse from module.network.RequestFactory import getURL from module.plugins.internal.SimpleHoster import SimpleHoster, parseFileInfo diff --git a/module/plugins/hoster/FilerNet.py b/module/plugins/hoster/FilerNet.py index 22ca3725a..156392c79 100644 --- a/module/plugins/hoster/FilerNet.py +++ b/module/plugins/hoster/FilerNet.py @@ -6,8 +6,7 @@ import pycurl import re - -from urlparse import urljoin +import urlparse from module.plugins.internal.CaptchaService import ReCaptcha from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo diff --git a/module/plugins/hoster/FlyFilesNet.py b/module/plugins/hoster/FlyFilesNet.py index 4420d5d60..689eb3c66 100644 --- a/module/plugins/hoster/FlyFilesNet.py +++ b/module/plugins/hoster/FlyFilesNet.py @@ -1,8 +1,7 @@ # -*- coding: utf-8 -*- import re - -from urllib import unquote +import urllib from module.network.RequestFactory import getURL from module.plugins.internal.SimpleHoster import SimpleHoster @@ -26,7 +25,7 @@ class FlyFilesNet(SimpleHoster): def process(self, pyfile): name = re.search(self.NAME_PATTERN, pyfile.url).group(1) - pyfile.name = unquote_plus(name) + pyfile.name = urllib.unquote_plus(name) session = re.search(self.SESSION_PATTERN, pyfile.url).group(1) diff --git a/module/plugins/hoster/FshareVn.py b/module/plugins/hoster/FshareVn.py index 77d122e8e..50128db10 100644 --- a/module/plugins/hoster/FshareVn.py +++ b/module/plugins/hoster/FshareVn.py @@ -2,8 +2,7 @@ import re import time - -from urlparse import urljoin +import urlparse from module.network.RequestFactory import getURL from module.plugins.internal.SimpleHoster import SimpleHoster, parseFileInfo @@ -59,7 +58,7 @@ class FshareVn(SimpleHoster): self.checkErrors() action, inputs = self.parseHtmlForm('frm_download') - url = urljoin(pyfile.url, action) + url = urlparse.urljoin(pyfile.url, action) if not inputs: self.error(_("No FORM")) diff --git a/module/plugins/hoster/Ftp.py b/module/plugins/hoster/Ftp.py index 5be380078..5258a1c27 100644 --- a/module/plugins/hoster/Ftp.py +++ b/module/plugins/hoster/Ftp.py @@ -2,9 +2,8 @@ import pycurl import re - -from urllib import quote, unquote -from urlparse import urlparse +import urllib +import urlparse from module.plugins.Hoster import Hoster @@ -29,12 +28,12 @@ class Ftp(Hoster): def process(self, pyfile): - parsed_url = urlparse(pyfile.url) + parsed_url = urlparse.urlparse(pyfile.url) netloc = parsed_url.netloc pyfile.name = parsed_url.path.rpartition('/')[2] try: - pyfile.name = unquote(str(pyfile.name)).decode('utf8') + pyfile.name = urllib.unquote(str(pyfile.name)).decode('utf8') except Exception: pass @@ -67,11 +66,11 @@ class Ftp(Hoster): #Naive ftp directory listing if re.search(r'^25\d.*?"', self.req.http.header, re.M): pyfile.url = pyfile.url.rstrip('/') - pkgname = "/".join(pyfile.package().name, urlparse(pyfile.url).path.rpartition('/')[2]) + pkgname = "/".join(pyfile.package().name, urlparse.urlparse(pyfile.url).path.rpartition('/')[2]) pyfile.url += '/' self.req.http.c.setopt(48, 1) # CURLOPT_DIRLISTONLY res = self.load(pyfile.url, decode=False) - links = [pyfile.url + quote(x) for x in res.splitlines()] + links = [pyfile.url + urllib.quote(x) for x in res.splitlines()] self.logDebug("LINKS", links) self.core.api.addPackage(pkgname, links) else: diff --git a/module/plugins/hoster/GigapetaCom.py b/module/plugins/hoster/GigapetaCom.py index 2fe44ca85..e4d0601fc 100644 --- a/module/plugins/hoster/GigapetaCom.py +++ b/module/plugins/hoster/GigapetaCom.py @@ -1,10 +1,9 @@ # -*- coding: utf-8 -*- +import pycurl +import random import re -from pycurl import FOLLOWLOCATION -from random import randint - from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo @@ -29,10 +28,10 @@ class GigapetaCom(SimpleHoster): def handleFree(self, pyfile): - captcha_key = str(randint(1, 100000000)) + captcha_key = str(random.randint(1, 100000000)) captcha_url = "http://gigapeta.com/img/captcha.gif?x=%s" % captcha_key - self.req.http.c.setopt(FOLLOWLOCATION, 0) + self.req.http.c.setopt(pycurl.FOLLOWLOCATION, 0) for _i in xrange(5): self.checkErrors() @@ -52,7 +51,7 @@ class GigapetaCom(SimpleHoster): else: self.fail(_("No valid captcha code entered")) - self.req.http.c.setopt(FOLLOWLOCATION, 1) + self.req.http.c.setopt(pycurl.FOLLOWLOCATION, 1) def checkErrors(self): diff --git a/module/plugins/hoster/HellshareCz.py b/module/plugins/hoster/HellshareCz.py index 2e156c464..ac0043b37 100644 --- a/module/plugins/hoster/HellshareCz.py +++ b/module/plugins/hoster/HellshareCz.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -from urlparse import urljoin +import urlparse from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo diff --git a/module/plugins/hoster/Keep2ShareCc.py b/module/plugins/hoster/Keep2ShareCc.py index 65e9ddc2d..fdae65096 100644 --- a/module/plugins/hoster/Keep2ShareCc.py +++ b/module/plugins/hoster/Keep2ShareCc.py @@ -1,8 +1,7 @@ # -*- coding: utf-8 -*- import re - -from urlparse import urljoin +import urlparse from module.plugins.internal.CaptchaService import ReCaptcha from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo @@ -100,7 +99,7 @@ class Keep2ShareCc(SimpleHoster): m = re.search(self.CAPTCHA_PATTERN, self.html) self.logDebug("CAPTCHA_PATTERN found %s" % m) if m: - captcha_url = urljoin("http://keep2s.cc/", m.group(1)) + captcha_url = urlparse.urljoin("http://keep2s.cc/", m.group(1)) post_data['CaptchaForm[code]'] = self.decryptCaptcha(captcha_url) else: recaptcha = ReCaptcha(self) diff --git a/module/plugins/hoster/LetitbitNet.py b/module/plugins/hoster/LetitbitNet.py index 79dbd8133..40d792e11 100644 --- a/module/plugins/hoster/LetitbitNet.py +++ b/module/plugins/hoster/LetitbitNet.py @@ -7,8 +7,7 @@ # http://letitbit.net/download/07874.0b5709a7d3beee2408bb1f2eefce/random.bin.html import re - -from urlparse import urljoin +import urlparse from module.common.json_layer import json_loads, json_dumps from module.network.RequestFactory import getURL @@ -66,7 +65,7 @@ class LetitbitNet(SimpleHoster): self.logDebug(action, inputs) inputs['desc'] = "" - self.html = self.load(urljoin("http://letitbit.net/", action), post=inputs) + self.html = self.load(urlparse.urljoin("http://letitbit.net/", action), post=inputs) m = re.search(self.SECONDS_PATTERN, self.html) seconds = int(m.group(1)) if m else 60 diff --git a/module/plugins/hoster/LinksnappyCom.py b/module/plugins/hoster/LinksnappyCom.py index 87207ab40..9c3af4ae3 100644 --- a/module/plugins/hoster/LinksnappyCom.py +++ b/module/plugins/hoster/LinksnappyCom.py @@ -1,8 +1,7 @@ # -*- coding: utf-8 -*- import re - -from urlparse import urlsplit +import urlparse from module.common.json_layer import json_loads, json_dumps from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo @@ -52,7 +51,7 @@ class LinksnappyCom(MultiHoster): @staticmethod def _get_host(url): - host = urlsplit(url).netloc + host = urlparse.urlsplit(url).netloc return re.search(r'[\w-]+\.\w+$', host).group(0) diff --git a/module/plugins/hoster/MegaCoNz.py b/module/plugins/hoster/MegaCoNz.py index 37ac12b44..aa7755af4 100644 --- a/module/plugins/hoster/MegaCoNz.py +++ b/module/plugins/hoster/MegaCoNz.py @@ -1,15 +1,15 @@ # -*- coding: utf-8 -*- +import array import os +# import pycurl import random import re -from array import array from base64 import standard_b64decode from Crypto.Cipher import AES from Crypto.Util import Counter -# from pycurl import SSL_CIPHER_LIST from module.common.json_layer import json_loads, json_dumps from module.plugins.Hoster import Hoster @@ -69,10 +69,10 @@ class MegaCoNz(Hoster): def getCipherKey(self, key): """ Construct the cipher key from the given data """ - a = array("I", self.b64_decode(key)) + a = array.array("I", self.b64_decode(key)) - k = array("I", (a[0] ^ a[4], a[1] ^ a[5], a[2] ^ a[6], a[3] ^ a[7])) - iv = a[4:6] + array("I", (0, 0)) + k = array.array("I", (a[0] ^ a[4], a[1] ^ a[5], a[2] ^ a[6], a[3] ^ a[7])) + iv = a[4:6] + array.array("I", (0, 0)) meta_mac = a[6:8] return k, iv, meta_mac @@ -82,7 +82,7 @@ class MegaCoNz(Hoster): """ Dispatch a call to the api, see https://mega.co.nz/#developers """ # generate a session id, no idea where to obtain elsewhere - uid = random.randint(10 << 9, 10 ** 10) + uid = random.random.randint(10 << 9, 10 ** 10) res = self.load(self.API_URL, get={'id': uid}, post=json_dumps([kwargs])) self.logDebug("Api Response: " + res) @@ -145,7 +145,7 @@ class MegaCoNz(Hoster): # block = chunk[i:i+16] # if len(block) % 16: # block += '=' * (16 - (len(block) % 16)) - # block = array("I", block) + # block = array.array("I", block) # chunk_mac = [chunk_mac[0] ^ a_[0], chunk_mac[1] ^ block[1], chunk_mac[2] ^ block[2], chunk_mac[3] ^ block[3]] # chunk_mac = aes_cbc_encrypt_a32(chunk_mac, k) @@ -207,7 +207,7 @@ class MegaCoNz(Hoster): pyfile.name = attr['n'] + self.FILE_SUFFIX pyfile.size = mega['s'] - # self.req.http.c.setopt(SSL_CIPHER_LIST, "RC4-MD5:DEFAULT") + # self.req.http.c.setopt(pycurl.SSL_CIPHER_LIST, "RC4-MD5:DEFAULT") self.download(mega['g']) diff --git a/module/plugins/hoster/MegaDebridEu.py b/module/plugins/hoster/MegaDebridEu.py index 3a8d8b080..9c8cc2a90 100644 --- a/module/plugins/hoster/MegaDebridEu.py +++ b/module/plugins/hoster/MegaDebridEu.py @@ -1,8 +1,7 @@ # -*- coding: utf-8 -*- import re - -from urllib import unquote_plus +import urllib from module.common.json_layer import json_loads from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo diff --git a/module/plugins/hoster/MegaRapidCz.py b/module/plugins/hoster/MegaRapidCz.py index 577a3d511..59fb8251e 100644 --- a/module/plugins/hoster/MegaRapidCz.py +++ b/module/plugins/hoster/MegaRapidCz.py @@ -1,9 +1,8 @@ # -*- coding: utf-8 -*- +import pycurl import re -from pycurl import HTTPHEADER - from module.network.HTTPRequest import BadHeader from module.network.RequestFactory import getRequest from module.plugins.internal.SimpleHoster import SimpleHoster, parseFileInfo @@ -11,7 +10,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, parseFileInfo def getInfo(urls): h = getRequest() - h.c.setopt(HTTPHEADER, + h.c.setopt(pycurl.HTTPHEADER, ["Accept: text/html", "User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.0) Gecko/20100101 Firefox/25.0"]) diff --git a/module/plugins/hoster/MegaRapidoNet.py b/module/plugins/hoster/MegaRapidoNet.py index b5bd7f3f2..a3b4c72ba 100644 --- a/module/plugins/hoster/MegaRapidoNet.py +++ b/module/plugins/hoster/MegaRapidoNet.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -from random import randint +import random from module.plugins.internal.MultiHoster import MultiHoster @@ -9,7 +9,7 @@ def random_with_N_digits(n): rand = "0." not_zero = 0 for i in range(1, n + 1): - r = randint(0, 9) + r = random.randint(0, 9) if(r > 0): not_zero += 1 rand += str(r) diff --git a/module/plugins/hoster/MultishareCz.py b/module/plugins/hoster/MultishareCz.py index 5dc53ecbc..bbb77f525 100644 --- a/module/plugins/hoster/MultishareCz.py +++ b/module/plugins/hoster/MultishareCz.py @@ -1,9 +1,8 @@ # -*- coding: utf-8 -*- +import random import re -from random import random - from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo @@ -45,7 +44,7 @@ class MultishareCz(SimpleHoster): if not self.checkTrafficLeft(): self.fail(_("Not enough credit left to download file")) - self.download("http://dl%d.mms.multishare.cz/html/mms_process.php" % round(random() * 10000 * random()), + self.download("http://dl%d.mms.multishare.cz/html/mms_process.php" % round(random.random() * 10000 * random.random()), get={'u_ID' : self.acc_info['u_ID'], 'u_hash': self.acc_info['u_hash'], 'link' : pyfile.url}, diff --git a/module/plugins/hoster/NarodRu.py b/module/plugins/hoster/NarodRu.py index 65ad90d17..b7380add0 100644 --- a/module/plugins/hoster/NarodRu.py +++ b/module/plugins/hoster/NarodRu.py @@ -1,9 +1,8 @@ # -*- coding: utf-8 -*- +import random import re -from random import random - from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo @@ -34,7 +33,7 @@ class NarodRu(SimpleHoster): def handleFree(self, pyfile): for _i in xrange(5): - self.html = self.load('http://narod.ru/disk/getcapchaxml/?rnd=%d' % int(random() * 777)) + self.html = self.load('http://narod.ru/disk/getcapchaxml/?rnd=%d' % int(random.random() * 777)) m = re.search(self.CAPTCHA_PATTERN, self.html) if m is None: diff --git a/module/plugins/hoster/NetloadIn.py b/module/plugins/hoster/NetloadIn.py index 57af3f18e..cab7bd88f 100644 --- a/module/plugins/hoster/NetloadIn.py +++ b/module/plugins/hoster/NetloadIn.py @@ -2,8 +2,7 @@ import re import time - -from urlparse import urljoin +import urlparse from module.network.RequestFactory import getURL from module.plugins.Hoster import Hoster @@ -230,7 +229,7 @@ class NetloadIn(Hoster): page = None else: - url_captcha_html = urljoin("http://netload.in/", url_captcha_html) + url_captcha_html = urlparse.urljoin("http://netload.in/", url_captcha_html) break self.html = self.load(url_captcha_html) diff --git a/module/plugins/hoster/OverLoadMe.py b/module/plugins/hoster/OverLoadMe.py index 934de5746..d06baa0f5 100644 --- a/module/plugins/hoster/OverLoadMe.py +++ b/module/plugins/hoster/OverLoadMe.py @@ -1,9 +1,7 @@ # -*- coding: utf-8 -*- import re - -from random import randrange -from urllib import unquote +import urllib from module.common.json_layer import json_loads from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo diff --git a/module/plugins/hoster/PremiumTo.py b/module/plugins/hoster/PremiumTo.py index f48f68e1b..ab5016673 100644 --- a/module/plugins/hoster/PremiumTo.py +++ b/module/plugins/hoster/PremiumTo.py @@ -2,7 +2,7 @@ from __future__ import with_statement -from os import remove +import os from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo from module.utils import fs_encode @@ -45,7 +45,7 @@ class PremiumTo(MultiHoster): file = fs_encode(self.lastDownload) with open(file, "rb") as f: err = f.read(256).strip() - remove(file) + os.remove(file) if err: self.fail(err) diff --git a/module/plugins/hoster/QuickshareCz.py b/module/plugins/hoster/QuickshareCz.py index 893c3b6c7..1e0750b88 100644 --- a/module/plugins/hoster/QuickshareCz.py +++ b/module/plugins/hoster/QuickshareCz.py @@ -1,9 +1,8 @@ # -*- coding: utf-8 -*- +import pycurl import re -from pycurl import FOLLOWLOCATION - from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo @@ -60,10 +59,10 @@ class QuickshareCz(SimpleHoster): data = dict((x, self.jsvars[x]) for x in self.jsvars if x in ("ID1", "ID2", "ID3", "ID4")) self.logDebug("FREE URL1:" + download_url, data) - self.req.http.c.setopt(FOLLOWLOCATION, 0) + self.req.http.c.setopt(pycurl.FOLLOWLOCATION, 0) self.load(download_url, post=data) self.header = self.req.http.header - self.req.http.c.setopt(FOLLOWLOCATION, 1) + self.req.http.c.setopt(pycurl.FOLLOWLOCATION, 1) m = re.search(r'Location\s*:\s*(.+)', self.header, re.I) if m is None: diff --git a/module/plugins/hoster/RapidgatorNet.py b/module/plugins/hoster/RapidgatorNet.py index 2626ec925..ae74e8a63 100644 --- a/module/plugins/hoster/RapidgatorNet.py +++ b/module/plugins/hoster/RapidgatorNet.py @@ -1,9 +1,8 @@ # -*- coding: utf-8 -*- +import pycurl import re -from pycurl import HTTPHEADER - from module.common.json_layer import json_loads from module.network.HTTPRequest import BadHeader from module.plugins.internal.CaptchaService import AdsCaptcha, ReCaptcha, SolveMedia @@ -102,7 +101,7 @@ class RapidgatorNet(SimpleHoster): self.logDebug(jsvars) self.req.http.lastURL = pyfile.url - self.req.http.c.setopt(HTTPHEADER, ["X-Requested-With: XMLHttpRequest"]) + self.req.http.c.setopt(pycurl.HTTPHEADER, ["X-Requested-With: XMLHttpRequest"]) url = "http://rapidgator.net%s?fid=%s" % ( jsvars.get('startTimerUrl', '/download/AjaxStartTimer'), jsvars['fid']) @@ -115,7 +114,7 @@ class RapidgatorNet(SimpleHoster): jsvars.update(self.getJsonResponse(url)) self.req.http.lastURL = pyfile.url - self.req.http.c.setopt(HTTPHEADER, ["X-Requested-With:"]) + self.req.http.c.setopt(pycurl.HTTPHEADER, ["X-Requested-With:"]) url = "http://rapidgator.net%s" % jsvars.get('captchaUrl', '/download/captcha') self.html = self.load(url) diff --git a/module/plugins/hoster/RapiduNet.py b/module/plugins/hoster/RapiduNet.py index 8a85bc844..fcccbbebc 100644 --- a/module/plugins/hoster/RapiduNet.py +++ b/module/plugins/hoster/RapiduNet.py @@ -1,10 +1,9 @@ # -*- coding: utf-8 -*- +import pycurl import re import time -from pycurl import HTTPHEADER - from module.common.json_layer import json_loads from module.plugins.internal.CaptchaService import ReCaptcha from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo @@ -40,7 +39,7 @@ class RapiduNet(SimpleHoster): def handleFree(self, pyfile): self.req.http.lastURL = pyfile.url - self.req.http.c.setopt(HTTPHEADER, ["X-Requested-With: XMLHttpRequest"]) + self.req.http.c.setopt(pycurl.HTTPHEADER, ["X-Requested-With: XMLHttpRequest"]) jsvars = self.getJsonResponse("https://rapidu.net/ajax.php", get={'a': "getLoadTimeToDownload"}, diff --git a/module/plugins/hoster/RealdebridCom.py b/module/plugins/hoster/RealdebridCom.py index f35eb5e03..4500fcefc 100644 --- a/module/plugins/hoster/RealdebridCom.py +++ b/module/plugins/hoster/RealdebridCom.py @@ -2,9 +2,7 @@ import re import time - -from random import randrange -from urllib import unquote +import urllib from module.common.json_layer import json_loads from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo diff --git a/module/plugins/hoster/RehostTo.py b/module/plugins/hoster/RehostTo.py index 1c53fbc92..9c07364ec 100644 --- a/module/plugins/hoster/RehostTo.py +++ b/module/plugins/hoster/RehostTo.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -from urllib import unquote +import urllib from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo diff --git a/module/plugins/hoster/ShareonlineBiz.py b/module/plugins/hoster/ShareonlineBiz.py index fea5781fe..505222fce 100644 --- a/module/plugins/hoster/ShareonlineBiz.py +++ b/module/plugins/hoster/ShareonlineBiz.py @@ -2,9 +2,8 @@ import re import time - -from urllib import unquote -from urlparse import urlparse +import urllib +import urlparse from module.network.RequestFactory import getURL from module.plugins.internal.CaptchaService import ReCaptcha @@ -38,7 +37,7 @@ class ShareonlineBiz(SimpleHoster): @classmethod def getInfo(cls, url="", html=""): - info = {'name': urlparse(unquote(url)).path.split('/')[-1] or _("Unknown"), 'size': 0, 'status': 3 if url else 1, 'url': url} + info = {'name': urlparse.urlparse(urllib.unquote(url)).path.split('/')[-1] or _("Unknown"), 'size': 0, 'status': 3 if url else 1, 'url': url} if url: info['pattern'] = re.match(cls.__pattern__, url).groupdict() diff --git a/module/plugins/hoster/ShareplaceCom.py b/module/plugins/hoster/ShareplaceCom.py index c540dd2df..babd0d1d4 100644 --- a/module/plugins/hoster/ShareplaceCom.py +++ b/module/plugins/hoster/ShareplaceCom.py @@ -1,8 +1,7 @@ # -*- coding: utf-8 -*- import re - -from urllib import unquote +import urllib from module.plugins.Hoster import Hoster @@ -61,7 +60,7 @@ class ShareplaceCom(Hoster): url = re.search(r"var beer = '(.*?)';", self.html) if url: url = url.group(1) - url = unquote( + url = urllib.unquote( url.replace("http://http:/", "").replace("vvvvvvvvv", "").replace("lllllllll", "").replace( "teletubbies", "")) self.logDebug("URL: %s" % url) diff --git a/module/plugins/hoster/SpeedyshareCom.py b/module/plugins/hoster/SpeedyshareCom.py index 1649abbe6..91788b2c8 100644 --- a/module/plugins/hoster/SpeedyshareCom.py +++ b/module/plugins/hoster/SpeedyshareCom.py @@ -4,8 +4,7 @@ # http://speedy.sh/ep2qY/Zapp-Brannigan.jpg import re - -from urlparse import urljoin +import urlparse from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo diff --git a/module/plugins/hoster/TurbobitNet.py b/module/plugins/hoster/TurbobitNet.py index f4eaa90cc..7995bd0c0 100644 --- a/module/plugins/hoster/TurbobitNet.py +++ b/module/plugins/hoster/TurbobitNet.py @@ -1,13 +1,13 @@ # -*- coding: utf-8 -*- +import binascii +import pycurl import random import re import time +import urllib from Crypto.Cipher import ARC4 -from binascii import hexlify, unhexlify -from pycurl import HTTPHEADER -from urllib import quote from module.network.RequestFactory import getURL from module.plugins.internal.CaptchaService import ReCaptcha @@ -50,11 +50,11 @@ class TurbobitNet(SimpleHoster): self.solveCaptcha() - self.req.http.c.setopt(HTTPHEADER, ["X-Requested-With: XMLHttpRequest"]) + self.req.http.c.setopt(pycurl.HTTPHEADER, ["X-Requested-With: XMLHttpRequest"]) self.html = self.load(self.getDownloadUrl(rtUpdate)) - self.req.http.c.setopt(HTTPHEADER, ["X-Requested-With:"]) + self.req.http.c.setopt(pycurl.HTTPHEADER, ["X-Requested-With:"]) m = re.search(self.LINK_FREE_PATTERN, self.html) if m: @@ -134,7 +134,7 @@ class TurbobitNet(SimpleHoster): for b in [1, 3]: self.jscode = "var id = \'%s\';var b = %d;var inn = \'%s\';%sout" % ( - self.info['pattern']['ID'], b, quote(fun), rtUpdate) + self.info['pattern']['ID'], b, urllib.quote(fun), rtUpdate) try: out = self.js.eval(self.jscode) @@ -155,8 +155,8 @@ class TurbobitNet(SimpleHoster): def decrypt(self, data): - cipher = ARC4.new(hexlify('E\x15\xa1\x9e\xa3M\xa0\xc6\xa0\x84\xb6H\x83\xa8o\xa0')) - return unhexlify(cipher.encrypt(unhexlify(data))) + cipher = ARC4.new(binascii.hexlify('E\x15\xa1\x9e\xa3M\xa0\xc6\xa0\x84\xb6H\x83\xa8o\xa0')) + return binascii.unhexlify(cipher.encrypt(binascii.unhexlify(data))) def getLocalTimeString(self): diff --git a/module/plugins/hoster/UnibytesCom.py b/module/plugins/hoster/UnibytesCom.py index 14447b0b0..d090c8e7d 100644 --- a/module/plugins/hoster/UnibytesCom.py +++ b/module/plugins/hoster/UnibytesCom.py @@ -1,10 +1,8 @@ # -*- coding: utf-8 -*- +import pycurl import re - -from urlparse import urljoin - -from pycurl import FOLLOWLOCATION +import urlparse from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo @@ -34,11 +32,11 @@ class UnibytesCom(SimpleHoster): domain = "http://www.%s/" % self.HOSTER_DOMAIN action, post_data = self.parseHtmlForm('id="startForm"') - self.req.http.c.setopt(FOLLOWLOCATION, 0) + self.req.http.c.setopt(pycurl.FOLLOWLOCATION, 0) for _i in xrange(8): self.logDebug(action, post_data) - self.html = self.load(urljoin(domain, action), post=post_data) + self.html = self.load(urlparse.urljoin(domain, action), post=post_data) m = re.search(r'location:\s*(\S+)', self.req.http.header, re.I) if m: @@ -66,12 +64,12 @@ class UnibytesCom(SimpleHoster): self.wait(m.group(1) if m else 60, False) elif last_step in ("captcha", "last"): - post_data['captcha'] = self.decryptCaptcha(urljoin(domain, "/captcha.jpg")) + post_data['captcha'] = self.decryptCaptcha(urlparse.urljoin(domain, "/captcha.jpg")) else: self.fail(_("No valid captcha code entered")) - self.req.http.c.setopt(FOLLOWLOCATION, 1) + self.req.http.c.setopt(pycurl.FOLLOWLOCATION, 1) getInfo = create_getInfo(UnibytesCom) diff --git a/module/plugins/hoster/UpleaCom.py b/module/plugins/hoster/UpleaCom.py index 4538b1c16..9d460ef98 100644 --- a/module/plugins/hoster/UpleaCom.py +++ b/module/plugins/hoster/UpleaCom.py @@ -1,8 +1,7 @@ # -*- coding: utf-8 -*- import re - -from urlparse import urljoin +import urlparse from module.plugins.internal.XFSHoster import XFSHoster, create_getInfo @@ -48,7 +47,7 @@ class UpleaCom(XFSHoster): if m is None: self.error(_("STEP_PATTERN not found")) - self.html = self.load(urljoin("http://uplea.com/", m.group(1))) + self.html = self.load(urlparse.urljoin("http://uplea.com/", m.group(1))) m = re.search(self.WAIT_PATTERN, self.html) if m: diff --git a/module/plugins/hoster/UploadheroCom.py b/module/plugins/hoster/UploadheroCom.py index 6c8747b58..5c74f10eb 100644 --- a/module/plugins/hoster/UploadheroCom.py +++ b/module/plugins/hoster/UploadheroCom.py @@ -4,8 +4,7 @@ # http://uploadhero.co/dl/wQBRAVSM import re - -from urlparse import urljoin +import urlparse from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo @@ -44,7 +43,7 @@ class UploadheroCom(SimpleHoster): if m is None: self.error(_("Captcha not found")) - captcha = self.decryptCaptcha(urljoin("http://uploadhero.co", m.group(1))) + captcha = self.decryptCaptcha(urlparse.urljoin("http://uploadhero.co", m.group(1))) self.html = self.load(pyfile.url, get={"code": captcha}) @@ -58,7 +57,7 @@ class UploadheroCom(SimpleHoster): def checkErrors(self): m = re.search(self.IP_BLOCKED_PATTERN, self.html) if m: - self.html = self.load(urljoin("http://uploadhero.co", m.group(1))) + self.html = self.load(urlparse.urljoin("http://uploadhero.co", m.group(1))) m = re.search(self.IP_WAIT_PATTERN, self.html) wait_time = (int(m.group(1)) * 60 + int(m.group(2))) if m else 5 * 60 diff --git a/module/plugins/hoster/UploadingCom.py b/module/plugins/hoster/UploadingCom.py index d0e0b1fd7..c2e0d2873 100644 --- a/module/plugins/hoster/UploadingCom.py +++ b/module/plugins/hoster/UploadingCom.py @@ -1,9 +1,8 @@ # -*- coding: utf-8 -*- +import pycurl import re -from pycurl import HTTPHEADER - from module.common.json_layer import json_loads from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo, timestamp @@ -66,7 +65,7 @@ class UploadingCom(SimpleHoster): self.retry(6, (6 * 60 if m.group(2) else 15) * 60, pyfile.error) ajax_url = "http://uploading.com/files/get/?ajax" - self.req.http.c.setopt(HTTPHEADER, ["X-Requested-With: XMLHttpRequest"]) + self.req.http.c.setopt(pycurl.HTTPHEADER, ["X-Requested-With: XMLHttpRequest"]) self.req.http.lastURL = pyfile.url res = json_loads(self.load(ajax_url, post={'action': 'second_page', 'code': self.info['pattern']['ID']})) diff --git a/module/plugins/hoster/WrzucTo.py b/module/plugins/hoster/WrzucTo.py index 50a45babe..f11d03ea8 100644 --- a/module/plugins/hoster/WrzucTo.py +++ b/module/plugins/hoster/WrzucTo.py @@ -1,9 +1,8 @@ # -*- coding: utf-8 -*- +import pycurl import re -from pycurl import HTTPHEADER - from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo @@ -35,7 +34,7 @@ class WrzucTo(SimpleHoster): if len(data) != 2: self.error(_("No file ID")) - self.req.http.c.setopt(HTTPHEADER, ["X-Requested-With: XMLHttpRequest"]) + self.req.http.c.setopt(pycurl.HTTPHEADER, ["X-Requested-With: XMLHttpRequest"]) self.req.http.lastURL = pyfile.url self.load("http://www.wrzuc.to/ajax/server/prepair", post={"md5": data['md5']}) diff --git a/module/plugins/hoster/XHamsterCom.py b/module/plugins/hoster/XHamsterCom.py index 9004dbac0..a1711cb0e 100644 --- a/module/plugins/hoster/XHamsterCom.py +++ b/module/plugins/hoster/XHamsterCom.py @@ -1,8 +1,7 @@ # -*- coding: utf-8 -*- import re - -from urllib import unquote +import urllib from module.common.json_layer import json_loads from module.plugins.Hoster import Hoster @@ -83,7 +82,7 @@ class XHamsterCom(Hoster): self.logDebug("long_url = " + long_url) else: if flashvars['file']: - file_url = unquote(flashvars['file']) + file_url = urllib.unquote(flashvars['file']) else: self.error(_("file_url not found")) diff --git a/module/plugins/hoster/XVideosCom.py b/module/plugins/hoster/XVideosCom.py index 9bb2da424..a8f291824 100644 --- a/module/plugins/hoster/XVideosCom.py +++ b/module/plugins/hoster/XVideosCom.py @@ -1,8 +1,7 @@ # -*- coding: utf-8 -*- import re - -from urllib import unquote +import urllib from module.plugins.Hoster import Hoster @@ -25,4 +24,4 @@ class XVideosCom(Hoster): re.search(r"<h2>([^<]+)<span", site).group(1), re.match(self.__pattern__, pyfile.url).group(1), ) - self.download(unquote(re.search(r"flv_url=([^&]+)&", site).group(1))) + self.download(urllib.unquote(re.search(r"flv_url=([^&]+)&", site).group(1))) diff --git a/module/plugins/hoster/Xdcc.py b/module/plugins/hoster/Xdcc.py index b77e7c1da..d167e4cab 100644 --- a/module/plugins/hoster/Xdcc.py +++ b/module/plugins/hoster/Xdcc.py @@ -6,8 +6,6 @@ import struct import sys import time -from os import makedirs -from os.path import exists, join from select import select from module.plugins.Hoster import Hoster diff --git a/module/plugins/hoster/YourfilesTo.py b/module/plugins/hoster/YourfilesTo.py index fd65a6a41..d0316d3ac 100644 --- a/module/plugins/hoster/YourfilesTo.py +++ b/module/plugins/hoster/YourfilesTo.py @@ -1,8 +1,6 @@ # -*- coding: utf-8 -*- -import re - -from urllib import unquote +import reimport urllib from module.plugins.Hoster import Hoster @@ -62,7 +60,7 @@ class YourfilesTo(Hoster): url = re.search(r"var bla = '(.*?)';", self.html) if url: url = url.group(1) - url = unquote(url.replace("http://http:/http://", "http://").replace("dumdidum", "")) + url = urllib.unquote(url.replace("http://http:/http://", "http://").replace("dumdidum", "")) return url else: self.error(_("Absolute filepath not found")) diff --git a/module/plugins/hoster/YoutubeCom.py b/module/plugins/hoster/YoutubeCom.py index 06f135c60..e2ab146a9 100644 --- a/module/plugins/hoster/YoutubeCom.py +++ b/module/plugins/hoster/YoutubeCom.py @@ -2,9 +2,7 @@ import os import re -import subprocess - -from urllib import unquote +import subprocessimport urllib from module.plugins.Hoster import Hoster from module.plugins.internal.SimpleHoster import replace_patterns @@ -117,7 +115,7 @@ class YoutubeCom(Hoster): streams = re.search(r'"url_encoded_fmt_stream_map":"(.+?)",', html).group(1) streams = [x.split('\u0026') for x in streams.split(',')] streams = [dict((y.split('=', 1)) for y in x) for x in streams] - streams = [(int(x['itag']), unquote(x['url'])) for x in streams] + streams = [(int(x['itag']), urllib.unquote(x['url'])) for x in streams] # self.logDebug("Found links: %s" % streams) diff --git a/module/plugins/hoster/ZeveraCom.py b/module/plugins/hoster/ZeveraCom.py index e0362ce36..617e00e58 100644 --- a/module/plugins/hoster/ZeveraCom.py +++ b/module/plugins/hoster/ZeveraCom.py @@ -1,8 +1,7 @@ # -*- coding: utf-8 -*- import re - -from urlparse import urljoin +import urlparse from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo -- cgit v1.2.3 From 11b355093b8a1f73718d36fd043042abbfdcc0d3 Mon Sep 17 00:00:00 2001 From: GammaC0de <GammaC0de@users.noreply.github.com> Date: Sun, 3 May 2015 16:13:28 +0300 Subject: new hoster SizedriveCom --- module/plugins/hoster/SizedriveCom.py | 42 +++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 module/plugins/hoster/SizedriveCom.py (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/SizedriveCom.py b/module/plugins/hoster/SizedriveCom.py new file mode 100644 index 000000000..13a29eb99 --- /dev/null +++ b/module/plugins/hoster/SizedriveCom.py @@ -0,0 +1,42 @@ +# -*- coding: utf-8 -*- + +import re + +from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo + + +class SizedriveCom(SimpleHoster): + __name__ = "SizedriveCom" + __type__ = "hoster" + __version__ = "0.01" + + __pattern__ = r'http://(?:www\.)?sizedrive\.com/[rd]/(?P<ID>\w+)' + + __description__ = """Sizedrive.com hoster plugin""" + __license__ = "GPLv3" + __authors__ = [("GammaC0de", None)] + + + OFFLINE_PATTERN = r'ARQUIVO DELATADO POR' + NAME_PATTERN = r'<b>Nome:</b> (?P<N>.+)<' + SIZE_PATTERN = r'<b>Tamanho:</b>(?P<S>[\d.,]+) (?P<U>[\w^_]+)' + + def setup(self): + self.resumeDownload = False + self.multiDL = False + self.chunkLimit = 1 + + + def handleFree(self, pyfile): + self.wait(5) + self.html = self.load("http://www.sizedrive.com/getdownload.php", + post={'id': self.info['pattern']['ID']}) + + m = re.search(r'<span id="boton_download" ><a href="(.+?)"', self.html) + if m: + self.link = m.group(1) + else: + self.error(_("Download link not found")) + + +getInfo = create_getInfo(SizedriveCom) -- cgit v1.2.3 From 55717d96c0ef590f9c224741415447b8adb12f95 Mon Sep 17 00:00:00 2001 From: Walter Purcaro <vuolter@users.noreply.github.com> Date: Mon, 4 May 2015 21:30:39 +0200 Subject: [SizedriveCom] Cleanup --- module/plugins/hoster/SizedriveCom.py | 7 +++---- module/plugins/hoster/ZippyshareCom.py | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/SizedriveCom.py b/module/plugins/hoster/SizedriveCom.py index 13a29eb99..3b9748fb6 100644 --- a/module/plugins/hoster/SizedriveCom.py +++ b/module/plugins/hoster/SizedriveCom.py @@ -17,9 +17,10 @@ class SizedriveCom(SimpleHoster): __authors__ = [("GammaC0de", None)] + NAME_PATTERN = r'>Nome:</b> (?P<N>.+?)<' + SIZE_PATTERN = r'>Tamanho:</b>(?P<S>[\d.,]+) (?P<U>[\w^_]+)' OFFLINE_PATTERN = r'ARQUIVO DELATADO POR' - NAME_PATTERN = r'<b>Nome:</b> (?P<N>.+)<' - SIZE_PATTERN = r'<b>Tamanho:</b>(?P<S>[\d.,]+) (?P<U>[\w^_]+)' + def setup(self): self.resumeDownload = False @@ -35,8 +36,6 @@ class SizedriveCom(SimpleHoster): m = re.search(r'<span id="boton_download" ><a href="(.+?)"', self.html) if m: self.link = m.group(1) - else: - self.error(_("Download link not found")) getInfo = create_getInfo(SizedriveCom) diff --git a/module/plugins/hoster/ZippyshareCom.py b/module/plugins/hoster/ZippyshareCom.py index fbac432cd..c47ac4fe1 100644 --- a/module/plugins/hoster/ZippyshareCom.py +++ b/module/plugins/hoster/ZippyshareCom.py @@ -66,7 +66,7 @@ class ZippyshareCom(SimpleHoster): initScripts = set() def replElementById(element): - id = element.group(1) # id might be either 'x' (a real id) or x (a variable) + id = element.group(1) # id might be either 'x' (a real id) or x (a variable) attr = element.group(4) # attr might be None varName = re.sub(r'-', '', 'GVAR[%s+"_%s"]' %(id, attr)) -- cgit v1.2.3 From f076e6c4d52bae232aa508c3afb6166d7ea9af2d Mon Sep 17 00:00:00 2001 From: Walter Purcaro <vuolter@users.noreply.github.com> Date: Mon, 4 May 2015 21:31:34 +0200 Subject: [GoogledriveCom][OneFichierCom][UlozTo] Reset DISPOSITION to False --- module/plugins/hoster/GoogledriveCom.py | 4 +++- module/plugins/hoster/OneFichierCom.py | 10 +++++----- module/plugins/hoster/UlozTo.py | 3 ++- 3 files changed, 10 insertions(+), 7 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/GoogledriveCom.py b/module/plugins/hoster/GoogledriveCom.py index 66f36e6c0..09c54a8da 100644 --- a/module/plugins/hoster/GoogledriveCom.py +++ b/module/plugins/hoster/GoogledriveCom.py @@ -12,7 +12,7 @@ from module.utils import html_unescape class GoogledriveCom(SimpleHoster): __name__ = "GoogledriveCom" __type__ = "hoster" - __version__ = "0.07" + __version__ = "0.08" __pattern__ = r'https?://(?:www\.)?drive\.google\.com/file/.+' __config__ = [("use_premium", "bool", "Use premium account if available", True)] @@ -22,6 +22,8 @@ class GoogledriveCom(SimpleHoster): __authors__ = [("zapp-brannigan", "fuerst.reinje@web.de")] + DISPOSITION = False #: Remove in 0.4.10 + NAME_PATTERN = r'"og:title" content="(?P<N>.*?)">' OFFLINE_PATTERN = r'align="center"><p class="errorMessage"' diff --git a/module/plugins/hoster/OneFichierCom.py b/module/plugins/hoster/OneFichierCom.py index 8a5fa9cae..4b947c554 100644 --- a/module/plugins/hoster/OneFichierCom.py +++ b/module/plugins/hoster/OneFichierCom.py @@ -8,7 +8,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class OneFichierCom(SimpleHoster): __name__ = "OneFichierCom" __type__ = "hoster" - __version__ = "0.83" + __version__ = "0.84" __pattern__ = r'https?://(?:www\.)?(?:(?P<ID1>\w+)\.)?(?P<HOST>1fichier\.com|alterupload\.com|cjoint\.net|d(es)?fichiers\.com|dl4free\.com|megadl\.fr|mesfichiers\.org|piecejointe\.net|pjointe\.com|tenvoi\.com)(?:/\?(?P<ID2>\w+))?' __config__ = [("use_premium", "bool", "Use premium account if available", True)] @@ -25,13 +25,13 @@ class OneFichierCom(SimpleHoster): ("Ludovic Lehmann", "ludo.lehmann@gmail.com")] - NAME_PATTERN = r'>FileName :</td>\s*<td.*>(?P<N>.+?)<' - SIZE_PATTERN = r'>Size :</td>\s*<td.*>(?P<S>[\d.,]+) (?P<U>[\w^_]+)' + COOKIES = [("1fichier.com", "LG", "en")] + DISPOSITION = False #: Remove in 0.4.10 + NAME_PATTERN = r'>FileName :</td>\s*<td.*>(?P<N>.+?)<' + SIZE_PATTERN = r'>Size :</td>\s*<td.*>(?P<S>[\d.,]+) (?P<U>[\w^_]+)' OFFLINE_PATTERN = r'File not found !\s*<' - COOKIES = [("1fichier.com", "LG", "en")] - WAIT_PATTERN = r'>You must wait \d+ minutes' diff --git a/module/plugins/hoster/UlozTo.py b/module/plugins/hoster/UlozTo.py index c48873387..b43ff8d92 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.08" + __version__ = "1.09" __pattern__ = r'http://(?:www\.)?(uloz\.to|ulozto\.(cz|sk|net)|bagruj\.cz|zachowajto\.pl)/(?:live/)?(?P<ID>\w+/[^/?]*)' __config__ = [("use_premium", "bool", "Use premium account if available", True)] @@ -34,6 +34,7 @@ class UlozTo(SimpleHoster): SIZE_REPLACEMENTS = [(r'([\d.]+)\s([kMG])B', convertDecimalPrefix)] CHECK_TRAFFIC = True + DISPOSITION = False #: Remove in 0.4.10 ADULT_PATTERN = r'<form action="(.+?)" method="post" id="frm-askAgeForm">' PASSWD_PATTERN = r'<div class="passwordProtectedFile">' -- cgit v1.2.3 From 44c994bbd576182c4a499c8c9292e2ef18d9a6b6 Mon Sep 17 00:00:00 2001 From: GammaC0de <GammaC0de@users.noreply.github.com> Date: Tue, 5 May 2015 21:10:14 +0300 Subject: Update YadiSk.py --- module/plugins/hoster/YadiSk.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/YadiSk.py b/module/plugins/hoster/YadiSk.py index ad63ffb32..54050fb9b 100644 --- a/module/plugins/hoster/YadiSk.py +++ b/module/plugins/hoster/YadiSk.py @@ -10,9 +10,9 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class YadiSk(SimpleHoster): __name__ = "YadiSk" __type__ = "hoster" - __version__ = "0.04" + __version__ = "0.05" - __pattern__ = r'https?://yadi\.sk/d/\w+' + __pattern__ = r'https?://yadi\.sk/d/.+' __description__ = """Yadi.sk hoster plugin""" __license__ = "GPLv3" -- cgit v1.2.3 From 5c153e02a6eaebb721c85202b54401fa2c1f08fc Mon Sep 17 00:00:00 2001 From: Walter Purcaro <vuolter@users.noreply.github.com> Date: Wed, 6 May 2015 00:14:25 +0200 Subject: [SimpleHoster] Fallback option --- module/plugins/hoster/YadiSk.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/YadiSk.py b/module/plugins/hoster/YadiSk.py index 54050fb9b..3b4c9d985 100644 --- a/module/plugins/hoster/YadiSk.py +++ b/module/plugins/hoster/YadiSk.py @@ -12,7 +12,7 @@ class YadiSk(SimpleHoster): __type__ = "hoster" __version__ = "0.05" - __pattern__ = r'https?://yadi\.sk/d/.+' + __pattern__ = r'https?://yadi\.sk/d/[\w-]+' __description__ = """Yadi.sk hoster plugin""" __license__ = "GPLv3" -- cgit v1.2.3 From 23ce82416f3a46295f8639dd72c2b265080497c1 Mon Sep 17 00:00:00 2001 From: lpiter <revelation@o2.pl> Date: Wed, 6 May 2015 21:56:44 +0200 Subject: Add Openload.io hoster plugin. --- module/plugins/hoster/OpenloadIo.py | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 module/plugins/hoster/OpenloadIo.py (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/OpenloadIo.py b/module/plugins/hoster/OpenloadIo.py new file mode 100644 index 000000000..c31b5b997 --- /dev/null +++ b/module/plugins/hoster/OpenloadIo.py @@ -0,0 +1,26 @@ +# -*- coding: utf-8 -*- + +from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo + + +class OpenloadIo(SimpleHoster): + __name__ = "OpenloadIo" + __type__ = "hoster" + __version__ = "0.01" + + __pattern__ = r'https?://(?:www\.)?openload\.io/f/\w{11}' + + __description__ = """Openload.io hoster plugin""" + __license__ = "GPLv3" + + NAME_PATTERN = r'<span id="filename">(?P<N>.+)</' + SIZE_PATTERN = r'<span class="count">(?P<S>[\d.,]+) (?P<U>[\w^_]+)<' + OFFLINE_PATTERN = r">(We can't find the file you are looking for)" + + LINK_FREE_PATTERN = r'id="realdownload"><a href="(https?://[\w\.]+\.openload\.io/dl/.*?)"' + + def setup(self): + self.multiDL = True + self.chunkLimit = 1 + +getInfo = create_getInfo(OpenloadIo) -- cgit v1.2.3 From b2fe8292de4390a34a552122ccc5f02aa1b06e5f Mon Sep 17 00:00:00 2001 From: GammaC0de <GammaC0de@users.noreply.github.com> Date: Fri, 8 May 2015 13:27:29 +0300 Subject: [FilefactoryCom] update OFFLINE_PATTERN --- module/plugins/hoster/FilefactoryCom.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/FilefactoryCom.py b/module/plugins/hoster/FilefactoryCom.py index 0a9d5e2cc..ea1a38b7a 100644 --- a/module/plugins/hoster/FilefactoryCom.py +++ b/module/plugins/hoster/FilefactoryCom.py @@ -20,7 +20,7 @@ def getInfo(urls): class FilefactoryCom(SimpleHoster): __name__ = "FilefactoryCom" __type__ = "hoster" - __version__ = "0.54" + __version__ = "0.55" __pattern__ = r'https?://(?:www\.)?filefactory\.com/(file|trafficshare/\w+)/\w+' __config__ = [("use_premium", "bool", "Use premium account if available", True)] @@ -32,7 +32,7 @@ class FilefactoryCom(SimpleHoster): INFO_PATTERN = r'<div id="file_name"[^>]*>\s*<h2>(?P<N>[^<]+)</h2>\s*<div id="file_info">\s*(?P<S>[\d.,]+) (?P<U>[\w^_]+) uploaded' - OFFLINE_PATTERN = r'<h2>File Removed</h2>|This file is no longer available' + OFFLINE_PATTERN = r'<h2>File Removed</h2>|This file is no longer available|Invalid Download Link' LINK_FREE_PATTERN = LINK_PREMIUM_PATTERN = r'"([^"]+filefactory\.com/get.+?)"' -- cgit v1.2.3 From 4bda1fc8a957daab0e3496cddaa4705785f48f19 Mon Sep 17 00:00:00 2001 From: GammaC0de <GammaC0de@users.noreply.github.com> Date: Fri, 8 May 2015 13:44:01 +0300 Subject: BillionuploadsCom out of bussiness --- module/plugins/hoster/BillionuploadsCom.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/BillionuploadsCom.py b/module/plugins/hoster/BillionuploadsCom.py index 7d7e2624a..248670489 100644 --- a/module/plugins/hoster/BillionuploadsCom.py +++ b/module/plugins/hoster/BillionuploadsCom.py @@ -3,10 +3,10 @@ from module.plugins.internal.XFSHoster import XFSHoster, create_getInfo -class BillionuploadsCom(XFSHoster): +class BillionuploadsCom(DeadHoster): __name__ = "BillionuploadsCom" __type__ = "hoster" - __version__ = "0.04" + __version__ = "0.05" __pattern__ = r'http://(?:www\.)?billionuploads\.com/\w{12}' @@ -15,8 +15,4 @@ class BillionuploadsCom(XFSHoster): __authors__ = [("zoidberg", "zoidberg@mujmail.cz")] - NAME_PATTERN = r'<td class="dofir" title="(?P<N>.+?)"' - SIZE_PATTERN = r'<td class="dofir">(?P<S>[\d.,]+) (?P<U>[\w^_]+)' - - getInfo = create_getInfo(BillionuploadsCom) -- cgit v1.2.3 From d5cee0bbabfd60e020cd2cd9248c41b913e438c3 Mon Sep 17 00:00:00 2001 From: Walter Purcaro <vuolter@users.noreply.github.com> Date: Sat, 9 May 2015 22:27:11 +0200 Subject: [UnrestrictLi] Mark as dead --- module/plugins/hoster/UnrestrictLi.py | 74 ++--------------------------------- 1 file changed, 3 insertions(+), 71 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/UnrestrictLi.py b/module/plugins/hoster/UnrestrictLi.py index dab5abd44..d3854db31 100644 --- a/module/plugins/hoster/UnrestrictLi.py +++ b/module/plugins/hoster/UnrestrictLi.py @@ -1,86 +1,18 @@ # -*- coding: utf-8 -*- -import re +from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo -from module.common.json_layer import json_loads -from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo -from module.plugins.internal.SimpleHoster import secondsToMidnight - -class UnrestrictLi(MultiHoster): +class UnrestrictLi(DeadHoster): __name__ = "UnrestrictLi" __type__ = "hoster" - __version__ = "0.22" + __version__ = "0.23" __pattern__ = r'https?://(?:www\.)?(unrestrict|unr)\.li/dl/[\w^_]+' - __config__ = [("use_premium", "bool", "Use premium account if available", True)] __description__ = """Unrestrict.li multi-hoster plugin""" __license__ = "GPLv3" __authors__ = [("stickell", "l.stickell@yahoo.it")] - LOGIN_ACCOUNT = False - - - def setup(self): - self.chunkLimit = 16 - self.resumeDownload = True - - - def handleFree(self, pyfile): - for _i in xrange(5): - self.html = self.load('https://unrestrict.li/unrestrict.php', - post={'link': pyfile.url, 'domain': 'long'}) - - self.logDebug("JSON data: " + self.html) - - if self.html: - break - else: - self.logInfo(_("Unable to get API data, waiting 1 minute and retry")) - self.retry(5, 60, "Unable to get API data") - - if 'Expired session' in self.html \ - or ("You are not allowed to download from this host" in self.html and self.premium): - self.account.relogin(self.user) - self.retry() - - elif "File offline" in self.html: - self.offline() - - elif "You are not allowed to download from this host" in self.html: - self.fail(_("You are not allowed to download from this host")) - - elif "You have reached your daily limit for this host" in self.html: - self.logWarning(_("Reached daily limit for this host")) - self.retry(5, secondsToMidnight(gmt=2), "Daily limit for this host reached") - - elif "ERROR_HOSTER_TEMPORARILY_UNAVAILABLE" in self.html: - self.logInfo(_("Hoster temporarily unavailable, waiting 1 minute and retry")) - self.retry(5, 60, "Hoster is temporarily unavailable") - - self.html = json_loads(self.html) - self.link = self.html.keys()[0] - self.api_data = self.html[self.link] - - if hasattr(self, 'api_data'): - self.setNameSize() - - - def checkFile(self, rules={}): - super(UnrestrictLi, self).checkFile(rules) - - if self.getConfig('history'): - self.load("https://unrestrict.li/history/", get={'delete': "all"}) - self.logInfo(_("Download history deleted")) - - - def setNameSize(self): - if 'name' in self.api_data: - self.pyfile.name = self.api_data['name'] - if 'size' in self.api_data: - self.pyfile.size = self.api_data['size'] - - getInfo = create_getInfo(UnrestrictLi) -- cgit v1.2.3 From bca7f99801e91e8ee85fe45e8d36dbcf9078abac Mon Sep 17 00:00:00 2001 From: GammaC0de <GammaC0de@users.noreply.github.com> Date: Sat, 9 May 2015 23:32:40 +0300 Subject: Update BillionuploadsCom.py --- module/plugins/hoster/BillionuploadsCom.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/BillionuploadsCom.py b/module/plugins/hoster/BillionuploadsCom.py index 248670489..efe2c22a3 100644 --- a/module/plugins/hoster/BillionuploadsCom.py +++ b/module/plugins/hoster/BillionuploadsCom.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.XFSHoster import XFSHoster, create_getInfo +from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo class BillionuploadsCom(DeadHoster): __name__ = "BillionuploadsCom" __type__ = "hoster" - __version__ = "0.05" + __version__ = "0.06" __pattern__ = r'http://(?:www\.)?billionuploads\.com/\w{12}' -- cgit v1.2.3 From ac3211e9d24e474a6b46c2b8b63f09d8ac928fca Mon Sep 17 00:00:00 2001 From: Walter Purcaro <vuolter@users.noreply.github.com> Date: Mon, 11 May 2015 23:29:23 +0200 Subject: [SmoozedCom] Fix https://github.com/pyload/pyload/issues/1399 (2) --- module/plugins/hoster/SmoozedCom.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/SmoozedCom.py b/module/plugins/hoster/SmoozedCom.py index 5d453cf57..9ae12f145 100644 --- a/module/plugins/hoster/SmoozedCom.py +++ b/module/plugins/hoster/SmoozedCom.py @@ -7,7 +7,7 @@ from module.plugins.internal.MultiHoster import MultiHoster class SmoozedCom(MultiHoster): __name__ = "SmoozedCom" __type__ = "hoster" - __version__ = "0.04" + __version__ = "0.05" __pattern__ = r'^unmatchable$' #: Since we want to allow the user to specify the list of hoster to use we let MultiHoster.coreReady __config__ = [("use_premium", "bool", "Use premium account if available", True)] @@ -17,7 +17,7 @@ class SmoozedCom(MultiHoster): __authors__ = [("", "")] - def handlePremium(self, pyfile): + def handleFree(self, pyfile): # In some cases hostsers do not supply us with a filename at download, so we # are going to set a fall back filename (e.g. for freakshare or xfileshare) pyfile.name = pyfile.name.split('/').pop() # Remove everthing before last slash -- cgit v1.2.3 From ebe4844903420d8f9527ec93fd1f6bf6ccfdaba5 Mon Sep 17 00:00:00 2001 From: GammaC0de <GammaC0de@users.noreply.github.com> Date: Sat, 16 May 2015 01:24:32 +0300 Subject: Update OboomCom.py --- module/plugins/hoster/OboomCom.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/OboomCom.py b/module/plugins/hoster/OboomCom.py index 725763345..fa15cfb09 100644 --- a/module/plugins/hoster/OboomCom.py +++ b/module/plugins/hoster/OboomCom.py @@ -13,9 +13,9 @@ from module.plugins.internal.CaptchaService import ReCaptcha class OboomCom(Hoster): __name__ = "OboomCom" __type__ = "hoster" - __version__ = "0.31" + __version__ = "0.32" - __pattern__ = r'https?://(?:www\.)?oboom\.com/(#(id=|/)?)?(?P<ID>\w{8})' + __pattern__ = r'https?://(?:www\.)?oboom\.com/(?:#(?:id=|/)?)?(?P<ID>\w{8})' __description__ = """oboom.com hoster plugin""" __license__ = "GPLv3" @@ -31,6 +31,7 @@ class OboomCom(Hoster): def process(self, pyfile): + self.html = self.load(pyfile.url) self.pyfile.url.replace(".com/#id=", ".com/#") self.pyfile.url.replace(".com/#/", ".com/#") self.getFileId(self.pyfile.url) -- cgit v1.2.3 From 9ec411e0ccd1b8cb40214f78197184adaaf9382b Mon Sep 17 00:00:00 2001 From: GammaC0de <GammaC0de@users.noreply.github.com> Date: Sat, 16 May 2015 02:18:58 +0300 Subject: Update OboomCom.py --- module/plugins/hoster/OboomCom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/OboomCom.py b/module/plugins/hoster/OboomCom.py index fa15cfb09..cfc448ff0 100644 --- a/module/plugins/hoster/OboomCom.py +++ b/module/plugins/hoster/OboomCom.py @@ -31,9 +31,9 @@ class OboomCom(Hoster): def process(self, pyfile): - self.html = self.load(pyfile.url) self.pyfile.url.replace(".com/#id=", ".com/#") self.pyfile.url.replace(".com/#/", ".com/#") + self.html = self.load(pyfile.url) self.getFileId(self.pyfile.url) self.getSessionToken() self.getFileInfo(self.sessionToken, self.fileId) -- cgit v1.2.3 From fa7c07a2c123c040364f0f01eb0291ba197ec878 Mon Sep 17 00:00:00 2001 From: Walter Purcaro <vuolter@users.noreply.github.com> Date: Sat, 16 May 2015 01:56:35 +0200 Subject: [Ftp] Fixup --- module/plugins/hoster/Ftp.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/Ftp.py b/module/plugins/hoster/Ftp.py index 5258a1c27..295955cbe 100644 --- a/module/plugins/hoster/Ftp.py +++ b/module/plugins/hoster/Ftp.py @@ -11,7 +11,7 @@ from module.plugins.Hoster import Hoster class Ftp(Hoster): __name__ = "Ftp" __type__ = "hoster" - __version__ = "0.51" + __version__ = "0.52" __pattern__ = r'(?:ftps?|sftp)://([\w.-]+(:[\w.-]+)?@)?[\w.-]+(:\d+)?/.+' @@ -66,7 +66,7 @@ class Ftp(Hoster): #Naive ftp directory listing if re.search(r'^25\d.*?"', self.req.http.header, re.M): pyfile.url = pyfile.url.rstrip('/') - pkgname = "/".join(pyfile.package().name, urlparse.urlparse(pyfile.url).path.rpartition('/')[2]) + pkgname = "/".join([pyfile.package().name, urlparse.urlparse(pyfile.url).path.rpartition('/')[2]]) pyfile.url += '/' self.req.http.c.setopt(48, 1) # CURLOPT_DIRLISTONLY res = self.load(pyfile.url, decode=False) -- cgit v1.2.3 From 14600aa22812176c4f61ffcfd4ae3b0ee62ae368 Mon Sep 17 00:00:00 2001 From: Walter Purcaro <vuolter@users.noreply.github.com> Date: Mon, 18 May 2015 05:25:09 +0200 Subject: Spare plugins updates --- module/plugins/hoster/BezvadataCz.py | 6 +++--- module/plugins/hoster/CatShareNet.py | 10 +--------- module/plugins/hoster/CloudzillaTo.py | 13 +++++++++---- module/plugins/hoster/DateiTo.py | 16 ++-------------- module/plugins/hoster/GigapetaCom.py | 17 +++++------------ module/plugins/hoster/NitroflareCom.py | 26 +------------------------- 6 files changed, 21 insertions(+), 67 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/BezvadataCz.py b/module/plugins/hoster/BezvadataCz.py index fbb17635c..b47c2902d 100644 --- a/module/plugins/hoster/BezvadataCz.py +++ b/module/plugins/hoster/BezvadataCz.py @@ -8,7 +8,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class BezvadataCz(SimpleHoster): __name__ = "BezvadataCz" __type__ = "hoster" - __version__ = "0.26" + __version__ = "0.27" __pattern__ = r'http://(?:www\.)?bezvadata\.cz/stahnout/.+' __config__ = [("use_premium", "bool", "Use premium account if available", True)] @@ -84,8 +84,8 @@ class BezvadataCz(SimpleHoster): self.longWait(5 * 60, 24) #: parallel dl limit elif '<div class="infobox' in self.html: self.tempOffline() - - self.info.pop('error', None) + else: + return super(BezvadataCz, self).checkErrors() def loadcaptcha(self, data, *args, **kwargs): diff --git a/module/plugins/hoster/CatShareNet.py b/module/plugins/hoster/CatShareNet.py index 9e3f28cfa..868be4033 100644 --- a/module/plugins/hoster/CatShareNet.py +++ b/module/plugins/hoster/CatShareNet.py @@ -9,7 +9,7 @@ from module.plugins.internal.CaptchaService import ReCaptcha class CatShareNet(SimpleHoster): __name__ = "CatShareNet" __type__ = "hoster" - __version__ = "0.13" + __version__ = "0.14" __pattern__ = r'http://(?:www\.)?catshare\.net/\w{16}' __config__ = [("use_premium", "bool", "Use premium account if available", True)] @@ -38,14 +38,6 @@ class CatShareNet(SimpleHoster): self.resumeDownload = True - def checkErrors(self): - m = re.search(self.IP_BLOCKED_PATTERN, self.html) - if m: - self.fail(_("Only connections from Polish IP address are allowed")) - - return super(CatShareNet, self).checkErrors() - - def handleFree(self, pyfile): recaptcha = ReCaptcha(self) diff --git a/module/plugins/hoster/CloudzillaTo.py b/module/plugins/hoster/CloudzillaTo.py index 362a8d953..09453137d 100644 --- a/module/plugins/hoster/CloudzillaTo.py +++ b/module/plugins/hoster/CloudzillaTo.py @@ -8,7 +8,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class CloudzillaTo(SimpleHoster): __name__ = "CloudzillaTo" __type__ = "hoster" - __version__ = "0.06" + __version__ = "0.07" __pattern__ = r'http://(?:www\.)?cloudzilla\.to/share/file/(?P<ID>[\w^_]+)' __config__ = [("use_premium", "bool", "Use premium account if available", True)] @@ -25,12 +25,17 @@ class CloudzillaTo(SimpleHoster): def checkErrors(self): - m = re.search(self.PASSWORD_PATTERN, self.html) - if m: - self.html = self.load(self.pyfile.url, get={'key': self.getPassword()}) + if re.search(self.PASSWORD_PATTERN, self.html): + pw = self.getPassword() + if pw: + self.html = self.load(self.pyfile.url, get={'key': pw}) + else: + self.fail(_("Missing password")) if re.search(self.PASSWORD_PATTERN, self.html): self.retry(reason="Wrong password") + else: + return super(CloudzillaTo, self).checkErrors() def handleFree(self, pyfile): diff --git a/module/plugins/hoster/DateiTo.py b/module/plugins/hoster/DateiTo.py index 71a9eb4bf..f0ad95d1e 100644 --- a/module/plugins/hoster/DateiTo.py +++ b/module/plugins/hoster/DateiTo.py @@ -9,7 +9,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class DateiTo(SimpleHoster): __name__ = "DateiTo" __type__ = "hoster" - __version__ = "0.07" + __version__ = "0.08" __pattern__ = r'http://(?:www\.)?datei\.to/datei/(?P<ID>\w+)\.html' __config__ = [("use_premium", "bool", "Use premium account if available", True)] @@ -24,7 +24,7 @@ class DateiTo(SimpleHoster): OFFLINE_PATTERN = r'>Datei wurde nicht gefunden<|>Bitte wähle deine Datei aus... <' WAIT_PATTERN = r'countdown\({seconds: (\d+)' - MULTIDL_PATTERN = r'>Du lädst bereits eine Datei herunter<' + DOWNLOAD_PATTERN = r'>Du lädst bereits eine Datei herunter' DATA_PATTERN = r'url: "(.*?)", data: "(.*?)",' @@ -60,18 +60,6 @@ class DateiTo(SimpleHoster): self.link = self.html - def checkErrors(self): - m = re.search(self.MULTIDL_PATTERN, self.html) - if m: - m = re.search(self.WAIT_PATTERN, self.html) - wait_time = int(m.group(1)) if m else 30 - - errmsg = self.info['error'] = _("Parallel downloads") - self.retry(wait_time=wait_time, reason=errmsg) - - self.info.pop('error', None) - - def doWait(self): m = re.search(self.WAIT_PATTERN, self.html) wait_time = int(m.group(1)) if m else 30 diff --git a/module/plugins/hoster/GigapetaCom.py b/module/plugins/hoster/GigapetaCom.py index e4d0601fc..c2feeb6f8 100644 --- a/module/plugins/hoster/GigapetaCom.py +++ b/module/plugins/hoster/GigapetaCom.py @@ -10,7 +10,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class GigapetaCom(SimpleHoster): __name__ = "GigapetaCom" __type__ = "hoster" - __version__ = "0.03" + __version__ = "0.04" __pattern__ = r'http://(?:www\.)?gigapeta\.com/dl/\w+' __config__ = [("use_premium", "bool", "Use premium account if available", True)] @@ -20,10 +20,12 @@ class GigapetaCom(SimpleHoster): __authors__ = [("zoidberg", "zoidberg@mujmail.cz")] - NAME_PATTERN = r'<img src=".*" alt="file" />-->\s*(?P<N>.*?)\s*</td>' - SIZE_PATTERN = r'<th>\s*Size\s*</th>\s*<td>\s*(?P<S>.*?)\s*</td>' + NAME_PATTERN = r'<img src=".*" alt="file" />-->\s*(?P<N>.*?)\s*</td>' + SIZE_PATTERN = r'<th>\s*Size\s*</th>\s*<td>\s*(?P<S>.*?)\s*</td>' OFFLINE_PATTERN = r'<div id="page_error">' + DOWNLOAD_PATTERN = r'"All threads for IP' + COOKIES = [("gigapeta.com", "lang", "us")] @@ -54,13 +56,4 @@ class GigapetaCom(SimpleHoster): self.req.http.c.setopt(pycurl.FOLLOWLOCATION, 1) - def checkErrors(self): - if "All threads for IP" in self.html: - self.logDebug("Your IP is already downloading a file") - self.wait(5 * 60, True) - self.retry() - - self.info.pop('error', None) - - getInfo = create_getInfo(GigapetaCom) diff --git a/module/plugins/hoster/NitroflareCom.py b/module/plugins/hoster/NitroflareCom.py index 40bf0749f..e10bf130b 100644 --- a/module/plugins/hoster/NitroflareCom.py +++ b/module/plugins/hoster/NitroflareCom.py @@ -9,7 +9,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster class NitroflareCom(SimpleHoster): __name__ = "NitroflareCom" __type__ = "hoster" - __version__ = "0.09" + __version__ = "0.10" __pattern__ = r'https?://(?:www\.)?nitroflare\.com/view/(?P<ID>[\w^_]+)' __config__ = [("use_premium", "bool", "Use premium account if available", True)] @@ -34,30 +34,6 @@ class NitroflareCom(SimpleHoster): ERROR_PATTERN = r'downloading is not possible' - def checkErrors(self): - if not self.html: - return - - if not self.premium and re.search(self.PREMIUM_ONLY_PATTERN, self.html): - self.fail(_("Link require a premium account to be handled")) - - elif hasattr(self, 'WAIT_PATTERN'): - m = re.search(self.WAIT_PATTERN, self.html) - if m: - wait_time = sum(int(v) * {"hr": 3600, "hour": 3600, "min": 60, "sec": 1}[u.lower()] for v, u in - re.findall(r'(\d+)\s*(hr|hour|min|sec)', m.group(0), re.I)) - self.wait(wait_time, wait_time > 300) - return - - elif hasattr(self, 'ERROR_PATTERN'): - m = re.search(self.ERROR_PATTERN, self.html) - if m: - errmsg = self.info['error'] = m.group(1) - self.error(errmsg) - - self.info.pop('error', None) - - def handleFree(self, pyfile): # used here to load the cookies which will be required later self.load(pyfile.url, post={'goToFreePage': ""}) -- cgit v1.2.3 From 339b2e07d78b15ca014ee12f1501cdb235d9b064 Mon Sep 17 00:00:00 2001 From: Walter Purcaro <vuolter@users.noreply.github.com> Date: Mon, 18 May 2015 11:50:43 +0200 Subject: [SimpleHoster] Fix create_getInfo --- module/plugins/hoster/ShareonlineBiz.py | 8 +++----- module/plugins/hoster/UploadedTo.py | 4 ++-- 2 files changed, 5 insertions(+), 7 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/ShareonlineBiz.py b/module/plugins/hoster/ShareonlineBiz.py index 505222fce..9d0cb631b 100644 --- a/module/plugins/hoster/ShareonlineBiz.py +++ b/module/plugins/hoster/ShareonlineBiz.py @@ -36,15 +36,13 @@ class ShareonlineBiz(SimpleHoster): @classmethod - def getInfo(cls, url="", html=""): - info = {'name': urlparse.urlparse(urllib.unquote(url)).path.split('/')[-1] or _("Unknown"), 'size': 0, 'status': 3 if url else 1, 'url': url} + def apiInfo(cls, url): + info = super(ShareonlineBiz, cls).apiInfo(url) if url: - info['pattern'] = re.match(cls.__pattern__, url).groupdict() - field = getURL("http://api.share-online.biz/linkcheck.php", get={'md5': "1"}, - post={'links': info['pattern']['ID']}, + post={'links': re.match(cls.__pattern__, url).group("ID")}, decode=True).split(";") if field[1] == "OK": diff --git a/module/plugins/hoster/UploadedTo.py b/module/plugins/hoster/UploadedTo.py index 75710ea8b..669694b22 100644 --- a/module/plugins/hoster/UploadedTo.py +++ b/module/plugins/hoster/UploadedTo.py @@ -11,7 +11,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class UploadedTo(SimpleHoster): __name__ = "UploadedTo" __type__ = "hoster" - __version__ = "0.87" + __version__ = "0.88" __pattern__ = r'https?://(?:www\.)?(uploaded\.(to|net)|ul\.to)(/file/|/?\?id=|.*?&id=|/)(?P<ID>\w+)' __config__ = [("use_premium", "bool", "Use premium account if available", True)] @@ -36,7 +36,7 @@ class UploadedTo(SimpleHoster): @classmethod - def apiInfo(cls, url="", get={}, post={}): + def apiInfo(cls, url): info = super(UploadedTo, cls).apiInfo(url) for _i in xrange(5): -- cgit v1.2.3 From 0aa29b3284c28079cc8da3d8774bd111e6cf4abc Mon Sep 17 00:00:00 2001 From: Walter Purcaro <vuolter@users.noreply.github.com> Date: Mon, 18 May 2015 12:45:08 +0200 Subject: [UptoboxCom] Set LOGIN_ACCOUNT to True --- module/plugins/hoster/UptoboxCom.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/UptoboxCom.py b/module/plugins/hoster/UptoboxCom.py index 991bc640e..4dc3c07b9 100644 --- a/module/plugins/hoster/UptoboxCom.py +++ b/module/plugins/hoster/UptoboxCom.py @@ -6,7 +6,7 @@ from module.plugins.internal.XFSHoster import XFSHoster, create_getInfo class UptoboxCom(XFSHoster): __name__ = "UptoboxCom" __type__ = "hoster" - __version__ = "0.18" + __version__ = "0.19" __pattern__ = r'https?://(?:www\.)?(uptobox|uptostream)\.com/\w{12}' @@ -15,6 +15,8 @@ class UptoboxCom(XFSHoster): __authors__ = [("Walter Purcaro", "vuolter@gmail.com")] + LOGIN_ACCOUNT = True + INFO_PATTERN = r'"para_title">(?P<N>.+) \((?P<S>[\d.,]+) (?P<U>[\w^_]+)\)' OFFLINE_PATTERN = r'>(File not found|Access Denied|404 Not Found)' TEMP_OFFLINE_PATTERN = r'>Service Unavailable' -- cgit v1.2.3 From 9bb3bff1a97c11ee887446d24015d0def499e18c Mon Sep 17 00:00:00 2001 From: Walter Purcaro <vuolter@users.noreply.github.com> Date: Fri, 22 May 2015 22:49:11 +0200 Subject: [SimpleHoster] Fix captcha retrying --- module/plugins/hoster/NitroflareCom.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/NitroflareCom.py b/module/plugins/hoster/NitroflareCom.py index e10bf130b..1d1349a50 100644 --- a/module/plugins/hoster/NitroflareCom.py +++ b/module/plugins/hoster/NitroflareCom.py @@ -27,8 +27,6 @@ class NitroflareCom(SimpleHoster): LINK_FREE_PATTERN = r'(https?://[\w\-]+\.nitroflare\.com/.+?)"' - RECAPTCHA_KEY = "6Lenx_USAAAAAF5L1pmTWvWcH73dipAEzNnmNLgy" - PREMIUM_ONLY_PATTERN = r'This file is available with Premium only' WAIT_PATTERN = r'You have to wait .+?<' ERROR_PATTERN = r'downloading is not possible' @@ -70,8 +68,4 @@ class NitroflareCom(SimpleHoster): self.logWarning("Captcha unfilled") return - m = re.search(self.LINK_FREE_PATTERN, self.html) - if m: - self.link = m.group(1) - else: - self.logError("Unable to detect direct link") + return super(NitroflareCom, self).handleFree(pyfile) -- cgit v1.2.3 From 1293f4c3aaf0744b98fcd538bd2ddb8cb1d1733c Mon Sep 17 00:00:00 2001 From: Walter Purcaro <vuolter@users.noreply.github.com> Date: Fri, 22 May 2015 23:26:46 +0200 Subject: [XFSHoster] Handle videoplayer --- module/plugins/hoster/ExashareCom.py | 1 - module/plugins/hoster/StreamcloudEu.py | 2 -- 2 files changed, 3 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/ExashareCom.py b/module/plugins/hoster/ExashareCom.py index 536c09b6d..d70ca6d3a 100644 --- a/module/plugins/hoster/ExashareCom.py +++ b/module/plugins/hoster/ExashareCom.py @@ -18,7 +18,6 @@ class ExashareCom(XFSHoster): INFO_PATTERN = r'>(?P<NAME>.+?)<small>\( (?P<S>[\d.,]+) (?P<U>[\w^_]+)' - LINK_FREE_PATTERN = r'file: "(.+?)"' def setup(self): diff --git a/module/plugins/hoster/StreamcloudEu.py b/module/plugins/hoster/StreamcloudEu.py index 54f430508..0f8c08ad9 100644 --- a/module/plugins/hoster/StreamcloudEu.py +++ b/module/plugins/hoster/StreamcloudEu.py @@ -19,8 +19,6 @@ class StreamcloudEu(XFSHoster): WAIT_PATTERN = r'var count = (\d+)' - LINK_PATTERN = r'file: "(http://(stor|cdn)\d+\.streamcloud\.eu:?\d*/.*/video\.(mp4|flv))",' - def setup(self): self.multiDL = True -- cgit v1.2.3 From c6809b5fdd2a8a5cf62d23be591e488dd9264281 Mon Sep 17 00:00:00 2001 From: Walter Purcaro <vuolter@users.noreply.github.com> Date: Fri, 22 May 2015 23:34:01 +0200 Subject: Tiny code cosmetics --- module/plugins/hoster/MegaRapidCz.py | 2 ++ module/plugins/hoster/WebshareCz.py | 6 ++---- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/MegaRapidCz.py b/module/plugins/hoster/MegaRapidCz.py index 59fb8251e..e17dd4730 100644 --- a/module/plugins/hoster/MegaRapidCz.py +++ b/module/plugins/hoster/MegaRapidCz.py @@ -59,7 +59,9 @@ class MegaRapidCz(SimpleHoster): if re.search(self.ERR_LOGIN_PATTERN, self.html): self.relogin(self.user) self.retry(wait_time=60, reason=_("User login failed")) + elif re.search(self.ERR_CREDIT_PATTERN, self.html): self.fail(_("Not enough credit left")) + else: self.fail(_("Download link not found")) diff --git a/module/plugins/hoster/WebshareCz.py b/module/plugins/hoster/WebshareCz.py index 59f61dc87..ae670c8d4 100644 --- a/module/plugins/hoster/WebshareCz.py +++ b/module/plugins/hoster/WebshareCz.py @@ -51,10 +51,8 @@ class WebshareCz(SimpleHoster): self.logDebug("API data: " + api_data) m = re.search('<link>(.+)</link>', api_data) - if m is None: - self.error(_("Unable to detect direct link")) - - self.link = m.group(1) + if m: + self.link = m.group(1) def handlePremium(self, pyfile): -- cgit v1.2.3 From 6f7a8c2d48ffb8dcf6b00eef2dd48df0a5d84e3b Mon Sep 17 00:00:00 2001 From: Walter Purcaro <vuolter@users.noreply.github.com> Date: Sun, 24 May 2015 02:54:59 +0200 Subject: [MediafireCom] ReCaptcha --- module/plugins/hoster/MediafireCom.py | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/MediafireCom.py b/module/plugins/hoster/MediafireCom.py index c022918ae..0e63963d3 100644 --- a/module/plugins/hoster/MediafireCom.py +++ b/module/plugins/hoster/MediafireCom.py @@ -1,13 +1,13 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.CaptchaService import SolveMedia +from module.plugins.internal.CaptchaService import SolveMedia, ReCaptcha from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class MediafireCom(SimpleHoster): __name__ = "MediafireCom" __type__ = "hoster" - __version__ = "0.86" + __version__ = "0.87" __pattern__ = r'https?://(?:www\.)?mediafire\.com/(file/|view/\??|download(\.php\?|/)|\?)\w{15}' __config__ = [("use_premium", "bool", "Use premium account if available", True)] @@ -34,16 +34,30 @@ class MediafireCom(SimpleHoster): self.multiDL = True - def handleFree(self, pyfile): + def handleCaptcha(self): solvemedia = SolveMedia(self) captcha_key = solvemedia.detect_key() if captcha_key: response, challenge = solvemedia.challenge(captcha_key) - self.html = self.load(pyfile.url, + self.html = self.load(self.pyfile.url, post={'adcopy_challenge': challenge, 'adcopy_response' : response}, decode=True) + return + + recaptcha = ReCaptcha(self) + captcha_key = recaptcha.detect_key() + + if captcha_key: + response, challenge = recaptcha.challenge(captcha_key) + self.html = self.load(self.pyfile.url, + post={'g-recaptcha-response': response}, + decode=True) + + + def handleFree(self, pyfile): + self.handleCaptcha() if self.PASSWORD_PATTERN in self.html: password = self.getPassword() -- cgit v1.2.3 From 3d1067556e9c2ca99e8479e36699af6436b3f6e3 Mon Sep 17 00:00:00 2001 From: Walter Purcaro <vuolter@users.noreply.github.com> Date: Sun, 24 May 2015 04:57:11 +0200 Subject: [ShareonlineBiz] Fix https://github.com/pyload/pyload/issues/1424 --- module/plugins/hoster/ShareonlineBiz.py | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/ShareonlineBiz.py b/module/plugins/hoster/ShareonlineBiz.py index 9d0cb631b..a260f39f7 100644 --- a/module/plugins/hoster/ShareonlineBiz.py +++ b/module/plugins/hoster/ShareonlineBiz.py @@ -13,7 +13,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class ShareonlineBiz(SimpleHoster): __name__ = "ShareonlineBiz" __type__ = "hoster" - __version__ = "0.49" + __version__ = "0.50" __pattern__ = r'https?://(?:www\.)?(share-online\.biz|egoshare\.com)/(download\.php\?id=|dl/)(?P<ID>\w+)' __config__ = [("use_premium", "bool", "Use premium account if available", True)] @@ -41,19 +41,23 @@ class ShareonlineBiz(SimpleHoster): if url: field = getURL("http://api.share-online.biz/linkcheck.php", - get={'md5': "1"}, - post={'links': re.match(cls.__pattern__, url).group("ID")}, + get={'md5' : "1", + 'links': re.match(cls.__pattern__, url).group("ID")}, decode=True).split(";") - if field[1] == "OK": - info['fileid'] = field[0] - info['status'] = 2 - info['name'] = field[2] - info['size'] = field[3] #: in bytes - info['md5'] = field[4].strip().lower().replace("\n\n", "") #: md5 + try: + if field[1] == "OK": + info['fileid'] = field[0] + info['status'] = 2 + info['name'] = field[2] + info['size'] = field[3] #: in bytes + info['md5'] = field[4].strip().lower().replace("\n\n", "") #: md5 - elif field[1] in ("DELETED", "NOT FOUND"): - info['status'] = 1 + elif field[1] in ("DELETED", "NOT FOUND"): + info['status'] = 1 + + except IndexError: + pass return info -- cgit v1.2.3 From 4b939b3a2859fc55366b93d161f9174a4094d885 Mon Sep 17 00:00:00 2001 From: Walter Purcaro <vuolter@users.noreply.github.com> Date: Mon, 25 May 2015 13:52:28 +0200 Subject: [GoogledriveCom] Improve __pattern__ --- module/plugins/hoster/GoogledriveCom.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/GoogledriveCom.py b/module/plugins/hoster/GoogledriveCom.py index 09c54a8da..c7830b734 100644 --- a/module/plugins/hoster/GoogledriveCom.py +++ b/module/plugins/hoster/GoogledriveCom.py @@ -4,6 +4,7 @@ # https://drive.google.com/file/d/0B6RNTe4ygItBQm15RnJiTmMyckU/view?pli=1 import re +import urlparse from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo from module.utils import html_unescape @@ -12,9 +13,9 @@ from module.utils import html_unescape class GoogledriveCom(SimpleHoster): __name__ = "GoogledriveCom" __type__ = "hoster" - __version__ = "0.08" + __version__ = "0.09" - __pattern__ = r'https?://(?:www\.)?drive\.google\.com/file/.+' + __pattern__ = r'https?://(?:www\.)?(drive|docs)\.google\.com/file/d/\w+' __config__ = [("use_premium", "bool", "Use premium account if available", True)] __description__ = """Drive.google.com hoster plugin""" @@ -57,7 +58,7 @@ class GoogledriveCom(SimpleHoster): else: self.logDebug("Next hop: %s" % link2) - link3 = self.load("https://docs.google.com" + link2, just_header=True) + link3 = self.load(urlparse.urljoin("https://docs.google.com", link2), just_header=True) self.logDebug("DL-Link: %s" % link3['location']) self.link = link3['location'] -- cgit v1.2.3 From 3be549693a8aaac758f0f1690eefe409e45c003f Mon Sep 17 00:00:00 2001 From: Walter Purcaro <vuolter@users.noreply.github.com> Date: Mon, 25 May 2015 14:13:18 +0200 Subject: Some urljoin fixes --- module/plugins/hoster/CrockoCom.py | 5 +++-- module/plugins/hoster/NarodRu.py | 3 ++- module/plugins/hoster/UloziskoSk.py | 3 ++- module/plugins/hoster/YibaishiwuCom.py | 3 ++- 4 files changed, 9 insertions(+), 5 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/CrockoCom.py b/module/plugins/hoster/CrockoCom.py index 1d7468520..4f872f60a 100644 --- a/module/plugins/hoster/CrockoCom.py +++ b/module/plugins/hoster/CrockoCom.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- import re +import urlparse from module.plugins.internal.CaptchaService import ReCaptcha from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo @@ -38,8 +39,8 @@ class CrockoCom(SimpleHoster): for _i in xrange(5): m = re.search(self.CAPTCHA_PATTERN, self.html) if m: - url, wait_time = 'http://crocko.com' + m.group(1), int(m.group(2)) - self.wait(wait_time) + url = urlparse.urljoin("http://crocko.com", m.group(1)) + self.wait(m.group(2)) self.html = self.load(url) else: break diff --git a/module/plugins/hoster/NarodRu.py b/module/plugins/hoster/NarodRu.py index b7380add0..c201ac250 100644 --- a/module/plugins/hoster/NarodRu.py +++ b/module/plugins/hoster/NarodRu.py @@ -2,6 +2,7 @@ import random import re +import urlparse from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo @@ -47,7 +48,7 @@ class NarodRu(SimpleHoster): m = re.search(self.LINK_FREE_PATTERN, self.html) if m: - self.link = 'http://narod.ru' + m.group(1) + self.link = urlparse.urljoin("http://narod.ru", m.group(1)) self.correctCaptcha() break diff --git a/module/plugins/hoster/UloziskoSk.py b/module/plugins/hoster/UloziskoSk.py index d687ae7cb..ad809b47c 100644 --- a/module/plugins/hoster/UloziskoSk.py +++ b/module/plugins/hoster/UloziskoSk.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- import re +import urlparse from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo @@ -55,8 +56,8 @@ class UloziskoSk(SimpleHoster): m = re.search(self.CAPTCHA_PATTERN, self.html) if m is None: self.error(_("CAPTCHA_PATTERN not found")) - captcha_url = 'http://www.ulozisko.sk' + m.group(1) + captcha_url = urlparse.urljoin("http://www.ulozisko.sk", m.group(1)) captcha = self.decryptCaptcha(captcha_url, cookies=True) self.logDebug("CAPTCHA_URL:" + captcha_url + ' CAPTCHA:' + captcha) diff --git a/module/plugins/hoster/YibaishiwuCom.py b/module/plugins/hoster/YibaishiwuCom.py index 7ca6e1ac0..00185c05a 100644 --- a/module/plugins/hoster/YibaishiwuCom.py +++ b/module/plugins/hoster/YibaishiwuCom.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- import re +import urlparse from module.common.json_layer import json_loads from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo @@ -35,7 +36,7 @@ class YibaishiwuCom(SimpleHoster): self.logDebug(('FREEUSER' if m.group(2) == 'download' else 'GUEST') + ' URL', url) - res = json_loads(self.load("http://115.com" + url, decode=False)) + res = json_loads(self.load(urlparse.urljoin("http://115.com", url), decode=False)) if "urls" in res: mirrors = res['urls'] -- cgit v1.2.3 From 02a4218250dbad6ba004382c090a9a6dc241bcda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jens=20H=C3=B6rnlein?= <jens.hoernlein@googlemail.com> Date: Mon, 25 May 2015 18:29:33 +0200 Subject: [NitroFlare] Re-Added RECAPTCHA_KEY --- module/plugins/hoster/NitroflareCom.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/NitroflareCom.py b/module/plugins/hoster/NitroflareCom.py index 1d1349a50..b00f8f52a 100644 --- a/module/plugins/hoster/NitroflareCom.py +++ b/module/plugins/hoster/NitroflareCom.py @@ -9,7 +9,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster class NitroflareCom(SimpleHoster): __name__ = "NitroflareCom" __type__ = "hoster" - __version__ = "0.10" + __version__ = "0.11" __pattern__ = r'https?://(?:www\.)?nitroflare\.com/view/(?P<ID>[\w^_]+)' __config__ = [("use_premium", "bool", "Use premium account if available", True)] @@ -27,6 +27,7 @@ class NitroflareCom(SimpleHoster): LINK_FREE_PATTERN = r'(https?://[\w\-]+\.nitroflare\.com/.+?)"' + RECAPTCHA_KEY = "6Lenx_USAAAAAF5L1pmTWvWcH73dipAEzNnmNLgy" PREMIUM_ONLY_PATTERN = r'This file is available with Premium only' WAIT_PATTERN = r'You have to wait .+?<' ERROR_PATTERN = r'downloading is not possible' -- cgit v1.2.3 From 1e8dd61f1d9f7cef947216887f898bb6b86ee34a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jens=20H=C3=B6rnlein?= <jens.hoernlein@googlemail.com> Date: Mon, 25 May 2015 19:55:59 +0200 Subject: [NitroflareCom] Update Pattern --- module/plugins/hoster/NitroflareCom.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/NitroflareCom.py b/module/plugins/hoster/NitroflareCom.py index b00f8f52a..6696d15d3 100644 --- a/module/plugins/hoster/NitroflareCom.py +++ b/module/plugins/hoster/NitroflareCom.py @@ -9,7 +9,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster class NitroflareCom(SimpleHoster): __name__ = "NitroflareCom" __type__ = "hoster" - __version__ = "0.11" + __version__ = "0.12" __pattern__ = r'https?://(?:www\.)?nitroflare\.com/view/(?P<ID>[\w^_]+)' __config__ = [("use_premium", "bool", "Use premium account if available", True)] @@ -29,8 +29,8 @@ class NitroflareCom(SimpleHoster): RECAPTCHA_KEY = "6Lenx_USAAAAAF5L1pmTWvWcH73dipAEzNnmNLgy" PREMIUM_ONLY_PATTERN = r'This file is available with Premium only' - WAIT_PATTERN = r'You have to wait .+?<' - ERROR_PATTERN = r'downloading is not possible' + WAIT_PATTERN = r'You have to wait (\d+ minutes)' + # ERROR_PATTERN = r'downloading is not possible' def handleFree(self, pyfile): -- cgit v1.2.3 From 7e65484b60890bbfa39aa7631343dcfb5c379cf9 Mon Sep 17 00:00:00 2001 From: Walter Purcaro <vuolter@users.noreply.github.com> Date: Tue, 26 May 2015 01:25:05 +0200 Subject: [GoogledriveCom] Fixup --- module/plugins/hoster/GoogledriveCom.py | 47 ++++++++++++++------------------- 1 file changed, 20 insertions(+), 27 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/GoogledriveCom.py b/module/plugins/hoster/GoogledriveCom.py index c7830b734..5a8862e6b 100644 --- a/module/plugins/hoster/GoogledriveCom.py +++ b/module/plugins/hoster/GoogledriveCom.py @@ -13,7 +13,7 @@ from module.utils import html_unescape class GoogledriveCom(SimpleHoster): __name__ = "GoogledriveCom" __type__ = "hoster" - __version__ = "0.09" + __version__ = "0.10" __pattern__ = r'https?://(?:www\.)?(drive|docs)\.google\.com/file/d/\w+' __config__ = [("use_premium", "bool", "Use premium account if available", True)] @@ -28,6 +28,8 @@ class GoogledriveCom(SimpleHoster): NAME_PATTERN = r'"og:title" content="(?P<N>.*?)">' OFFLINE_PATTERN = r'align="center"><p class="errorMessage"' + LINK_FREE_PATTERN = r'"([^"]+uc\?.*?)"' + def setup(self): self.multiDL = True @@ -36,32 +38,23 @@ class GoogledriveCom(SimpleHoster): def handleFree(self, pyfile): - try: - link1 = re.search(r'"(https://docs.google.com/uc\?id.*?export=download)",', - self.html.decode('unicode-escape')).group(1) - - except AttributeError: - self.error(_("Hop #1 not found")) - - else: - self.logDebug("Next hop: %s" % link1) - - self.html = self.load(link1).decode('unicode-escape') - - try: - link2 = html_unescape(re.search(r'href="(/uc\?export=download.*?)">', - self.html).group(1)) - - except AttributeError: - self.error(_("Hop #2 not found")) - - else: - self.logDebug("Next hop: %s" % link2) - - link3 = self.load(urlparse.urljoin("https://docs.google.com", link2), just_header=True) - self.logDebug("DL-Link: %s" % link3['location']) - - self.link = link3['location'] + for _i in xrange(2): + m = re.search(self.LINK_FREE_PATTERN, self.html) + + if m is None: + self.error(_("Free download link not found")) + + else: + link = html_unescape(m.group(1).decode('unicode-escape')) + if not urlparse.urlparse(link).scheme: + link = urlparse.urljoin("https://docs.google.com/", link) + + direct_link = self.directLink(link, False) + if not direct_link: + self.html = self.load(link, decode=True) + else: + self.link = direct_link + break getInfo = create_getInfo(GoogledriveCom) -- cgit v1.2.3 From b150e9d731213410345628f06c1182a662e63ec5 Mon Sep 17 00:00:00 2001 From: zapp-brannigan <zapp-brannigan@users.noreply.github.com> Date: Wed, 27 May 2015 14:58:22 +0200 Subject: [GoogledriveCom] Make it more flexible Support links like ` https://drive.google.com/uc?export=download&id=<dl_id_here> ` See forum: http://forum.pyload.org/viewtopic.php?f=13&t=4203 --- module/plugins/hoster/GoogledriveCom.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/GoogledriveCom.py b/module/plugins/hoster/GoogledriveCom.py index 5a8862e6b..871ce0f2b 100644 --- a/module/plugins/hoster/GoogledriveCom.py +++ b/module/plugins/hoster/GoogledriveCom.py @@ -13,9 +13,9 @@ from module.utils import html_unescape class GoogledriveCom(SimpleHoster): __name__ = "GoogledriveCom" __type__ = "hoster" - __version__ = "0.10" + __version__ = "0.11" - __pattern__ = r'https?://(?:www\.)?(drive|docs)\.google\.com/file/d/\w+' + __pattern__ = r'https?://(?:www\.)?(drive|docs)\.google\.com/(file/d/\w+|uc.+?)' __config__ = [("use_premium", "bool", "Use premium account if available", True)] __description__ = """Drive.google.com hoster plugin""" @@ -38,6 +38,10 @@ class GoogledriveCom(SimpleHoster): def handleFree(self, pyfile): + if "export=download" in self.pyfile.url: + dl_id = self.pyfile.url.split("id=")[1] + self.html = self.load("https://docs.google.com/file/d/%s/edit" %dl_id) + self.pyfile.name = re.search(self.NAME_PATTERN,self.html).group(1) for _i in xrange(2): m = re.search(self.LINK_FREE_PATTERN, self.html) -- cgit v1.2.3 From 24d3adf72567b0e7ae6cc9ae411ad03a20a3f1d8 Mon Sep 17 00:00:00 2001 From: zapp-brannigan <zapp-brannigan@users.noreply.github.com> Date: Wed, 27 May 2015 18:37:56 +0200 Subject: [MediafireCom] Fix solvemedia captcha handling --- module/plugins/hoster/MediafireCom.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/MediafireCom.py b/module/plugins/hoster/MediafireCom.py index 0e63963d3..d7ab8eb3f 100644 --- a/module/plugins/hoster/MediafireCom.py +++ b/module/plugins/hoster/MediafireCom.py @@ -7,7 +7,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class MediafireCom(SimpleHoster): __name__ = "MediafireCom" __type__ = "hoster" - __version__ = "0.87" + __version__ = "0.88" __pattern__ = r'https?://(?:www\.)?mediafire\.com/(file/|view/\??|download(\.php\?|/)|\?)\w{15}' __config__ = [("use_premium", "bool", "Use premium account if available", True)] @@ -40,7 +40,8 @@ class MediafireCom(SimpleHoster): if captcha_key: response, challenge = solvemedia.challenge(captcha_key) - self.html = self.load(self.pyfile.url, + dl_id = self.pyfile.url.split("/")[4] + self.html = self.load("http://www.mediafire.com/?%s" %dl_id, post={'adcopy_challenge': challenge, 'adcopy_response' : response}, decode=True) -- cgit v1.2.3 From 189f9e90d2814713e343ea340d6ada86fc217f3e Mon Sep 17 00:00:00 2001 From: Walter Purcaro <vuolter@users.noreply.github.com> Date: Wed, 27 May 2015 23:35:23 +0200 Subject: [NetloadIn] Mark dead (temp) --- module/plugins/hoster/NetloadIn.py | 292 +------------------------------------ 1 file changed, 8 insertions(+), 284 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/NetloadIn.py b/module/plugins/hoster/NetloadIn.py index cab7bd88f..1c56a705c 100644 --- a/module/plugins/hoster/NetloadIn.py +++ b/module/plugins/hoster/NetloadIn.py @@ -1,297 +1,21 @@ # -*- coding: utf-8 -*- -import re -import time -import urlparse +from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo -from module.network.RequestFactory import getURL -from module.plugins.Hoster import Hoster -from module.plugins.Plugin import chunks -from module.plugins.internal.CaptchaService import ReCaptcha - -def getInfo(urls): - ## returns list of tupels (name, size (in bytes), status (see FileDatabase), url) - - apiurl = "http://api.netload.in/info.php" - id_regex = re.compile(NetloadIn.__pattern__) - urls_per_query = 80 - - for chunk in chunks(urls, urls_per_query): - ids = "" - for url in chunk: - match = id_regex.search(url) - if match: - ids = ids + match.group('ID') + ";" - - api = getURL(apiurl, - get={'auth' : "Zf9SnQh9WiReEsb18akjvQGqT0I830e8", - 'bz' : 1, - 'md5' : 1, - 'file_id': ids}, - decode=True) - - if api is None or len(api) < 10: - self.logDebug("Prefetch failed") - return - - if api.find("unknown_auth") >= 0: - self.logDebug("Outdated auth code") - return - - result = [] - - for i, r in enumerate(api.splitlines()): - try: - tmp = r.split(";") - - try: - size = int(tmp[2]) - except Exception: - size = 0 - - result.append((tmp[1], size, 2 if tmp[3] == "online" else 1, chunk[i] )) - - except Exception: - self.logDebug("Error while processing response: %s" % r) - - yield result - - -class NetloadIn(Hoster): +class NetloadIn(DeadHoster): __name__ = "NetloadIn" __type__ = "hoster" - __version__ = "0.49" + __version__ = "0.50" - __pattern__ = r'https?://(?:www\.)?netload\.in/(?P<PATH>datei|index\.php\?id=10&file_id=)(?P<ID>\w+)' + __pattern__ = r'https?://(?:www\.)?netload\.(in|me)/(?P<PATH>datei|index\.php\?id=10&file_id=)(?P<ID>\w+)' + __config__ = [] #@TODO: Remove in 0.4.10 __description__ = """Netload.in hoster plugin""" __license__ = "GPLv3" __authors__ = [("spoob", "spoob@pyload.org"), ("RaNaN", "ranan@pyload.org"), - ("Gregy", "gregy@gregy.cz")] - - - RECAPTCHA_KEY = "6LcLJMQSAAAAAJzquPUPKNovIhbK6LpSqCjYrsR1" - - - def setup(self): - self.multiDL = self.resumeDownload = self.premium - - - def process(self, pyfile): - self.url = pyfile.url - - self.prepare() - - pyfile.setStatus("downloading") - - self.proceed(self.url) - - - def prepare(self): - self.api_load() - - if self.api_data and self.api_data['filename']: - self.pyfile.name = self.api_data['filename'] - - if self.premium: - self.logDebug("Use Premium Account") - - settings = self.load("http://www.netload.in/index.php", get={'id': 2, 'lang': "en"}) - - if '<option value="2" selected="selected">Direkter Download' in settings: - self.logDebug("Using direct download") - return True - else: - self.logDebug("Direct downloads not enabled. Parsing html for a download URL") - - if self.download_html(): - return True - else: - self.fail(_("Failed")) - return False - - - def api_load(self, n=0): - url = self.url - id_regex = re.compile(self.__pattern__) - match = id_regex.search(url) - - if match: - #normalize url - self.url = 'http://www.netload.in/datei%s.htm' % match.group('ID') - self.logDebug("URL: %s" % self.url) - else: - self.api_data = False - return - - apiurl = "http://api.netload.in/info.php" - html = self.load(apiurl, cookies=False, - get={"file_id": match.group('ID'), "auth": "Zf9SnQh9WiReEsb18akjvQGqT0I830e8", "bz": "1", - "md5": "1"}, decode=True).strip() - if not html and n <= 3: - self.setWait(2) - self.wait() - self.api_load(n + 1) - return - - self.logDebug("APIDATA: " + html) - - self.api_data = {} - - if html and ";" in html and html not in ("unknown file_data", "unknown_server_data", "No input file specified."): - lines = html.split(";") - self.api_data['exists'] = True - self.api_data['fileid'] = lines[0] - self.api_data['filename'] = lines[1] - self.api_data['size'] = lines[2] - self.api_data['status'] = lines[3] - - if self.api_data['status'] == "online": - self.api_data['checksum'] = lines[4].strip() - else: - self.api_data = False # check manually since api data is useless sometimes - - if lines[0] == lines[1] and lines[2] == "0": # useless api data - self.api_data = False - else: - self.api_data = False - - - def final_wait(self, page): - wait_time = self.get_wait_time.time(page) - - self.setWait(wait_time) - - self.logDebug("Final wait %d seconds" % wait_time) - - self.wait() - - self.url = self.get_file_url(page) - - - def check_free_wait(self, page): - if ">An access request has been made from IP address <" in page: - self.wantReconnect = True - self.setWait(self.get_wait_time.time(page) or 30) - self.wait() - return True - else: - return False - - - def download_html(self): - page = self.load(self.url, decode=True) - - if "/share/templates/download_hddcrash.tpl" in page: - self.logError(_("Netload HDD Crash")) - self.fail(_("File temporarily not available")) - - if not self.api_data: - self.logDebug("API Data may be useless, get details from html page") - - if "* The file was deleted" in page: - self.offline() - - name = re.search(r'class="dl_first_filename">([^<]+)', page, re.M) - # the found filename is not truncated - if name: - name = name.group(1).strip() - if not name.endswith(".."): - self.pyfile.name = name - - captchawaited = False - - for i in xrange(5): - if not page: - page = self.load(self.url) - t = time.time() + 30 - - if "/share/templates/download_hddcrash.tpl" in page: - self.logError(_("Netload HDD Crash")) - self.fail(_("File temporarily not available")) - - self.logDebug("Try number %d " % i) - - if ">Your download is being prepared.<" in page: - self.logDebug("We will prepare your download") - self.final_wait(page) - return True - - self.logDebug("Trying to find captcha") - - try: - url_captcha_html = re.search(r'(index.php\?id=10&.*&captcha=1)', page).group(1).replace("amp;", "") - - except Exception, e: - self.logDebug("Exception during Captcha regex: %s" % e.message) - page = None - - else: - url_captcha_html = urlparse.urljoin("http://netload.in/", url_captcha_html) - break - - self.html = self.load(url_captcha_html) - - recaptcha = ReCaptcha(self) - - for _i in xrange(5): - response, challenge = recaptcha.challenge(self.RECAPTCHA_KEY) - - response_page = self.load("http://www.netload.in/index.php?id=10", - post={'captcha_check' : '1', - 'recaptcha_challenge_field': challenge, - 'recaptcha_response_field' : response, - 'file_id' : self.api_data['fileid'], - 'Download_Next' : ''}) - if "Orange_Link" in response_page: - break - - if self.check_free_wait(response_page): - self.logDebug("Had to wait for next free slot, trying again") - return self.download_html() - - else: - download_url = self.get_file_url(response_page) - self.logDebug("Download URL after get_file: " + download_url) - if not download_url.startswith("http://"): - self.error(_("Download url: %s") % download_url) - self.wait() - - self.url = download_url - return True - - - def get_file_url(self, page): - try: - file_url_pattern = r'<a class="Orange_Link" href="(http://.+)".?>Or click here' - attempt = re.search(file_url_pattern, page) - if attempt: - return attempt.group(1) - else: - self.logDebug("Backup try for final link") - file_url_pattern = r'<a href="(.+)" class="Orange_Link">Click here' - attempt = re.search(file_url_pattern, page) - return "http://netload.in/" + attempt.group(1) - - except Exception, e: - self.logDebug("Getting final link failed", e.message) - return None - - - def get_wait_time.time(self, page): - return int(re.search(r"countdown\((.+),'change\(\)'\)", page).group(1)) / 100 - - - def proceed(self, url): - self.download(url, disposition=True) - - check = self.checkDownload({'empty' : re.compile(r'^$'), - 'offline': re.compile("The file was deleted")}) - if check == "empty": - self.logInfo(_("Downloaded File was empty")) - self.retry() + ("Gregy", "gregy@gregy.cz" )] - elif check == "offline": - self.offline() + +getInfo = create_getInfo(NetloadIn) -- cgit v1.2.3 From 9f3ab57ec994deb24cd31a1dfbd338eb71bffc8c Mon Sep 17 00:00:00 2001 From: Walter Purcaro <vuolter@users.noreply.github.com> Date: Wed, 27 May 2015 23:46:29 +0200 Subject: Spare code cosmetics --- module/plugins/hoster/BayfilesCom.py | 2 +- module/plugins/hoster/BillionuploadsCom.py | 1 + module/plugins/hoster/BoltsharingCom.py | 2 +- module/plugins/hoster/CloudzerNet.py | 2 +- module/plugins/hoster/CyberlockerCh.py | 2 +- module/plugins/hoster/DdlstorageCom.py | 2 +- module/plugins/hoster/DodanePl.py | 2 +- module/plugins/hoster/DuploadOrg.py | 2 +- module/plugins/hoster/EgoFilesCom.py | 2 +- module/plugins/hoster/EnteruploadCom.py | 2 +- module/plugins/hoster/EpicShareNet.py | 2 +- module/plugins/hoster/FileApeCom.py | 2 +- module/plugins/hoster/FilebeerInfo.py | 2 +- module/plugins/hoster/FileshareInUa.py | 2 +- module/plugins/hoster/FilesonicCom.py | 2 +- module/plugins/hoster/FilezyNet.py | 2 +- module/plugins/hoster/FiredriveCom.py | 2 +- module/plugins/hoster/FreevideoCz.py | 2 +- module/plugins/hoster/HellspyCz.py | 2 +- module/plugins/hoster/HotfileCom.py | 2 +- module/plugins/hoster/IFileWs.py | 2 +- module/plugins/hoster/IcyFilesCom.py | 2 +- module/plugins/hoster/IfileIt.py | 2 +- module/plugins/hoster/KickloadCom.py | 2 +- module/plugins/hoster/LemUploadsCom.py | 2 +- module/plugins/hoster/LomafileCom.py | 2 +- module/plugins/hoster/MegaFilesSe.py | 2 +- module/plugins/hoster/MegareleaseOrg.py | 2 +- module/plugins/hoster/MegauploadCom.py | 2 +- module/plugins/hoster/MegavideoCom.py | 2 +- module/plugins/hoster/NahrajCz.py | 2 +- module/plugins/hoster/NetloadIn.py | 2 +- module/plugins/hoster/OronCom.py | 2 +- module/plugins/hoster/PandaplaNet.py | 2 +- module/plugins/hoster/PotloadCom.py | 2 +- module/plugins/hoster/PrzeklejPl.py | 2 +- module/plugins/hoster/Share76Com.py | 2 +- module/plugins/hoster/ShareFilesCo.py | 2 +- module/plugins/hoster/SharebeesCom.py | 2 +- module/plugins/hoster/SharingmatrixCom.py | 2 +- module/plugins/hoster/ShragleCom.py | 2 +- module/plugins/hoster/SockshareCom.py | 2 +- module/plugins/hoster/SpeedLoadOrg.py | 2 +- module/plugins/hoster/SpeedfileCz.py | 2 +- module/plugins/hoster/StorageTo.py | 2 +- module/plugins/hoster/TurbouploadCom.py | 2 +- module/plugins/hoster/UnrestrictLi.py | 1 + module/plugins/hoster/UploadStationCom.py | 2 +- module/plugins/hoster/UploadboxCom.py | 2 +- module/plugins/hoster/UploadhereCom.py | 2 +- module/plugins/hoster/UploadkingCom.py | 2 +- module/plugins/hoster/Vipleech4UCom.py | 2 +- module/plugins/hoster/WarserverCz.py | 2 +- module/plugins/hoster/WuploadCom.py | 2 +- module/plugins/hoster/X7To.py | 2 +- module/plugins/hoster/ZShareNet.py | 2 +- 56 files changed, 56 insertions(+), 54 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/BayfilesCom.py b/module/plugins/hoster/BayfilesCom.py index 92058d634..cccd4acc7 100644 --- a/module/plugins/hoster/BayfilesCom.py +++ b/module/plugins/hoster/BayfilesCom.py @@ -9,7 +9,7 @@ class BayfilesCom(DeadHoster): __version__ = "0.09" __pattern__ = r'https?://(?:www\.)?bayfiles\.(com|net)/file/(?P<ID>\w+/\w+/[^/]+)' - __config__ = [] + __config__ = [] #@TODO: Remove in 0.4.10 __description__ = """Bayfiles.com hoster plugin""" __license__ = "GPLv3" diff --git a/module/plugins/hoster/BillionuploadsCom.py b/module/plugins/hoster/BillionuploadsCom.py index efe2c22a3..d0fbd7a8b 100644 --- a/module/plugins/hoster/BillionuploadsCom.py +++ b/module/plugins/hoster/BillionuploadsCom.py @@ -9,6 +9,7 @@ class BillionuploadsCom(DeadHoster): __version__ = "0.06" __pattern__ = r'http://(?:www\.)?billionuploads\.com/\w{12}' + __config__ = [] #@TODO: Remove in 0.4.10 __description__ = """Billionuploads.com hoster plugin""" __license__ = "GPLv3" diff --git a/module/plugins/hoster/BoltsharingCom.py b/module/plugins/hoster/BoltsharingCom.py index 4309eefac..db813ba2e 100644 --- a/module/plugins/hoster/BoltsharingCom.py +++ b/module/plugins/hoster/BoltsharingCom.py @@ -9,7 +9,7 @@ class BoltsharingCom(DeadHoster): __version__ = "0.02" __pattern__ = r'http://(?:www\.)?boltsharing\.com/\w{12}' - __config__ = [] + __config__ = [] #@TODO: Remove in 0.4.10 __description__ = """Boltsharing.com hoster plugin""" __license__ = "GPLv3" diff --git a/module/plugins/hoster/CloudzerNet.py b/module/plugins/hoster/CloudzerNet.py index d2d5e460a..af40b8d5f 100644 --- a/module/plugins/hoster/CloudzerNet.py +++ b/module/plugins/hoster/CloudzerNet.py @@ -9,7 +9,7 @@ class CloudzerNet(DeadHoster): __version__ = "0.05" __pattern__ = r'https?://(?:www\.)?(cloudzer\.net/file/|clz\.to/(file/)?)\w+' - __config__ = [] + __config__ = [] #@TODO: Remove in 0.4.10 __description__ = """Cloudzer.net hoster plugin""" __license__ = "GPLv3" diff --git a/module/plugins/hoster/CyberlockerCh.py b/module/plugins/hoster/CyberlockerCh.py index d85a27282..9d748bf85 100644 --- a/module/plugins/hoster/CyberlockerCh.py +++ b/module/plugins/hoster/CyberlockerCh.py @@ -9,7 +9,7 @@ class CyberlockerCh(DeadHoster): __version__ = "0.02" __pattern__ = r'http://(?:www\.)?cyberlocker\.ch/\w+' - __config__ = [] + __config__ = [] #@TODO: Remove in 0.4.10 __description__ = """Cyberlocker.ch hoster plugin""" __license__ = "GPLv3" diff --git a/module/plugins/hoster/DdlstorageCom.py b/module/plugins/hoster/DdlstorageCom.py index d67b4f30f..976d9ccf9 100644 --- a/module/plugins/hoster/DdlstorageCom.py +++ b/module/plugins/hoster/DdlstorageCom.py @@ -9,7 +9,7 @@ class DdlstorageCom(DeadHoster): __version__ = "1.02" __pattern__ = r'https?://(?:www\.)?ddlstorage\.com/\w+' - __config__ = [] + __config__ = [] #@TODO: Remove in 0.4.10 __description__ = """DDLStorage.com hoster plugin""" __license__ = "GPLv3" diff --git a/module/plugins/hoster/DodanePl.py b/module/plugins/hoster/DodanePl.py index 96f87a21c..46f748cc4 100644 --- a/module/plugins/hoster/DodanePl.py +++ b/module/plugins/hoster/DodanePl.py @@ -9,7 +9,7 @@ class DodanePl(DeadHoster): __version__ = "0.03" __pattern__ = r'http://(?:www\.)?dodane\.pl/file/\d+' - __config__ = [] + __config__ = [] #@TODO: Remove in 0.4.10 __description__ = """Dodane.pl hoster plugin""" __license__ = "GPLv3" diff --git a/module/plugins/hoster/DuploadOrg.py b/module/plugins/hoster/DuploadOrg.py index 542240bab..076171544 100644 --- a/module/plugins/hoster/DuploadOrg.py +++ b/module/plugins/hoster/DuploadOrg.py @@ -9,7 +9,7 @@ class DuploadOrg(DeadHoster): __version__ = "0.02" __pattern__ = r'http://(?:www\.)?dupload\.org/\w{12}' - __config__ = [] + __config__ = [] #@TODO: Remove in 0.4.10 __description__ = """Dupload.grg hoster plugin""" __license__ = "GPLv3" diff --git a/module/plugins/hoster/EgoFilesCom.py b/module/plugins/hoster/EgoFilesCom.py index 46d0fac6a..78108962f 100644 --- a/module/plugins/hoster/EgoFilesCom.py +++ b/module/plugins/hoster/EgoFilesCom.py @@ -9,7 +9,7 @@ class EgoFilesCom(DeadHoster): __version__ = "0.16" __pattern__ = r'https?://(?:www\.)?egofiles\.com/\w+' - __config__ = [] + __config__ = [] #@TODO: Remove in 0.4.10 __description__ = """Egofiles.com hoster plugin""" __license__ = "GPLv3" diff --git a/module/plugins/hoster/EnteruploadCom.py b/module/plugins/hoster/EnteruploadCom.py index b2306ce69..8ef994e1e 100644 --- a/module/plugins/hoster/EnteruploadCom.py +++ b/module/plugins/hoster/EnteruploadCom.py @@ -9,7 +9,7 @@ class EnteruploadCom(DeadHoster): __version__ = "0.02" __pattern__ = r'http://(?:www\.)?enterupload\.com/\w+' - __config__ = [] + __config__ = [] #@TODO: Remove in 0.4.10 __description__ = """EnterUpload.com hoster plugin""" __license__ = "GPLv3" diff --git a/module/plugins/hoster/EpicShareNet.py b/module/plugins/hoster/EpicShareNet.py index e2a44b172..7e3c8ba0e 100644 --- a/module/plugins/hoster/EpicShareNet.py +++ b/module/plugins/hoster/EpicShareNet.py @@ -9,7 +9,7 @@ class EpicShareNet(DeadHoster): __version__ = "0.02" __pattern__ = r'https?://(?:www\.)?epicshare\.net/\w{12}' - __config__ = [] + __config__ = [] #@TODO: Remove in 0.4.10 __description__ = """EpicShare.net hoster plugin""" __license__ = "GPLv3" diff --git a/module/plugins/hoster/FileApeCom.py b/module/plugins/hoster/FileApeCom.py index 314f069f9..79157539b 100644 --- a/module/plugins/hoster/FileApeCom.py +++ b/module/plugins/hoster/FileApeCom.py @@ -9,7 +9,7 @@ class FileApeCom(DeadHoster): __version__ = "0.12" __pattern__ = r'http://(?:www\.)?fileape\.com/(index\.php\?act=download\&id=|dl/)\w+' - __config__ = [] + __config__ = [] #@TODO: Remove in 0.4.10 __description__ = """FileApe.com hoster plugin""" __license__ = "GPLv3" diff --git a/module/plugins/hoster/FilebeerInfo.py b/module/plugins/hoster/FilebeerInfo.py index 77ee367a7..244131dc7 100644 --- a/module/plugins/hoster/FilebeerInfo.py +++ b/module/plugins/hoster/FilebeerInfo.py @@ -9,7 +9,7 @@ class FilebeerInfo(DeadHoster): __version__ = "0.03" __pattern__ = r'http://(?:www\.)?filebeer\.info/(?!\d*~f)(?P<ID>\w+)' - __config__ = [] + __config__ = [] #@TODO: Remove in 0.4.10 __description__ = """Filebeer.info plugin""" __license__ = "GPLv3" diff --git a/module/plugins/hoster/FileshareInUa.py b/module/plugins/hoster/FileshareInUa.py index c636375f5..aa1785f19 100644 --- a/module/plugins/hoster/FileshareInUa.py +++ b/module/plugins/hoster/FileshareInUa.py @@ -9,7 +9,7 @@ class FileshareInUa(DeadHoster): __version__ = "0.02" __pattern__ = r'https?://(?:www\.)?fileshare\.in\.ua/\w{7}' - __config__ = [] + __config__ = [] #@TODO: Remove in 0.4.10 __description__ = """Fileshare.in.ua hoster plugin""" __license__ = "GPLv3" diff --git a/module/plugins/hoster/FilesonicCom.py b/module/plugins/hoster/FilesonicCom.py index 16b4dee14..5254a6f9b 100644 --- a/module/plugins/hoster/FilesonicCom.py +++ b/module/plugins/hoster/FilesonicCom.py @@ -9,7 +9,7 @@ class FilesonicCom(DeadHoster): __version__ = "0.35" __pattern__ = r'http://(?:www\.)?filesonic\.com/file/\w+' - __config__ = [] + __config__ = [] #@TODO: Remove in 0.4.10 __description__ = """Filesonic.com hoster plugin""" __license__ = "GPLv3" diff --git a/module/plugins/hoster/FilezyNet.py b/module/plugins/hoster/FilezyNet.py index 2a6ba2722..9f442c846 100644 --- a/module/plugins/hoster/FilezyNet.py +++ b/module/plugins/hoster/FilezyNet.py @@ -9,7 +9,7 @@ class FilezyNet(DeadHoster): __version__ = "0.20" __pattern__ = r'http://(?:www\.)?filezy\.net/\w{12}' - __config__ = [] + __config__ = [] #@TODO: Remove in 0.4.10 __description__ = """Filezy.net hoster plugin""" __license__ = "GPLv3" diff --git a/module/plugins/hoster/FiredriveCom.py b/module/plugins/hoster/FiredriveCom.py index 612b9ceca..8faee5b52 100644 --- a/module/plugins/hoster/FiredriveCom.py +++ b/module/plugins/hoster/FiredriveCom.py @@ -9,7 +9,7 @@ class FiredriveCom(DeadHoster): __version__ = "0.05" __pattern__ = r'https?://(?:www\.)?(firedrive|putlocker)\.com/(mobile/)?(file|embed)/(?P<ID>\w+)' - __config__ = [] + __config__ = [] #@TODO: Remove in 0.4.10 __description__ = """Firedrive.com hoster plugin""" __license__ = "GPLv3" diff --git a/module/plugins/hoster/FreevideoCz.py b/module/plugins/hoster/FreevideoCz.py index f47c07c7e..49f02a28b 100644 --- a/module/plugins/hoster/FreevideoCz.py +++ b/module/plugins/hoster/FreevideoCz.py @@ -9,7 +9,7 @@ class FreevideoCz(DeadHoster): __version__ = "0.30" __pattern__ = r'http://(?:www\.)?freevideo\.cz/vase-videa/.+' - __config__ = [] + __config__ = [] #@TODO: Remove in 0.4.10 __description__ = """Freevideo.cz hoster plugin""" __license__ = "GPLv3" diff --git a/module/plugins/hoster/HellspyCz.py b/module/plugins/hoster/HellspyCz.py index 49fb9e829..9b10760bd 100644 --- a/module/plugins/hoster/HellspyCz.py +++ b/module/plugins/hoster/HellspyCz.py @@ -9,7 +9,7 @@ class HellspyCz(DeadHoster): __version__ = "0.28" __pattern__ = r'http://(?:www\.)?(?:hellspy\.(?:cz|com|sk|hu|pl)|sciagaj\.pl)(/\S+/\d+)' - __config__ = [] + __config__ = [] #@TODO: Remove in 0.4.10 __description__ = """HellSpy.cz hoster plugin""" __license__ = "GPLv3" diff --git a/module/plugins/hoster/HotfileCom.py b/module/plugins/hoster/HotfileCom.py index 6c6a4fa89..082415c6b 100644 --- a/module/plugins/hoster/HotfileCom.py +++ b/module/plugins/hoster/HotfileCom.py @@ -9,7 +9,7 @@ class HotfileCom(DeadHoster): __version__ = "0.37" __pattern__ = r'https?://(?:www\.)?hotfile\.com/dl/\d+/\w+' - __config__ = [] + __config__ = [] #@TODO: Remove in 0.4.10 __description__ = """Hotfile.com hoster plugin""" __license__ = "GPLv3" diff --git a/module/plugins/hoster/IFileWs.py b/module/plugins/hoster/IFileWs.py index 7d2a76a60..ff263d43a 100644 --- a/module/plugins/hoster/IFileWs.py +++ b/module/plugins/hoster/IFileWs.py @@ -9,7 +9,7 @@ class IFileWs(DeadHoster): __version__ = "0.02" __pattern__ = r'http://(?:www\.)?ifile\.ws/\w{12}' - __config__ = [] + __config__ = [] #@TODO: Remove in 0.4.10 __description__ = """Ifile.ws hoster plugin""" __license__ = "GPLv3" diff --git a/module/plugins/hoster/IcyFilesCom.py b/module/plugins/hoster/IcyFilesCom.py index ca0f6441b..f81381c66 100644 --- a/module/plugins/hoster/IcyFilesCom.py +++ b/module/plugins/hoster/IcyFilesCom.py @@ -9,7 +9,7 @@ class IcyFilesCom(DeadHoster): __version__ = "0.06" __pattern__ = r'http://(?:www\.)?icyfiles\.com/(.+)' - __config__ = [] + __config__ = [] #@TODO: Remove in 0.4.10 __description__ = """IcyFiles.com hoster plugin""" __license__ = "GPLv3" diff --git a/module/plugins/hoster/IfileIt.py b/module/plugins/hoster/IfileIt.py index f13065f86..ef267b505 100644 --- a/module/plugins/hoster/IfileIt.py +++ b/module/plugins/hoster/IfileIt.py @@ -9,7 +9,7 @@ class IfileIt(DeadHoster): __version__ = "0.29" __pattern__ = r'^unmatchable$' - __config__ = [] + __config__ = [] #@TODO: Remove in 0.4.10 __description__ = """Ifile.it""" __license__ = "GPLv3" diff --git a/module/plugins/hoster/KickloadCom.py b/module/plugins/hoster/KickloadCom.py index df43b0fca..7690c85c8 100644 --- a/module/plugins/hoster/KickloadCom.py +++ b/module/plugins/hoster/KickloadCom.py @@ -9,7 +9,7 @@ class KickloadCom(DeadHoster): __version__ = "0.21" __pattern__ = r'http://(?:www\.)?kickload\.com/get/.+' - __config__ = [] + __config__ = [] #@TODO: Remove in 0.4.10 __description__ = """Kickload.com hoster plugin""" __license__ = "GPLv3" diff --git a/module/plugins/hoster/LemUploadsCom.py b/module/plugins/hoster/LemUploadsCom.py index c7aae3bf9..098867c8b 100644 --- a/module/plugins/hoster/LemUploadsCom.py +++ b/module/plugins/hoster/LemUploadsCom.py @@ -9,7 +9,7 @@ class LemUploadsCom(DeadHoster): __version__ = "0.02" __pattern__ = r'https?://(?:www\.)?lemuploads\.com/\w{12}' - __config__ = [] + __config__ = [] #@TODO: Remove in 0.4.10 __description__ = """LemUploads.com hoster plugin""" __license__ = "GPLv3" diff --git a/module/plugins/hoster/LomafileCom.py b/module/plugins/hoster/LomafileCom.py index 4dd092f45..ef05cd1ea 100644 --- a/module/plugins/hoster/LomafileCom.py +++ b/module/plugins/hoster/LomafileCom.py @@ -9,7 +9,7 @@ class LomafileCom(DeadHoster): __version__ = "0.52" __pattern__ = r'http://lomafile\.com/\w{12}' - __config__ = [] + __config__ = [] #@TODO: Remove in 0.4.10 __description__ = """Lomafile.com hoster plugin""" __license__ = "GPLv3" diff --git a/module/plugins/hoster/MegaFilesSe.py b/module/plugins/hoster/MegaFilesSe.py index 795b74a78..249eff952 100644 --- a/module/plugins/hoster/MegaFilesSe.py +++ b/module/plugins/hoster/MegaFilesSe.py @@ -9,7 +9,7 @@ class MegaFilesSe(DeadHoster): __version__ = "0.02" __pattern__ = r'http://(?:www\.)?megafiles\.se/\w{12}' - __config__ = [] + __config__ = [] #@TODO: Remove in 0.4.10 __description__ = """MegaFiles.se hoster plugin""" __license__ = "GPLv3" diff --git a/module/plugins/hoster/MegareleaseOrg.py b/module/plugins/hoster/MegareleaseOrg.py index 1460ac868..6349144ec 100644 --- a/module/plugins/hoster/MegareleaseOrg.py +++ b/module/plugins/hoster/MegareleaseOrg.py @@ -9,7 +9,7 @@ class MegareleaseOrg(DeadHoster): __version__ = "0.02" __pattern__ = r'https?://(?:www\.)?megarelease\.org/\w{12}' - __config__ = [] + __config__ = [] #@TODO: Remove in 0.4.10 __description__ = """Megarelease.org hoster plugin""" __license__ = "GPLv3" diff --git a/module/plugins/hoster/MegauploadCom.py b/module/plugins/hoster/MegauploadCom.py index 7fe305834..590819f7f 100644 --- a/module/plugins/hoster/MegauploadCom.py +++ b/module/plugins/hoster/MegauploadCom.py @@ -9,7 +9,7 @@ class MegauploadCom(DeadHoster): __version__ = "0.31" __pattern__ = r'http://(?:www\.)?megaupload\.com/\?.*&?(d|v)=\w+' - __config__ = [] + __config__ = [] #@TODO: Remove in 0.4.10 __description__ = """Megaupload.com hoster plugin""" __license__ = "GPLv3" diff --git a/module/plugins/hoster/MegavideoCom.py b/module/plugins/hoster/MegavideoCom.py index 0b4523e03..accd079fc 100644 --- a/module/plugins/hoster/MegavideoCom.py +++ b/module/plugins/hoster/MegavideoCom.py @@ -9,7 +9,7 @@ class MegavideoCom(DeadHoster): __version__ = "0.21" __pattern__ = r'http://(?:www\.)?megavideo\.com/\?.*&?(d|v)=\w+' - __config__ = [] + __config__ = [] #@TODO: Remove in 0.4.10 __description__ = """Megavideo.com hoster plugin""" __license__ = "GPLv3" diff --git a/module/plugins/hoster/NahrajCz.py b/module/plugins/hoster/NahrajCz.py index 5f5003e22..cf708be09 100644 --- a/module/plugins/hoster/NahrajCz.py +++ b/module/plugins/hoster/NahrajCz.py @@ -9,7 +9,7 @@ class NahrajCz(DeadHoster): __version__ = "0.21" __pattern__ = r'http://(?:www\.)?nahraj\.cz/content/download/.+' - __config__ = [] + __config__ = [] #@TODO: Remove in 0.4.10 __description__ = """Nahraj.cz hoster plugin""" __license__ = "GPLv3" diff --git a/module/plugins/hoster/NetloadIn.py b/module/plugins/hoster/NetloadIn.py index 1c56a705c..82f5c22fb 100644 --- a/module/plugins/hoster/NetloadIn.py +++ b/module/plugins/hoster/NetloadIn.py @@ -17,5 +17,5 @@ class NetloadIn(DeadHoster): ("RaNaN", "ranan@pyload.org"), ("Gregy", "gregy@gregy.cz" )] - + getInfo = create_getInfo(NetloadIn) diff --git a/module/plugins/hoster/OronCom.py b/module/plugins/hoster/OronCom.py index 7002d26ab..2e4961704 100644 --- a/module/plugins/hoster/OronCom.py +++ b/module/plugins/hoster/OronCom.py @@ -9,7 +9,7 @@ class OronCom(DeadHoster): __version__ = "0.14" __pattern__ = r'https?://(?:www\.)?oron\.com/\w{12}' - __config__ = [] + __config__ = [] #@TODO: Remove in 0.4.10 __description__ = """Oron.com hoster plugin""" __license__ = "GPLv3" diff --git a/module/plugins/hoster/PandaplaNet.py b/module/plugins/hoster/PandaplaNet.py index a5716e4d4..ae8406d82 100644 --- a/module/plugins/hoster/PandaplaNet.py +++ b/module/plugins/hoster/PandaplaNet.py @@ -9,7 +9,7 @@ class PandaplaNet(DeadHoster): __version__ = "0.03" __pattern__ = r'http://(?:www\.)?pandapla\.net/\w{12}' - __config__ = [] + __config__ = [] #@TODO: Remove in 0.4.10 __description__ = """Pandapla.net hoster plugin""" __license__ = "GPLv3" diff --git a/module/plugins/hoster/PotloadCom.py b/module/plugins/hoster/PotloadCom.py index 0eed158a4..5a41f7d3c 100644 --- a/module/plugins/hoster/PotloadCom.py +++ b/module/plugins/hoster/PotloadCom.py @@ -9,7 +9,7 @@ class PotloadCom(DeadHoster): __version__ = "0.02" __pattern__ = r'http://(?:www\.)?potload\.com/\w{12}' - __config__ = [] + __config__ = [] #@TODO: Remove in 0.4.10 __description__ = """Potload.com hoster plugin""" __license__ = "GPLv3" diff --git a/module/plugins/hoster/PrzeklejPl.py b/module/plugins/hoster/PrzeklejPl.py index 68fd6ca6d..e984d0033 100644 --- a/module/plugins/hoster/PrzeklejPl.py +++ b/module/plugins/hoster/PrzeklejPl.py @@ -9,7 +9,7 @@ class PrzeklejPl(DeadHoster): __version__ = "0.11" __pattern__ = r'http://(?:www\.)?przeklej\.pl/plik/.+' - __config__ = [] + __config__ = [] #@TODO: Remove in 0.4.10 __description__ = """Przeklej.pl hoster plugin""" __license__ = "GPLv3" diff --git a/module/plugins/hoster/Share76Com.py b/module/plugins/hoster/Share76Com.py index 01bbc5ac2..4a4af1672 100644 --- a/module/plugins/hoster/Share76Com.py +++ b/module/plugins/hoster/Share76Com.py @@ -9,7 +9,7 @@ class Share76Com(DeadHoster): __version__ = "0.04" __pattern__ = r'http://(?:www\.)?share76\.com/\w{12}' - __config__ = [] + __config__ = [] #@TODO: Remove in 0.4.10 __description__ = """Share76.com hoster plugin""" __license__ = "GPLv3" diff --git a/module/plugins/hoster/ShareFilesCo.py b/module/plugins/hoster/ShareFilesCo.py index 2fd1fc7cf..d9a71d786 100644 --- a/module/plugins/hoster/ShareFilesCo.py +++ b/module/plugins/hoster/ShareFilesCo.py @@ -9,7 +9,7 @@ class ShareFilesCo(DeadHoster): __version__ = "0.02" __pattern__ = r'http://(?:www\.)?sharefiles\.co/\w{12}' - __config__ = [] + __config__ = [] #@TODO: Remove in 0.4.10 __description__ = """Sharefiles.co hoster plugin""" __license__ = "GPLv3" diff --git a/module/plugins/hoster/SharebeesCom.py b/module/plugins/hoster/SharebeesCom.py index 347ae97e6..9387483cc 100644 --- a/module/plugins/hoster/SharebeesCom.py +++ b/module/plugins/hoster/SharebeesCom.py @@ -9,7 +9,7 @@ class SharebeesCom(DeadHoster): __version__ = "0.02" __pattern__ = r'http://(?:www\.)?sharebees\.com/\w{12}' - __config__ = [] + __config__ = [] #@TODO: Remove in 0.4.10 __description__ = """ShareBees hoster plugin""" __license__ = "GPLv3" diff --git a/module/plugins/hoster/SharingmatrixCom.py b/module/plugins/hoster/SharingmatrixCom.py index 925c6af8d..3958ebbd6 100644 --- a/module/plugins/hoster/SharingmatrixCom.py +++ b/module/plugins/hoster/SharingmatrixCom.py @@ -9,7 +9,7 @@ class SharingmatrixCom(DeadHoster): __version__ = "0.01" __pattern__ = r'http://(?:www\.)?sharingmatrix\.com/file/\w+' - __config__ = [] + __config__ = [] #@TODO: Remove in 0.4.10 __description__ = """Sharingmatrix.com hoster plugin""" __license__ = "GPLv3" diff --git a/module/plugins/hoster/ShragleCom.py b/module/plugins/hoster/ShragleCom.py index 9a4a259d8..689223322 100644 --- a/module/plugins/hoster/ShragleCom.py +++ b/module/plugins/hoster/ShragleCom.py @@ -9,7 +9,7 @@ class ShragleCom(DeadHoster): __version__ = "0.22" __pattern__ = r'http://(?:www\.)?(cloudnator|shragle)\.com/files/(?P<ID>.+?)/' - __config__ = [] + __config__ = [] #@TODO: Remove in 0.4.10 __description__ = """Cloudnator.com (Shragle.com) hoster plugin""" __license__ = "GPLv3" diff --git a/module/plugins/hoster/SockshareCom.py b/module/plugins/hoster/SockshareCom.py index 574c66d5b..44eedf9d4 100644 --- a/module/plugins/hoster/SockshareCom.py +++ b/module/plugins/hoster/SockshareCom.py @@ -9,7 +9,7 @@ class SockshareCom(DeadHoster): __version__ = "0.05" __pattern__ = r'http://(?:www\.)?sockshare\.com/(mobile/)?(file|embed)/(?P<ID>\w+)' - __config__ = [] + __config__ = [] #@TODO: Remove in 0.4.10 __description__ = """Sockshare.com hoster plugin""" __license__ = "GPLv3" diff --git a/module/plugins/hoster/SpeedLoadOrg.py b/module/plugins/hoster/SpeedLoadOrg.py index 08a87e455..18f04b611 100644 --- a/module/plugins/hoster/SpeedLoadOrg.py +++ b/module/plugins/hoster/SpeedLoadOrg.py @@ -9,7 +9,7 @@ class SpeedLoadOrg(DeadHoster): __version__ = "1.02" __pattern__ = r'http://(?:www\.)?speedload\.org/(?P<ID>\w+)' - __config__ = [] + __config__ = [] #@TODO: Remove in 0.4.10 __description__ = """Speedload.org hoster plugin""" __license__ = "GPLv3" diff --git a/module/plugins/hoster/SpeedfileCz.py b/module/plugins/hoster/SpeedfileCz.py index d3d627505..cd6d65082 100644 --- a/module/plugins/hoster/SpeedfileCz.py +++ b/module/plugins/hoster/SpeedfileCz.py @@ -9,7 +9,7 @@ class SpeedfileCz(DeadHoster): __version__ = "0.32" __pattern__ = r'http://(?:www\.)?speedfile\.cz/.+' - __config__ = [] + __config__ = [] #@TODO: Remove in 0.4.10 __description__ = """Speedfile.cz hoster plugin""" __license__ = "GPLv3" diff --git a/module/plugins/hoster/StorageTo.py b/module/plugins/hoster/StorageTo.py index f9bba7822..feb9f3300 100644 --- a/module/plugins/hoster/StorageTo.py +++ b/module/plugins/hoster/StorageTo.py @@ -9,7 +9,7 @@ class StorageTo(DeadHoster): __version__ = "0.01" __pattern__ = r'http://(?:www\.)?storage\.to/get/.+' - __config__ = [] + __config__ = [] #@TODO: Remove in 0.4.10 __description__ = """Storage.to hoster plugin""" __license__ = "GPLv3" diff --git a/module/plugins/hoster/TurbouploadCom.py b/module/plugins/hoster/TurbouploadCom.py index 4b4d0c2e3..e4b53b818 100644 --- a/module/plugins/hoster/TurbouploadCom.py +++ b/module/plugins/hoster/TurbouploadCom.py @@ -9,7 +9,7 @@ class TurbouploadCom(DeadHoster): __version__ = "0.03" __pattern__ = r'http://(?:www\.)?turboupload\.com/(\w+)' - __config__ = [] + __config__ = [] #@TODO: Remove in 0.4.10 __description__ = """Turboupload.com hoster plugin""" __license__ = "GPLv3" diff --git a/module/plugins/hoster/UnrestrictLi.py b/module/plugins/hoster/UnrestrictLi.py index d3854db31..b63796fe0 100644 --- a/module/plugins/hoster/UnrestrictLi.py +++ b/module/plugins/hoster/UnrestrictLi.py @@ -9,6 +9,7 @@ class UnrestrictLi(DeadHoster): __version__ = "0.23" __pattern__ = r'https?://(?:www\.)?(unrestrict|unr)\.li/dl/[\w^_]+' + __config__ = [] #@TODO: Remove in 0.4.10 __description__ = """Unrestrict.li multi-hoster plugin""" __license__ = "GPLv3" diff --git a/module/plugins/hoster/UploadStationCom.py b/module/plugins/hoster/UploadStationCom.py index 90c177d71..61226e3da 100644 --- a/module/plugins/hoster/UploadStationCom.py +++ b/module/plugins/hoster/UploadStationCom.py @@ -9,7 +9,7 @@ class UploadStationCom(DeadHoster): __version__ = "0.52" __pattern__ = r'http://(?:www\.)?uploadstation\.com/file/(?P<ID>\w+)' - __config__ = [] + __config__ = [] #@TODO: Remove in 0.4.10 __description__ = """UploadStation.com hoster plugin""" __license__ = "GPLv3" diff --git a/module/plugins/hoster/UploadboxCom.py b/module/plugins/hoster/UploadboxCom.py index 5a3856c6b..cb4f50184 100644 --- a/module/plugins/hoster/UploadboxCom.py +++ b/module/plugins/hoster/UploadboxCom.py @@ -9,7 +9,7 @@ class UploadboxCom(DeadHoster): __version__ = "0.05" __pattern__ = r'http://(?:www\.)?uploadbox\.com/files/.+' - __config__ = [] + __config__ = [] #@TODO: Remove in 0.4.10 __description__ = """UploadBox.com hoster plugin""" __license__ = "GPLv3" diff --git a/module/plugins/hoster/UploadhereCom.py b/module/plugins/hoster/UploadhereCom.py index d3b095c15..bc94e644e 100644 --- a/module/plugins/hoster/UploadhereCom.py +++ b/module/plugins/hoster/UploadhereCom.py @@ -9,7 +9,7 @@ class UploadhereCom(DeadHoster): __version__ = "0.12" __pattern__ = r'http://(?:www\.)?uploadhere\.com/\w{10}' - __config__ = [] + __config__ = [] #@TODO: Remove in 0.4.10 __description__ = """Uploadhere.com hoster plugin""" __license__ = "GPLv3" diff --git a/module/plugins/hoster/UploadkingCom.py b/module/plugins/hoster/UploadkingCom.py index 6c24fe51a..0d60cef1f 100644 --- a/module/plugins/hoster/UploadkingCom.py +++ b/module/plugins/hoster/UploadkingCom.py @@ -9,7 +9,7 @@ class UploadkingCom(DeadHoster): __version__ = "0.14" __pattern__ = r'http://(?:www\.)?uploadking\.com/\w{10}' - __config__ = [] + __config__ = [] #@TODO: Remove in 0.4.10 __description__ = """UploadKing.com hoster plugin""" __license__ = "GPLv3" diff --git a/module/plugins/hoster/Vipleech4UCom.py b/module/plugins/hoster/Vipleech4UCom.py index 1a7ec2810..5668e0fad 100644 --- a/module/plugins/hoster/Vipleech4UCom.py +++ b/module/plugins/hoster/Vipleech4UCom.py @@ -9,7 +9,7 @@ class Vipleech4UCom(DeadHoster): __version__ = "0.20" __pattern__ = r'http://(?:www\.)?vipleech4u\.com/manager\.php' - __config__ = [] + __config__ = [] #@TODO: Remove in 0.4.10 __description__ = """Vipleech4u.com hoster plugin""" __license__ = "GPLv3" diff --git a/module/plugins/hoster/WarserverCz.py b/module/plugins/hoster/WarserverCz.py index a8ae99a1b..6cb94e57e 100644 --- a/module/plugins/hoster/WarserverCz.py +++ b/module/plugins/hoster/WarserverCz.py @@ -9,7 +9,7 @@ class WarserverCz(DeadHoster): __version__ = "0.13" __pattern__ = r'http://(?:www\.)?warserver\.cz/stahnout/\d+' - __config__ = [] + __config__ = [] #@TODO: Remove in 0.4.10 __description__ = """Warserver.cz hoster plugin""" __license__ = "GPLv3" diff --git a/module/plugins/hoster/WuploadCom.py b/module/plugins/hoster/WuploadCom.py index 14c56aba3..73c008ae8 100644 --- a/module/plugins/hoster/WuploadCom.py +++ b/module/plugins/hoster/WuploadCom.py @@ -9,7 +9,7 @@ class WuploadCom(DeadHoster): __version__ = "0.23" __pattern__ = r'http://(?:www\.)?wupload\..+?/file/((\w+/)?\d+)(/.*)?' - __config__ = [] + __config__ = [] #@TODO: Remove in 0.4.10 __description__ = """Wupload.com hoster plugin""" __license__ = "GPLv3" diff --git a/module/plugins/hoster/X7To.py b/module/plugins/hoster/X7To.py index 15e011720..8e2dd3a53 100644 --- a/module/plugins/hoster/X7To.py +++ b/module/plugins/hoster/X7To.py @@ -9,7 +9,7 @@ class X7To(DeadHoster): __version__ = "0.41" __pattern__ = r'http://(?:www\.)?x7\.to/' - __config__ = [] + __config__ = [] #@TODO: Remove in 0.4.10 __description__ = """X7.to hoster plugin""" __license__ = "GPLv3" diff --git a/module/plugins/hoster/ZShareNet.py b/module/plugins/hoster/ZShareNet.py index 8142136bb..6e4508a18 100644 --- a/module/plugins/hoster/ZShareNet.py +++ b/module/plugins/hoster/ZShareNet.py @@ -9,7 +9,7 @@ class ZShareNet(DeadHoster): __version__ = "0.21" __pattern__ = r'https?://(?:ww[2w]\.)?zshares?\.net/.+' - __config__ = [] + __config__ = [] #@TODO: Remove in 0.4.10 __description__ = """ZShare.net hoster plugin""" __license__ = "GPLv3" -- cgit v1.2.3 From 46781a7b3b2ec464e48e2629ab7f23412f9aa5b6 Mon Sep 17 00:00:00 2001 From: Walter Purcaro <vuolter@users.noreply.github.com> Date: Thu, 28 May 2015 00:05:49 +0200 Subject: [GoogledriveCom][MediafireCom] Cleanup --- module/plugins/hoster/GoogledriveCom.py | 10 +++------- module/plugins/hoster/MediafireCom.py | 5 ++--- 2 files changed, 5 insertions(+), 10 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/GoogledriveCom.py b/module/plugins/hoster/GoogledriveCom.py index 871ce0f2b..1c33a1e4e 100644 --- a/module/plugins/hoster/GoogledriveCom.py +++ b/module/plugins/hoster/GoogledriveCom.py @@ -13,9 +13,9 @@ from module.utils import html_unescape class GoogledriveCom(SimpleHoster): __name__ = "GoogledriveCom" __type__ = "hoster" - __version__ = "0.11" + __version__ = "0.12" - __pattern__ = r'https?://(?:www\.)?(drive|docs)\.google\.com/(file/d/\w+|uc.+?)' + __pattern__ = r'https?://(?:www\.)?(drive|docs)\.google\.com/(file/d/\w+|uc\?.*id=)' __config__ = [("use_premium", "bool", "Use premium account if available", True)] __description__ = """Drive.google.com hoster plugin""" @@ -25,7 +25,7 @@ class GoogledriveCom(SimpleHoster): DISPOSITION = False #: Remove in 0.4.10 - NAME_PATTERN = r'"og:title" content="(?P<N>.*?)">' + NAME_PATTERN = r'(?:<title>|class="uc-name-size".*>)(?P<N>.+?)(?: - Google Drive| \()' OFFLINE_PATTERN = r'align="center">

    \w{15})' __config__ = [("use_premium", "bool", "Use premium account if available", True)] __description__ = """Mediafire.com hoster plugin""" @@ -40,8 +40,7 @@ class MediafireCom(SimpleHoster): if captcha_key: response, challenge = solvemedia.challenge(captcha_key) - dl_id = self.pyfile.url.split("/")[4] - self.html = self.load("http://www.mediafire.com/?%s" %dl_id, + self.html = self.load("http://www.mediafire.com/?" + self.info['pattern']['ID'], post={'adcopy_challenge': challenge, 'adcopy_response' : response}, decode=True) -- cgit v1.2.3 From fc3504b3d09d9167fe005ee28bf775f434f410cd Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 29 May 2015 05:48:21 +0200 Subject: [UptoboxCom] Fixup --- module/plugins/hoster/UptoboxCom.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/UptoboxCom.py b/module/plugins/hoster/UptoboxCom.py index 4dc3c07b9..2c06558e4 100644 --- a/module/plugins/hoster/UptoboxCom.py +++ b/module/plugins/hoster/UptoboxCom.py @@ -6,7 +6,7 @@ from module.plugins.internal.XFSHoster import XFSHoster, create_getInfo class UptoboxCom(XFSHoster): __name__ = "UptoboxCom" __type__ = "hoster" - __version__ = "0.19" + __version__ = "0.20" __pattern__ = r'https?://(?:www\.)?(uptobox|uptostream)\.com/\w{12}' @@ -15,16 +15,12 @@ class UptoboxCom(XFSHoster): __authors__ = [("Walter Purcaro", "vuolter@gmail.com")] - LOGIN_ACCOUNT = True - INFO_PATTERN = r'"para_title">(?P.+) \((?P[\d.,]+) (?P[\w^_]+)\)' OFFLINE_PATTERN = r'>(File not found|Access Denied|404 Not Found)' TEMP_OFFLINE_PATTERN = r'>Service Unavailable' LINK_PATTERN = r'"(https?://\w+\.uptobox\.com/d/.*?)"' - ERROR_PATTERN = r'>(You have to wait.+till next download.)<' #@TODO: Check XFSHoster ERROR_PATTERN - def setup(self): self.multiDL = True -- cgit v1.2.3