From f513f69f09b091f7c29f607d5c32ff8e35e8282a Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Wed, 26 Nov 2014 22:46:44 +0100 Subject: Fix previous merge --- module/plugins/hoster/XFileSharingPro.py | 57 -------- module/plugins/hoster/ZShareNet.py | 19 --- module/plugins/internal/CaptchaService.py | 213 ----------------------------- pyload/plugins/captcha/AdsCaptcha.py | 7 +- pyload/plugins/captcha/ReCaptcha.py | 7 +- pyload/plugins/captcha/SolveMedia.py | 6 +- pyload/plugins/crypter/C1neonCom.py | 2 +- pyload/plugins/crypter/CryptItCom.py | 2 +- pyload/plugins/crypter/DuploadOrg.py | 2 +- pyload/plugins/crypter/FilebeerInfo.py | 2 +- pyload/plugins/crypter/FilecryptCc.py | 4 +- pyload/plugins/crypter/FilesonicCom.py | 2 +- pyload/plugins/crypter/FiredriveCom.py | 2 +- pyload/plugins/crypter/HotfileCom.py | 2 +- pyload/plugins/crypter/ILoadTo.py | 2 +- pyload/plugins/crypter/LofCc.py | 2 +- pyload/plugins/crypter/MBLinkInfo.py | 2 +- pyload/plugins/crypter/MegauploadCom.py | 2 +- pyload/plugins/crypter/Movie2kTo.py | 2 +- pyload/plugins/crypter/MultiuploadCom.py | 2 +- pyload/plugins/crypter/OronCom.py | 2 +- pyload/plugins/crypter/RSLayerCom.py | 2 +- pyload/plugins/crypter/SecuredIn.py | 2 +- pyload/plugins/crypter/SharingmatrixCom.py | 2 +- pyload/plugins/crypter/SpeedLoadOrg.py | 2 +- pyload/plugins/crypter/StealthTo.py | 2 +- pyload/plugins/crypter/TrailerzoneInfo.py | 2 +- pyload/plugins/crypter/WiiReloadedOrg.py | 2 +- pyload/plugins/crypter/WuploadCom.py | 2 +- pyload/plugins/hoster/XFileSharingPro.py | 57 ++++++++ pyload/plugins/hoster/ZShareNet.py | 19 +++ pyload/plugins/internal/Crypter.py | 2 +- 32 files changed, 113 insertions(+), 322 deletions(-) delete mode 100644 module/plugins/hoster/XFileSharingPro.py delete mode 100644 module/plugins/hoster/ZShareNet.py delete mode 100644 module/plugins/internal/CaptchaService.py create mode 100644 pyload/plugins/hoster/XFileSharingPro.py create mode 100644 pyload/plugins/hoster/ZShareNet.py diff --git a/module/plugins/hoster/XFileSharingPro.py b/module/plugins/hoster/XFileSharingPro.py deleted file mode 100644 index 0acad3dba..000000000 --- a/module/plugins/hoster/XFileSharingPro.py +++ /dev/null @@ -1,57 +0,0 @@ -# -*- coding: utf-8 -*- - -import re - -from module.plugins.internal.XFSHoster import XFSHoster, create_getInfo - - -class XFileSharingPro(XFSHoster): - __name__ = "XFileSharingPro" - __type__ = "hoster" - __version__ = "0.43" - - __pattern__ = r'^unmatchable$' - - __description__ = """XFileSharingPro dummy hoster plugin for hook""" - __license__ = "GPLv3" - __authors__ = [("Walter Purcaro", "vuolter@gmail.com")] - - - URL_REPLACEMENTS = [("/embed-", "/")] - - - def _log(self, type, args): - msg = " | ".join([str(a).strip() for a in args if a]) - logger = getattr(self.log, type) - logger("%s: %s: %s" % (self.__name__, self.HOSTER_NAME, msg or _("%s MARK" % type.upper()))) - - - def init(self): - super(XFileSharingPro, self).init() - - self.__pattern__ = self.core.pluginManager.hosterPlugins[self.__name__]['pattern'] - - self.HOSTER_DOMAIN = re.match(self.__pattern__, self.pyfile.url).group(1).lower() - self.HOSTER_NAME = "".join([str.capitalize() for str in self.HOSTER_DOMAIN.split('.')]) - - account = self.core.accountManager.getAccountPlugin(self.HOSTER_NAME) - - if account and account.canUse(): - self.account = account - elif self.account: - self.account.HOSTER_DOMAIN = self.HOSTER_DOMAIN - else: - return - - self.user, data = self.account.selectAccount() - self.req = self.account.getAccountRequest(self.user) - self.premium = self.account.isPremium(self.user) - - - def setup(self): - self.chunkLimit = 1 - self.resumeDownload = self.premium - self.multiDL = True - - -getInfo = create_getInfo(XFileSharingPro) diff --git a/module/plugins/hoster/ZShareNet.py b/module/plugins/hoster/ZShareNet.py deleted file mode 100644 index dc96facbe..000000000 --- a/module/plugins/hoster/ZShareNet.py +++ /dev/null @@ -1,19 +0,0 @@ -# -*- coding: utf-8 -*- - -from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo - - -class ZShareNet(DeadHoster): - __name__ = "ZShareNet" - __type__ = "hoster" - __version__ = "0.21" - - __pattern__ = r'https?://(?:ww[2w]\.)?zshares?\.net/.+' - - __description__ = """ZShare.net hoster plugin""" - __license__ = "GPLv3" - __authors__ = [("espes", None), - ("Cptn Sandwich", None)] - - -getInfo = create_getInfo(ZShareNet) diff --git a/module/plugins/internal/CaptchaService.py b/module/plugins/internal/CaptchaService.py deleted file mode 100644 index 7009e6986..000000000 --- a/module/plugins/internal/CaptchaService.py +++ /dev/null @@ -1,213 +0,0 @@ -# -*- coding: utf-8 -*- - -import re - -from random import random - - -class CaptchaService: - __name__ = "CaptchaService" - __version__ = "0.15" - - __description__ = """Base captcha service plugin""" - __license__ = "GPLv3" - __authors__ = [("pyLoad Team", "admin@pyload.org")] - - - KEY_PATTERN = None - - key = None #: last key detected - - - def __init__(self, plugin): - self.plugin = plugin - - - def detect_key(self, html=None): - if not html: - if hasattr(self.plugin, "html") and self.plugin.html: - html = self.plugin.html - else: - errmsg = _("%s html not found") % self.__name__ - self.plugin.fail(errmsg) #@TODO: replace all plugin.fail(errmsg) with plugin.error(errmsg) in 0.4.10 - raise TypeError(errmsg) - - m = re.search(self.KEY_PATTERN, html) - if m: - self.key = m.group("KEY") - self.plugin.logDebug("%s key: %s" % (self.__name__, self.key)) - return self.key - else: - self.plugin.logDebug("%s key not found" % self.__name__) - return None - - - def challenge(self, key=None): - raise NotImplementedError - - - def result(self, server, challenge): - raise NotImplementedError - - -class ReCaptcha(CaptchaService): - __name__ = "ReCaptcha" - __version__ = "0.08" - - __description__ = """ReCaptcha captcha service plugin""" - __license__ = "GPLv3" - __authors__ = [("pyLoad Team", "admin@pyload.org")] - - - KEY_PATTERN = r'recaptcha(/api|\.net)/(challenge|noscript)\?k=(?P[\w-]+)' - KEY_AJAX_PATTERN = r'Recaptcha\.create\s*\(\s*["\'](?P[\w-]+)' - - - def detect_key(self, html=None): - if not html: - if hasattr(self.plugin, "html") and self.plugin.html: - html = self.plugin.html - else: - errmsg = _("ReCaptcha html not found") - self.plugin.fail(errmsg) - raise TypeError(errmsg) - - m = re.search(self.KEY_PATTERN, html) or re.search(self.KEY_AJAX_PATTERN, html) - if m: - self.key = m.group("KEY") - self.plugin.logDebug("ReCaptcha key: %s" % self.key) - return self.key - else: - self.plugin.logDebug("ReCaptcha key not found") - return None - - - def challenge(self, key=None): - if not key: - if self.detect_key(): - key = self.key - else: - errmsg = _("ReCaptcha key not found") - self.plugin.fail(errmsg) - raise TypeError(errmsg) - - js = self.plugin.req.load("http://www.google.com/recaptcha/api/challenge", get={'k': key}) - try: - challenge = re.search("challenge : '(.+?)',", js).group(1) - server = re.search("server : '(.+?)',", js).group(1) - except: - self.plugin.error("ReCaptcha challenge pattern not found") - - result = self.result(server, challenge) - - self.plugin.logDebug("ReCaptcha result: %s" % result, "challenge: %s" % challenge) - - return challenge, result - - - def result(self, server, challenge): - return self.plugin.decryptCaptcha("%simage" % server, get={'c': challenge}, - cookies=True, forceUser=True, imgtype="jpg") - - -class AdsCaptcha(CaptchaService): - __name__ = "AdsCaptcha" - __version__ = "0.05" - - __description__ = """AdsCaptcha captcha service plugin""" - __license__ = "GPLv3" - __authors__ = [("pyLoad Team", "admin@pyload.org")] - - - ID_PATTERN = r'api\.adscaptcha\.com/Get\.aspx\?[^"\']*CaptchaId=(?P\d+)' - KEY_PATTERN = r'api\.adscaptcha\.com/Get\.aspx\?[^"\']*PublicKey=(?P[\w-]+)' - - - def detect_key(self, html=None): - if not html: - if hasattr(self.plugin, "html") and self.plugin.html: - html = self.plugin.html - else: - errmsg = _("AdsCaptcha html not found") - self.plugin.fail(errmsg) - raise TypeError(errmsg) - - m = re.search(self.ID_PATTERN, html) - n = re.search(self.KEY_PATTERN, html) - if m and n: - self.key = (m.group("ID"), m.group("KEY")) - self.plugin.logDebug("AdsCaptcha id|key: %s | %s" % self.key) - return self.key - else: - self.plugin.logDebug("AdsCaptcha id or key not found") - return None - - - def challenge(self, key=None): #: key is a tuple(CaptchaId, PublicKey) - if not key: - if self.detect_key(): - key = self.key - else: - errmsg = _("AdsCaptcha key not found") - self.plugin.fail(errmsg) - raise TypeError(errmsg) - - CaptchaId, PublicKey = key - - js = self.plugin.req.load("http://api.adscaptcha.com/Get.aspx", get={'CaptchaId': CaptchaId, 'PublicKey': PublicKey}) - try: - challenge = re.search("challenge: '(.+?)',", js).group(1) - server = re.search("server: '(.+?)',", js).group(1) - except: - self.plugin.error("AdsCaptcha challenge pattern not found") - - result = self.result(server, challenge) - - self.plugin.logDebug("AdsCaptcha result: %s" % result, "challenge: %s" % challenge) - - return challenge, result - - - def result(self, server, challenge): - return self.plugin.decryptCaptcha("%sChallenge.aspx" % server, get={'cid': challenge, 'dummy': random()}, - cookies=True, imgtype="jpg") - - -class SolveMedia(CaptchaService): - __name__ = "SolveMedia" - __version__ = "0.06" - - __description__ = """SolveMedia captcha service plugin""" - __license__ = "GPLv3" - __authors__ = [("pyLoad Team", "admin@pyload.org")] - - - KEY_PATTERN = r'api\.solvemedia\.com/papi/challenge\.(no)?script\?k=(?P.+?)["\']' - - - def challenge(self, key=None): - if not key: - if self.detect_key(): - key = self.key - else: - errmsg = _("SolveMedia key not found") - self.plugin.fail(errmsg) - raise TypeError(errmsg) - - html = self.plugin.req.load("http://api.solvemedia.com/papi/challenge.noscript", get={'k': key}) - try: - challenge = re.search(r'', - html).group(1) - server = "http://api.solvemedia.com/papi/media" - except: - self.plugin.error("SolveMedia challenge pattern not found") - - result = self.result(server, challenge) - - self.plugin.logDebug("SolveMedia result: %s" % result, "challenge: %s" % challenge) - - return challenge, result - - - def result(self, server, challenge): - return self.plugin.decryptCaptcha(server, get={'c': challenge}, imgtype="gif") diff --git a/pyload/plugins/captcha/AdsCaptcha.py b/pyload/plugins/captcha/AdsCaptcha.py index 845205e4c..d804d9942 100644 --- a/pyload/plugins/captcha/AdsCaptcha.py +++ b/pyload/plugins/captcha/AdsCaptcha.py @@ -10,7 +10,7 @@ from pyload.plugins.internal.Captcha import Captcha class AdsCaptcha(Captcha): __name__ = "AdsCaptcha" __type__ = "captcha" - __version__ = "0.04" + __version__ = "0.05" __description__ = """AdsCaptcha captcha service plugin""" __license__ = "GPLv3" @@ -53,15 +53,16 @@ class AdsCaptcha(Captcha): CaptchaId, PublicKey = key js = self.plugin.req.load("http://api.adscaptcha.com/Get.aspx", get={'CaptchaId': CaptchaId, 'PublicKey': PublicKey}) - try: challenge = re.search("challenge: '(.+?)',", js).group(1) server = re.search("server: '(.+?)',", js).group(1) except: - self.plugin.error("AdsCaptcha challenge pattern not found") + self.plugin.error(_("AdsCaptcha challenge pattern not found")) result = self.result(server, challenge) + self.plugin.logDebug("AdsCaptcha result: %s" % result, "challenge: %s" % challenge) + return challenge, result diff --git a/pyload/plugins/captcha/ReCaptcha.py b/pyload/plugins/captcha/ReCaptcha.py index 4516b76de..c4054c29b 100644 --- a/pyload/plugins/captcha/ReCaptcha.py +++ b/pyload/plugins/captcha/ReCaptcha.py @@ -8,7 +8,7 @@ from pyload.plugins.internal.Captcha import Captcha class ReCaptcha(Captcha): __name__ = "ReCaptcha" __type__ = "captcha" - __version__ = "0.07" + __version__ = "0.08" __description__ = """ReCaptcha captcha service plugin""" __license__ = "GPLv3" @@ -48,15 +48,16 @@ class ReCaptcha(Captcha): raise TypeError(errmsg) js = self.plugin.req.load("http://www.google.com/recaptcha/api/challenge", get={'k': key}) - try: challenge = re.search("challenge : '(.+?)',", js).group(1) server = re.search("server : '(.+?)',", js).group(1) except: - self.plugin.error("ReCaptcha challenge pattern not found") + self.plugin.error(_("ReCaptcha challenge pattern not found")) result = self.result(server, challenge) + self.plugin.logDebug("ReCaptcha result: %s" % result, "challenge: %s" % challenge) + return challenge, result diff --git a/pyload/plugins/captcha/SolveMedia.py b/pyload/plugins/captcha/SolveMedia.py index 82f1c4722..6420fc326 100644 --- a/pyload/plugins/captcha/SolveMedia.py +++ b/pyload/plugins/captcha/SolveMedia.py @@ -8,7 +8,7 @@ from pyload.plugins.internal.Captcha import Captcha class SolveMedia(Captcha): __name__ = "SolveMedia" __type__ = "captcha" - __version__ = "0.05" + __version__ = "0.06" __description__ = """SolveMedia captcha service plugin""" __license__ = "GPLv3" @@ -33,10 +33,12 @@ class SolveMedia(Captcha): html).group(1) server = "http://api.solvemedia.com/papi/media" except: - self.plugin.error("SolveMedia challenge pattern not found") + self.plugin.error(_("SolveMedia challenge pattern not found")) result = self.result(server, challenge) + self.plugin.logDebug("SolveMedia result: %s" % result, "challenge: %s" % challenge) + return challenge, result diff --git a/pyload/plugins/crypter/C1neonCom.py b/pyload/plugins/crypter/C1neonCom.py index cf1d2a211..c650d444b 100644 --- a/pyload/plugins/crypter/C1neonCom.py +++ b/pyload/plugins/crypter/C1neonCom.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.DeadCrypter import DeadCrypter, create_getInfo +from pyload.plugins.internal.DeadCrypter import DeadCrypter, create_getInfo class C1neonCom(DeadCrypter): diff --git a/pyload/plugins/crypter/CryptItCom.py b/pyload/plugins/crypter/CryptItCom.py index 2cf4e9f62..c420a25bc 100644 --- a/pyload/plugins/crypter/CryptItCom.py +++ b/pyload/plugins/crypter/CryptItCom.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.DeadCrypter import DeadCrypter, create_getInfo +from pyload.plugins.internal.DeadCrypter import DeadCrypter, create_getInfo class CryptItCom(DeadCrypter): diff --git a/pyload/plugins/crypter/DuploadOrg.py b/pyload/plugins/crypter/DuploadOrg.py index 48978577e..209c98dc9 100644 --- a/pyload/plugins/crypter/DuploadOrg.py +++ b/pyload/plugins/crypter/DuploadOrg.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.DeadCrypter import DeadCrypter, create_getInfo +from pyload.plugins.internal.DeadCrypter import DeadCrypter, create_getInfo class DuploadOrg(DeadCrypter): diff --git a/pyload/plugins/crypter/FilebeerInfo.py b/pyload/plugins/crypter/FilebeerInfo.py index 8b09cc8cb..514559f86 100644 --- a/pyload/plugins/crypter/FilebeerInfo.py +++ b/pyload/plugins/crypter/FilebeerInfo.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.DeadCrypter import DeadCrypter, create_getInfo +from pyload.plugins.internal.DeadCrypter import DeadCrypter, create_getInfo class FilebeerInfo(DeadCrypter): diff --git a/pyload/plugins/crypter/FilecryptCc.py b/pyload/plugins/crypter/FilecryptCc.py index dedd284b3..cb00da5e9 100644 --- a/pyload/plugins/crypter/FilecryptCc.py +++ b/pyload/plugins/crypter/FilecryptCc.py @@ -6,7 +6,7 @@ import re from Crypto.Cipher import AES -from module.plugins.Crypter import Crypter +from pyload.plugins.Crypter import Crypter class FilecryptCc(Crypter): @@ -18,7 +18,7 @@ class FilecryptCc(Crypter): __description__ = """Filecrypt.cc decrypter plugin""" __license__ = "GPLv3" - __authors__ = [("zapp-brannigan", "")] + __authors__ = [("zapp-brannigan", "fuerst.reinje@web.de")] # URL_REPLACEMENTS = [(r'.html$', ""), (r'$', ".html")] #@TODO: Extend SimpleCrypter diff --git a/pyload/plugins/crypter/FilesonicCom.py b/pyload/plugins/crypter/FilesonicCom.py index 7e436440d..0f07147bb 100644 --- a/pyload/plugins/crypter/FilesonicCom.py +++ b/pyload/plugins/crypter/FilesonicCom.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.DeadCrypter import DeadCrypter, create_getInfo +from pyload.plugins.internal.DeadCrypter import DeadCrypter, create_getInfo class FilesonicCom(DeadCrypter): diff --git a/pyload/plugins/crypter/FiredriveCom.py b/pyload/plugins/crypter/FiredriveCom.py index bc88b974c..dfc85c957 100644 --- a/pyload/plugins/crypter/FiredriveCom.py +++ b/pyload/plugins/crypter/FiredriveCom.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.DeadCrypter import DeadCrypter, create_getInfo +from pyload.plugins.internal.DeadCrypter import DeadCrypter, create_getInfo class FiredriveCom(DeadCrypter): diff --git a/pyload/plugins/crypter/HotfileCom.py b/pyload/plugins/crypter/HotfileCom.py index 79922f62f..eee4b745f 100644 --- a/pyload/plugins/crypter/HotfileCom.py +++ b/pyload/plugins/crypter/HotfileCom.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.DeadCrypter import DeadCrypter, create_getInfo +from pyload.plugins.internal.DeadCrypter import DeadCrypter, create_getInfo class HotfileCom(DeadCrypter): diff --git a/pyload/plugins/crypter/ILoadTo.py b/pyload/plugins/crypter/ILoadTo.py index f3415706d..2a58a57d0 100644 --- a/pyload/plugins/crypter/ILoadTo.py +++ b/pyload/plugins/crypter/ILoadTo.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.DeadCrypter import DeadCrypter, create_getInfo +from pyload.plugins.internal.DeadCrypter import DeadCrypter, create_getInfo class ILoadTo(DeadCrypter): diff --git a/pyload/plugins/crypter/LofCc.py b/pyload/plugins/crypter/LofCc.py index 65c9b18bd..89e34d58b 100644 --- a/pyload/plugins/crypter/LofCc.py +++ b/pyload/plugins/crypter/LofCc.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.DeadCrypter import DeadCrypter, create_getInfo +from pyload.plugins.internal.DeadCrypter import DeadCrypter, create_getInfo class LofCc(DeadCrypter): diff --git a/pyload/plugins/crypter/MBLinkInfo.py b/pyload/plugins/crypter/MBLinkInfo.py index 82c2d9719..efd9ade8a 100644 --- a/pyload/plugins/crypter/MBLinkInfo.py +++ b/pyload/plugins/crypter/MBLinkInfo.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.DeadCrypter import DeadCrypter, create_getInfo +from pyload.plugins.internal.DeadCrypter import DeadCrypter, create_getInfo class MBLinkInfo(DeadCrypter): diff --git a/pyload/plugins/crypter/MegauploadCom.py b/pyload/plugins/crypter/MegauploadCom.py index d052b7c61..af4ebf5c4 100644 --- a/pyload/plugins/crypter/MegauploadCom.py +++ b/pyload/plugins/crypter/MegauploadCom.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.DeadCrypter import DeadCrypter, create_getInfo +from pyload.plugins.internal.DeadCrypter import DeadCrypter, create_getInfo class MegauploadCom(DeadCrypter): diff --git a/pyload/plugins/crypter/Movie2kTo.py b/pyload/plugins/crypter/Movie2kTo.py index 0be7eb7eb..cd2138d9a 100644 --- a/pyload/plugins/crypter/Movie2kTo.py +++ b/pyload/plugins/crypter/Movie2kTo.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.DeadCrypter import DeadCrypter, create_getInfo +from pyload.plugins.internal.DeadCrypter import DeadCrypter, create_getInfo class Movie2kTo(DeadCrypter): diff --git a/pyload/plugins/crypter/MultiuploadCom.py b/pyload/plugins/crypter/MultiuploadCom.py index 03275477d..55bb39cc9 100644 --- a/pyload/plugins/crypter/MultiuploadCom.py +++ b/pyload/plugins/crypter/MultiuploadCom.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.DeadCrypter import DeadCrypter, create_getInfo +from pyload.plugins.internal.DeadCrypter import DeadCrypter, create_getInfo class MultiuploadCom(DeadCrypter): diff --git a/pyload/plugins/crypter/OronCom.py b/pyload/plugins/crypter/OronCom.py index f466492b3..ae695ef34 100644 --- a/pyload/plugins/crypter/OronCom.py +++ b/pyload/plugins/crypter/OronCom.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.DeadCrypter import DeadCrypter, create_getInfo +from pyload.plugins.internal.DeadCrypter import DeadCrypter, create_getInfo class OronCom(DeadCrypter): diff --git a/pyload/plugins/crypter/RSLayerCom.py b/pyload/plugins/crypter/RSLayerCom.py index cc3b23bbc..400c190d5 100644 --- a/pyload/plugins/crypter/RSLayerCom.py +++ b/pyload/plugins/crypter/RSLayerCom.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.DeadCrypter import DeadCrypter, create_getInfo +from pyload.plugins.internal.DeadCrypter import DeadCrypter, create_getInfo class RSLayerCom(DeadCrypter): diff --git a/pyload/plugins/crypter/SecuredIn.py b/pyload/plugins/crypter/SecuredIn.py index cbfa919ac..cea23a53c 100644 --- a/pyload/plugins/crypter/SecuredIn.py +++ b/pyload/plugins/crypter/SecuredIn.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.DeadCrypter import DeadCrypter, create_getInfo +from pyload.plugins.internal.DeadCrypter import DeadCrypter, create_getInfo class SecuredIn(DeadCrypter): diff --git a/pyload/plugins/crypter/SharingmatrixCom.py b/pyload/plugins/crypter/SharingmatrixCom.py index c875631f4..3ada25537 100644 --- a/pyload/plugins/crypter/SharingmatrixCom.py +++ b/pyload/plugins/crypter/SharingmatrixCom.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.DeadCrypter import DeadCrypter, create_getInfo +from pyload.plugins.internal.DeadCrypter import DeadCrypter, create_getInfo class SharingmatrixCom(DeadCrypter): diff --git a/pyload/plugins/crypter/SpeedLoadOrg.py b/pyload/plugins/crypter/SpeedLoadOrg.py index 3c1b1af22..0228a49d6 100644 --- a/pyload/plugins/crypter/SpeedLoadOrg.py +++ b/pyload/plugins/crypter/SpeedLoadOrg.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.DeadCrypter import DeadCrypter, create_getInfo +from pyload.plugins.internal.DeadCrypter import DeadCrypter, create_getInfo class SpeedLoadOrg(DeadCrypter): diff --git a/pyload/plugins/crypter/StealthTo.py b/pyload/plugins/crypter/StealthTo.py index e4da3e7e4..2e64a8cbd 100644 --- a/pyload/plugins/crypter/StealthTo.py +++ b/pyload/plugins/crypter/StealthTo.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.DeadCrypter import DeadCrypter, create_getInfo +from pyload.plugins.internal.DeadCrypter import DeadCrypter, create_getInfo class StealthTo(DeadCrypter): diff --git a/pyload/plugins/crypter/TrailerzoneInfo.py b/pyload/plugins/crypter/TrailerzoneInfo.py index abdb2307e..a1a7e8477 100644 --- a/pyload/plugins/crypter/TrailerzoneInfo.py +++ b/pyload/plugins/crypter/TrailerzoneInfo.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.DeadCrypter import DeadCrypter, create_getInfo +from pyload.plugins.internal.DeadCrypter import DeadCrypter, create_getInfo class TrailerzoneInfo(DeadCrypter): diff --git a/pyload/plugins/crypter/WiiReloadedOrg.py b/pyload/plugins/crypter/WiiReloadedOrg.py index c3c5b8222..d80a03940 100644 --- a/pyload/plugins/crypter/WiiReloadedOrg.py +++ b/pyload/plugins/crypter/WiiReloadedOrg.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.DeadCrypter import DeadCrypter, create_getInfo +from pyload.plugins.internal.DeadCrypter import DeadCrypter, create_getInfo class WiiReloadedOrg(DeadCrypter): diff --git a/pyload/plugins/crypter/WuploadCom.py b/pyload/plugins/crypter/WuploadCom.py index 4a004be66..f64b9afb6 100644 --- a/pyload/plugins/crypter/WuploadCom.py +++ b/pyload/plugins/crypter/WuploadCom.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.DeadCrypter import DeadCrypter, create_getInfo +from pyload.plugins.internal.DeadCrypter import DeadCrypter, create_getInfo class WuploadCom(DeadCrypter): diff --git a/pyload/plugins/hoster/XFileSharingPro.py b/pyload/plugins/hoster/XFileSharingPro.py new file mode 100644 index 000000000..f21ae34a4 --- /dev/null +++ b/pyload/plugins/hoster/XFileSharingPro.py @@ -0,0 +1,57 @@ +# -*- coding: utf-8 -*- + +import re + +from pyload.plugins.internal.XFSHoster import XFSHoster, create_getInfo + + +class XFileSharingPro(XFSHoster): + __name__ = "XFileSharingPro" + __type__ = "hoster" + __version__ = "0.43" + + __pattern__ = r'^unmatchable$' + + __description__ = """XFileSharingPro dummy hoster plugin for hook""" + __license__ = "GPLv3" + __authors__ = [("Walter Purcaro", "vuolter@gmail.com")] + + + URL_REPLACEMENTS = [("/embed-", "/")] + + + def _log(self, type, args): + msg = " | ".join([str(a).strip() for a in args if a]) + logger = getattr(self.log, type) + logger("%s: %s: %s" % (self.__name__, self.HOSTER_NAME, msg or _("%s MARK" % type.upper()))) + + + def init(self): + super(XFileSharingPro, self).init() + + self.__pattern__ = self.core.pluginManager.hosterPlugins[self.__name__]['pattern'] + + self.HOSTER_DOMAIN = re.match(self.__pattern__, self.pyfile.url).group(1).lower() + self.HOSTER_NAME = "".join([str.capitalize() for str in self.HOSTER_DOMAIN.split('.')]) + + account = self.core.accountManager.getAccountPlugin(self.HOSTER_NAME) + + if account and account.canUse(): + self.account = account + elif self.account: + self.account.HOSTER_DOMAIN = self.HOSTER_DOMAIN + else: + return + + self.user, data = self.account.selectAccount() + self.req = self.account.getAccountRequest(self.user) + self.premium = self.account.isPremium(self.user) + + + def setup(self): + self.chunkLimit = 1 + self.resumeDownload = self.premium + self.multiDL = True + + +getInfo = create_getInfo(XFileSharingPro) diff --git a/pyload/plugins/hoster/ZShareNet.py b/pyload/plugins/hoster/ZShareNet.py new file mode 100644 index 000000000..663377102 --- /dev/null +++ b/pyload/plugins/hoster/ZShareNet.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- + +from pyload.plugins.internal.DeadHoster import DeadHoster, create_getInfo + + +class ZShareNet(DeadHoster): + __name__ = "ZShareNet" + __type__ = "hoster" + __version__ = "0.21" + + __pattern__ = r'https?://(?:ww[2w]\.)?zshares?\.net/.+' + + __description__ = """ZShare.net hoster plugin""" + __license__ = "GPLv3" + __authors__ = [("espes", None), + ("Cptn Sandwich", None)] + + +getInfo = create_getInfo(ZShareNet) diff --git a/pyload/plugins/internal/Crypter.py b/pyload/plugins/internal/Crypter.py index 76880ca14..974ee60a1 100644 --- a/pyload/plugins/internal/Crypter.py +++ b/pyload/plugins/internal/Crypter.py @@ -3,7 +3,7 @@ from urlparse import urlparse from pyload.plugins.Plugin import Plugin -from pyload.utils import decode, html_unescape, save_filename +from pyload.utils import decode, html_unescape, safe_filename class Crypter(Plugin): -- cgit v1.2.3