From ea93f9b02ba59b026a35299798b71727db44b0c5 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 27 Dec 2014 13:42:52 +0100 Subject: [Dereferer][DontKnowMe] Extend SimpleDereferer --- module/plugins/crypter/Dereferer.py | 17 ++++------------- module/plugins/crypter/DontKnowMe.py | 22 +++++----------------- 2 files changed, 9 insertions(+), 30 deletions(-) (limited to 'module/plugins/crypter') diff --git a/module/plugins/crypter/Dereferer.py b/module/plugins/crypter/Dereferer.py index 398cadce7..0729c8cb6 100644 --- a/module/plugins/crypter/Dereferer.py +++ b/module/plugins/crypter/Dereferer.py @@ -1,26 +1,17 @@ # -*- coding: utf-8 -*- -import re +from module.plugins.internal.SimpleDereferer import SimpleDereferer -from urllib import unquote -from module.plugins.Crypter import Crypter - - -class Dereferer(Crypter): +class Dereferer(SimpleDereferer): __name__ = "Dereferer" __type__ = "crypter" - __version__ = "0.10" + __version__ = "0.11" - __pattern__ = r'https?://([^/]+)/.*?(?P(ht|f)tps?(://|%3A%2F%2F).*)' + __pattern__ = r'https?://([^/]+)/.*?(?P(ht|f)tps?(://|%3A%2F%2F).+)' __config__ = [("use_subfolder", "bool", "Save package to subfolder", True), ("subfolder_per_package", "bool", "Create a subfolder for each package", True)] __description__ = """Crypter for dereferers""" __license__ = "GPLv3" __authors__ = [("zoidberg", "zoidberg@mujmail.cz")] - - - def decrypt(self, pyfile): - link = re.match(self.__pattern__, pyfile.url).group('URL') - self.urls = [unquote(link).rstrip('+')] diff --git a/module/plugins/crypter/DontKnowMe.py b/module/plugins/crypter/DontKnowMe.py index 8d2a52c2c..d656cde4c 100644 --- a/module/plugins/crypter/DontKnowMe.py +++ b/module/plugins/crypter/DontKnowMe.py @@ -1,29 +1,17 @@ # -*- coding: utf-8 -*- -import re +from module.plugins.internal.SimpleDereferer import SimpleDereferer -from urllib import unquote -from module.plugins.Crypter import Crypter - - -class DontKnowMe(Crypter): +class DontKnowMe(SimpleDereferer): __name__ = "DontKnowMe" __type__ = "crypter" - __version__ = "0.10" + __version__ = "0.11" - __pattern__ = r'http://(?:www\.)?dontknow\.me/at/\?.+$' + __pattern__ = r'http://(?:www\.)?dontknow\.me/at/\?(?P.+)' __config__ = [("use_subfolder", "bool", "Save package to subfolder", True), ("subfolder_per_package", "bool", "Create a subfolder for each package", True)] __description__ = """DontKnow.me decrypter plugin""" __license__ = "GPLv3" - __authors__ = [("selaux", None)] - - - LINK_PATTERN = r'http://dontknow\.me/at/\?(.+)$' - - - def decrypt(self, pyfile): - link = re.findall(self.LINK_PATTERN, pyfile.url)[0] - self.urls = [unquote(link)] + __authors__ = [("selaux", "")] -- cgit v1.2.3 From fff27d3f639c5260b234c054682559744f1a00be Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 27 Dec 2014 13:54:24 +0100 Subject: [LinkSaveIn] Update --- module/plugins/crypter/LinkSaveIn.py | 239 +---------------------------------- 1 file changed, 6 insertions(+), 233 deletions(-) (limited to 'module/plugins/crypter') diff --git a/module/plugins/crypter/LinkSaveIn.py b/module/plugins/crypter/LinkSaveIn.py index 842310853..e96d0438e 100644 --- a/module/plugins/crypter/LinkSaveIn.py +++ b/module/plugins/crypter/LinkSaveIn.py @@ -1,249 +1,22 @@ # -*- coding: utf-8 -*- -# -# * cnl2 and web links are skipped if JS is not available (instead of failing the package) -# * only best available link source is used (priority: cnl2>rsdf>ccf>dlc>web -import base64 -import binascii -import re +from module.plugins.internal.SimpleDereferer import SimpleDereferer -from Crypto.Cipher import AES -from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo -from module.unescape import unescape - - -class LinkSaveIn(SimpleCrypter): +class LinkSaveIn(SimpleDereferer): __name__ = "LinkSaveIn" __type__ = "crypter" - __version__ = "2.02" + __version__ = "2.03" - __pattern__ = r'http://(?:www\.)?linksave\.in/(?P\w+)$' + __pattern__ = r'https?://(?:www\.)?linksave\.in/\w+' __config__ = [("use_subfolder", "bool", "Save package to subfolder", True), ("subfolder_per_package", "bool", "Create a subfolder for each package", True)] __description__ = """LinkSave.in decrypter plugin""" __license__ = "GPLv3" - __authors__ = [("fragonib", "fragonib[AT]yahoo[DOT]es")] + __authors__ = [("Walter Purcaro", "vuolter@gmail.com")] COOKIES = [("linksave.in", "Linksave_Language", "english")] - # Constants - _JK_KEY_ = "jk" - _CRYPTED_KEY_ = "crypted" - - - def setup(self): - self.fileid = None - self.captcha = False - self.package = None - self.preferred_sources = ["cnl2", "rsdf", "ccf", "dlc", "web"] - - - def decrypt(self, pyfile): - # Init - self.package = pyfile.package() - self.fileid = re.match(self.__pattern__, pyfile.url).group('ID') - - # Request package - self.html = self.load(pyfile.url) - if not self.isOnline(): - self.offline() - - # Check for protection - if self.isPasswordProtected(): - self.unlockPasswordProtection() - self.handleErrors() - - if self.isCaptchaProtected(): - self.captcha = True - self.unlockCaptchaProtection() - self.handleErrors() - - # Get package name and folder - (package_name, folder_name) = self.getPackageInfo() - - # Extract package links - package_links = [] - for type_ in self.preferred_sources: - package_links.extend(self.handleLinkSource(type_)) - if package_links: # use only first source which provides links - break - package_links = set(package_links) - - # Pack - if package_links: - self.packages = [(package_name, package_links, folder_name)] - - - def isOnline(self): - if "Error 404 - Folder not found!" in self.html: - self.logDebug("File not found") - return False - return True - - - def isPasswordProtected(self): - if re.search(r'''Captcha:" in self.html: - self.logDebug("Links are captcha protected") - return True - return False - - - def unlockPasswordProtection(self): - password = self.getPassword() - self.logDebug("Submitting password [%s] for protected links" % password) - post = {"id": self.fileid, "besucherpasswort": password, 'login': 'submit'} - self.html = self.load(self.pyfile.url, post=post) - - - def unlockCaptchaProtection(self): - captcha_hash = re.search(r'name="hash" value="([^"]+)', self.html).group(1) - captcha_url = re.search(r'src=".(/captcha/cap.php\?hsh=[^"]+)', self.html).group(1) - captcha_code = self.decryptCaptcha("http://linksave.in" + captcha_url, forceUser=True) - self.html = self.load(self.pyfile.url, post={"id": self.fileid, "hash": captcha_hash, "code": captcha_code}) - - - def getPackageInfo(self): - name = self.pyfile.package().name - folder = self.pyfile.package().folder - self.logDebug("Defaulting to pyfile name [%s] and folder [%s] for package" % (name, folder)) - return name, folder - - - def handleErrors(self): - if "The visitorpassword you have entered is wrong" in self.html: - self.logDebug("Incorrect password, please set right password on 'Edit package' form and retry") - self.fail(_("Incorrect password, please set right password on 'Edit package' form and retry")) - - if self.captcha: - if "Wrong code. Please retry" in self.html: - self.invalidCaptcha() - self.retry() - else: - self.correctCaptcha() - - - def handleLinkSource(self, type_): - if type_ == "cnl2": - return self.handleCNL2() - elif type_ in ("rsdf", "ccf", "dlc"): - return self.handleContainer(type_) - elif type_ == "web": - return self.handleWebLinks() - else: - self.error('Unknown source type "%s" (this is probably a bug)' % type_) - - - def handleWebLinks(self): - package_links = [] - self.logDebug("Search for Web links") - if not self.js: - self.logDebug("No JS -> skip Web links") - else: - #@TODO: Gather paginated web links - pattern = r'(.*)', res)[-1] - jseval = self.js.eval("document = { write: function(e) { return e; } }; %s" % jscode) - dlLink = re.search(r'http://linksave\.in/dl-\w+', jseval).group(0) - self.logDebug("JsEngine returns value [%s] for redirection link" % dlLink) - - res = self.load(dlLink) - link = unescape(re.search(r'", self.load("http://1kh.de/l/" + id)).group(1)) - self.urls.append(new_link) diff --git a/module/plugins/crypter/SafelinkingNet.py b/module/plugins/crypter/SafelinkingNet.py index 709083b51..a56a0a44c 100644 --- a/module/plugins/crypter/SafelinkingNet.py +++ b/module/plugins/crypter/SafelinkingNet.py @@ -14,7 +14,7 @@ from module.plugins.internal.CaptchaService import SolveMedia class SafelinkingNet(Crypter): __name__ = "SafelinkingNet" __type__ = "crypter" - __version__ = "0.11" + __version__ = "0.13" __pattern__ = r'https?://(?:www\.)?safelinking\.net/([pd])/\w+' __config__ = [("use_subfolder", "bool", "Save package to subfolder", True), @@ -42,6 +42,8 @@ class SafelinkingNet(Crypter): else: postData = {"post-protect": "1"} + self.html = self.load(url) + if "link-password" in self.html: postData['link-password'] = self.getPassword() diff --git a/module/plugins/crypter/XFileSharingProFolder.py b/module/plugins/crypter/XFileSharingProFolder.py index 10e4d8c83..5ad9f7678 100644 --- a/module/plugins/crypter/XFileSharingProFolder.py +++ b/module/plugins/crypter/XFileSharingProFolder.py @@ -8,7 +8,7 @@ from module.plugins.internal.XFSCrypter import XFSCrypter, create_getInfo class XFileSharingProFolder(XFSCrypter): __name__ = "XFileSharingProFolder" __type__ = "crypter" - __version__ = "0.03" + __version__ = "0.04" __pattern__ = r'^unmatchable$' __config__ = [("use_subfolder", "bool", "Save package to subfolder", True), @@ -30,21 +30,26 @@ class XFileSharingProFolder(XFSCrypter): self.__pattern__ = self.core.pluginManager.crypterPlugins[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('.')]) + self.HOSTER_DOMAIN = re.match(self.__pattern__, self.pyfile.url).group("DOMAIN").lower() + self.HOSTER_NAME = "".join([part.capitalize() for part in re.split(r'(\.|\d+)', self.HOSTER_DOMAIN) if part != '.']) + + if self.HOSTER_NAME[0].isdigit(): + self.HOSTER_NAME = '_' + self.HOSTER_NAME 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) + self.req = self.account.getAccountRequest(self.user) + self.premium = self.account.isPremium(self.user) getInfo = create_getInfo(XFileSharingProFolder) diff --git a/module/plugins/crypter/_1KhDe.py b/module/plugins/crypter/_1KhDe.py new file mode 100644 index 000000000..c8ac3020c --- /dev/null +++ b/module/plugins/crypter/_1KhDe.py @@ -0,0 +1,41 @@ +# -*- coding: utf-8 -*- + +import re + +from module.unescape import unescape +from module.plugins.Crypter import Crypter + + +class _1KhDe(Crypter): + __name__ = "1KhDe" + __type__ = "crypter" + __version__ = "0.11" + + __pattern__ = r'http://(?:www\.)?1kh\.de/f/' + __config__ = [("use_subfolder", "bool", "Save package to subfolder", True), + ("subfolder_per_package", "bool", "Create a subfolder for each package", True)] + + __description__ = """1kh.de decrypter plugin""" + __license__ = "GPLv3" + __authors__ = [("spoob", "spoob@pyload.org")] + + + def __init__(self, parent): + Crypter.__init__(self, parent) + self.parent = parent + + + def file_exists(self): + """ returns True or False + """ + return True + + + def proceed(self, url, location): + url = self.parent.url + self.html = self.load(url) + link_ids = re.findall(r"", self.load("http://1kh.de/l/" + id)).group(1)) + self.urls.append(new_link) diff --git a/module/plugins/crypter/_4ChanOrg.py b/module/plugins/crypter/_4ChanOrg.py new file mode 100644 index 000000000..a5e815639 --- /dev/null +++ b/module/plugins/crypter/_4ChanOrg.py @@ -0,0 +1,27 @@ +# -*- coding: utf-8 -*- +# +# Based on 4chandl by Roland Beermann (https://gist.github.com/enkore/3492599) + +import re + +from module.plugins.Crypter import Crypter + + +class _4ChanOrg(Crypter): + __name__ = "4ChanOrg" + __type__ = "crypter" + __version__ = "0.31" + + __pattern__ = r'http://(?:www\.)?boards\.4chan\.org/\w+/res/(\d+)' + __config__ = [("use_subfolder", "bool", "Save package to subfolder", True), + ("subfolder_per_package", "bool", "Create a subfolder for each package", True)] + + __description__ = """4chan.org folder decrypter plugin""" + __license__ = "GPLv3" + __authors__ = [] + + + def decrypt(self, pyfile): + pagehtml = self.load(pyfile.url) + images = set(re.findall(r'(images\.4chan\.org/[^/]*/src/[^"<]*)', pagehtml)) + self.urls = ["http://" + image for image in images] -- cgit v1.2.3 From ea2d07843d369d8b8fd2aa02930bf549ce94a661 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 9 Jan 2015 03:25:42 +0100 Subject: Spare fixes --- module/plugins/crypter/FourChanOrg.py | 27 ++++++++++++++++ module/plugins/crypter/OneKhDe.py | 42 +++++++++++++++++++++++++ module/plugins/crypter/XFileSharingProFolder.py | 2 +- module/plugins/crypter/_1KhDe.py | 41 ------------------------ module/plugins/crypter/_4ChanOrg.py | 27 ---------------- 5 files changed, 70 insertions(+), 69 deletions(-) create mode 100644 module/plugins/crypter/FourChanOrg.py create mode 100644 module/plugins/crypter/OneKhDe.py delete mode 100644 module/plugins/crypter/_1KhDe.py delete mode 100644 module/plugins/crypter/_4ChanOrg.py (limited to 'module/plugins/crypter') diff --git a/module/plugins/crypter/FourChanOrg.py b/module/plugins/crypter/FourChanOrg.py new file mode 100644 index 000000000..c3fe3db4b --- /dev/null +++ b/module/plugins/crypter/FourChanOrg.py @@ -0,0 +1,27 @@ +# -*- coding: utf-8 -*- +# +# Based on 4chandl by Roland Beermann (https://gist.github.com/enkore/3492599) + +import re + +from module.plugins.Crypter import Crypter + + +class FourChanOrg(Crypter): + __name__ = "FourChanOrg" + __type__ = "crypter" + __version__ = "0.31" + + __pattern__ = r'http://(?:www\.)?boards\.4chan\.org/\w+/res/(\d+)' + __config__ = [("use_subfolder", "bool", "Save package to subfolder", True), + ("subfolder_per_package", "bool", "Create a subfolder for each package", True)] + + __description__ = """4chan.org folder decrypter plugin""" + __license__ = "GPLv3" + __authors__ = [] + + + def decrypt(self, pyfile): + pagehtml = self.load(pyfile.url) + images = set(re.findall(r'(images\.4chan\.org/[^/]*/src/[^"<]*)', pagehtml)) + self.urls = ["http://" + image for image in images] diff --git a/module/plugins/crypter/OneKhDe.py b/module/plugins/crypter/OneKhDe.py new file mode 100644 index 000000000..3e75d97b5 --- /dev/null +++ b/module/plugins/crypter/OneKhDe.py @@ -0,0 +1,42 @@ +# -*- coding: utf-8 -*- + +import re + +from module.unescape import unescape + +from module.plugins.Crypter import Crypter + + +class OneKhDe(Crypter): + __name__ = "OneKhDe" + __type__ = "crypter" + __version__ = "0.11" + + __pattern__ = r'http://(?:www\.)?1kh\.de/f/' + __config__ = [("use_subfolder", "bool", "Save package to subfolder", True), + ("subfolder_per_package", "bool", "Create a subfolder for each package", True)] + + __description__ = """1kh.de decrypter plugin""" + __license__ = "GPLv3" + __authors__ = [("spoob", "spoob@pyload.org")] + + + def __init__(self, parent): + Crypter.__init__(self, parent) + self.parent = parent + + + def file_exists(self): + """ returns True or False + """ + return True + + + def proceed(self, url, location): + url = self.parent.url + self.html = self.load(url) + link_ids = re.findall(r"", self.load("http://1kh.de/l/" + id)).group(1)) + self.urls.append(new_link) diff --git a/module/plugins/crypter/XFileSharingProFolder.py b/module/plugins/crypter/XFileSharingProFolder.py index 5ad9f7678..55cd41931 100644 --- a/module/plugins/crypter/XFileSharingProFolder.py +++ b/module/plugins/crypter/XFileSharingProFolder.py @@ -34,7 +34,7 @@ class XFileSharingProFolder(XFSCrypter): self.HOSTER_NAME = "".join([part.capitalize() for part in re.split(r'(\.|\d+)', self.HOSTER_DOMAIN) if part != '.']) if self.HOSTER_NAME[0].isdigit(): - self.HOSTER_NAME = '_' + self.HOSTER_NAME + self.HOSTER_NAME = 'X' + self.HOSTER_NAME account = self.core.accountManager.getAccountPlugin(self.HOSTER_NAME) diff --git a/module/plugins/crypter/_1KhDe.py b/module/plugins/crypter/_1KhDe.py deleted file mode 100644 index c8ac3020c..000000000 --- a/module/plugins/crypter/_1KhDe.py +++ /dev/null @@ -1,41 +0,0 @@ -# -*- coding: utf-8 -*- - -import re - -from module.unescape import unescape -from module.plugins.Crypter import Crypter - - -class _1KhDe(Crypter): - __name__ = "1KhDe" - __type__ = "crypter" - __version__ = "0.11" - - __pattern__ = r'http://(?:www\.)?1kh\.de/f/' - __config__ = [("use_subfolder", "bool", "Save package to subfolder", True), - ("subfolder_per_package", "bool", "Create a subfolder for each package", True)] - - __description__ = """1kh.de decrypter plugin""" - __license__ = "GPLv3" - __authors__ = [("spoob", "spoob@pyload.org")] - - - def __init__(self, parent): - Crypter.__init__(self, parent) - self.parent = parent - - - def file_exists(self): - """ returns True or False - """ - return True - - - def proceed(self, url, location): - url = self.parent.url - self.html = self.load(url) - link_ids = re.findall(r"", self.load("http://1kh.de/l/" + id)).group(1)) - self.urls.append(new_link) diff --git a/module/plugins/crypter/_4ChanOrg.py b/module/plugins/crypter/_4ChanOrg.py deleted file mode 100644 index a5e815639..000000000 --- a/module/plugins/crypter/_4ChanOrg.py +++ /dev/null @@ -1,27 +0,0 @@ -# -*- coding: utf-8 -*- -# -# Based on 4chandl by Roland Beermann (https://gist.github.com/enkore/3492599) - -import re - -from module.plugins.Crypter import Crypter - - -class _4ChanOrg(Crypter): - __name__ = "4ChanOrg" - __type__ = "crypter" - __version__ = "0.31" - - __pattern__ = r'http://(?:www\.)?boards\.4chan\.org/\w+/res/(\d+)' - __config__ = [("use_subfolder", "bool", "Save package to subfolder", True), - ("subfolder_per_package", "bool", "Create a subfolder for each package", True)] - - __description__ = """4chan.org folder decrypter plugin""" - __license__ = "GPLv3" - __authors__ = [] - - - def decrypt(self, pyfile): - pagehtml = self.load(pyfile.url) - images = set(re.findall(r'(images\.4chan\.org/[^/]*/src/[^"<]*)', pagehtml)) - self.urls = ["http://" + image for image in images] -- cgit v1.2.3 From b4a26e4bdcfa697b833abac4b2a500000f24684f Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 9 Jan 2015 17:35:08 +0100 Subject: Fix some plugins name --- module/plugins/crypter/C1neonCom.py | 6 +++--- module/plugins/crypter/Movie2kTo.py | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'module/plugins/crypter') diff --git a/module/plugins/crypter/C1neonCom.py b/module/plugins/crypter/C1neonCom.py index bc58fbf1c..926633ff7 100644 --- a/module/plugins/crypter/C1neonCom.py +++ b/module/plugins/crypter/C1neonCom.py @@ -3,8 +3,8 @@ from module.plugins.internal.DeadCrypter import DeadCrypter, create_getInfo -class C1neonCom(DeadCrypter): - __name__ = "C1neonCom" +class C1NeonCom(DeadCrypter): + __name__ = "C1NeonCom" __type__ = "crypter" __version__ = "0.05" @@ -16,4 +16,4 @@ class C1neonCom(DeadCrypter): __authors__ = [("godofdream", "soilfiction@gmail.com")] -getInfo = create_getInfo(C1neonCom) +getInfo = create_getInfo(C1NeonCom) diff --git a/module/plugins/crypter/Movie2kTo.py b/module/plugins/crypter/Movie2kTo.py index 7d71950fd..76bf702ac 100644 --- a/module/plugins/crypter/Movie2kTo.py +++ b/module/plugins/crypter/Movie2kTo.py @@ -3,8 +3,8 @@ from module.plugins.internal.DeadCrypter import DeadCrypter, create_getInfo -class Movie2kTo(DeadCrypter): - __name__ = "Movie2kTo" +class Movie2KTo(DeadCrypter): + __name__ = "Movie2KTo" __type__ = "crypter" __version__ = "0.51" @@ -16,4 +16,4 @@ class Movie2kTo(DeadCrypter): __authors__ = [("4Christopher", "4Christopher@gmx.de")] -getInfo = create_getInfo(Movie2kTo) +getInfo = create_getInfo(Movie2KTo) -- cgit v1.2.3 From 9f427186b8e1c1d5b7cc2e16a7087271568e4390 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 10 Jan 2015 00:13:01 +0100 Subject: [MegaCoNz][MegaCoNzFolder] Improve __pattern__ --- module/plugins/crypter/MegaCoNzFolder.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'module/plugins/crypter') diff --git a/module/plugins/crypter/MegaCoNzFolder.py b/module/plugins/crypter/MegaCoNzFolder.py index caa2ab563..bec4eba22 100644 --- a/module/plugins/crypter/MegaCoNzFolder.py +++ b/module/plugins/crypter/MegaCoNzFolder.py @@ -1,14 +1,16 @@ # -*- coding: utf-8 -*- +import re + from module.plugins.internal.Crypter import Crypter class MegaCoNzFolder(Crypter): __name__ = "MegaCoNzFolder" __type__ = "crypter" - __version__ = "0.02" + __version__ = "0.03" - __pattern__ = r'https?://(?:www\.)?mega\.co\.nz/#F![\w+^_]![\w,\\-]+' + __pattern__ = r'(?:https?://(?:www\.)?mega\.co\.nz/|mega:|chrome:.+?)#F!(?P[\w+^_])!(?P[\w,\\-]+)' __config__ = [("use_subfolder", "bool", "Save package to subfolder", True), ("subfolder_per_package", "bool", "Create a subfolder for each package", True)] @@ -22,7 +24,8 @@ class MegaCoNzFolder(Crypter): def decrypt(self, pyfile): - self.html = self.load("http://rapidgen.org/linkfinder", post={'linklisturl': self.pyfile.url}) + url = "https://mega.co.nz/#F!%s!%s" % re.match(self.__pattern__, pyfile.url).groups() + self.html = self.load("http://rapidgen.org/linkfinder", post={'linklisturl': url}) self.urls = re.findall(r'(https://mega.co.nz/#N!.+?)<', self.html) if not self.urls: #@TODO: Remove in 0.4.10 -- cgit v1.2.3 From 4c43c2948fe0092ca6dfa8f5fa3e52325e01df5e Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 10 Jan 2015 02:16:58 +0100 Subject: [FilefactoryComFolder] Fix https://github.com/pyload/pyload/issues/961 --- module/plugins/crypter/FilefactoryComFolder.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'module/plugins/crypter') diff --git a/module/plugins/crypter/FilefactoryComFolder.py b/module/plugins/crypter/FilefactoryComFolder.py index 26e28acbd..261c7e01a 100644 --- a/module/plugins/crypter/FilefactoryComFolder.py +++ b/module/plugins/crypter/FilefactoryComFolder.py @@ -6,7 +6,7 @@ from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo class FilefactoryComFolder(SimpleCrypter): __name__ = "FilefactoryComFolder" __type__ = "crypter" - __version__ = "0.31" + __version__ = "0.32" __pattern__ = r'https?://(?:www\.)?filefactory\.com/(?:f|folder)/\w+' __config__ = [("use_subfolder", "bool", "Save package to subfolder", True), @@ -17,15 +17,15 @@ class FilefactoryComFolder(SimpleCrypter): __authors__ = [("stickell", "l.stickell@yahoo.it")] - LINK_PATTERN = r'' - NAME_PATTERN = r'

Files in (?P.+)

' - PAGES_PATTERN = r'data-paginator-totalPages="(\d+)"' - COOKIES = [("filefactory.com", "locale", "en_US.utf8")] + LINK_PATTERN = r'\s*
Files in (?P.+?)<' + PAGES_PATTERN = r'data-paginator-totalPages="(\d+)' + def loadPage(self, page_n): - return self.load(self.pyfile.url, get={'page': page_n}) + return self.load(self.pyfile.url, get={'page': page_n, 'show': 100}) getInfo = create_getInfo(FilefactoryComFolder) -- cgit v1.2.3 From 56db4681e9dfa77b1e616d600d19ba98c915fef9 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 13 Jan 2015 01:47:03 +0100 Subject: [FilerNet] Code cosmetics --- module/plugins/crypter/FilerNetFolder.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'module/plugins/crypter') diff --git a/module/plugins/crypter/FilerNetFolder.py b/module/plugins/crypter/FilerNetFolder.py index 00db173bb..d33e26ee8 100644 --- a/module/plugins/crypter/FilerNetFolder.py +++ b/module/plugins/crypter/FilerNetFolder.py @@ -6,7 +6,7 @@ from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo class FilerNetFolder(SimpleCrypter): __name__ = "FilerNetFolder" __type__ = "crypter" - __version__ = "0.41" + __version__ = "0.42" __pattern__ = r'https?://filer\.net/folder/\w{16}' __config__ = [("use_subfolder", "bool", "Save package to subfolder", True), @@ -19,11 +19,9 @@ class FilerNetFolder(SimpleCrypter): LINK_PATTERN = r'href="(/get/\w{16})">(?!<)' - NAME_PATTERN = r'

(?P.+?) - (?P.+?) - Date: Tue, 13 Jan 2015 23:11:10 +0100 Subject: [XFSHoster] Auto-resolve HOSTER_DOMAIN --- module/plugins/crypter/EasybytezComFolder.py | 2 -- module/plugins/crypter/JunocloudMeFolder.py | 23 ----------------------- module/plugins/crypter/RapidfileshareNetFolder.py | 23 ----------------------- module/plugins/crypter/TusfilesNetFolder.py | 2 -- 4 files changed, 50 deletions(-) delete mode 100644 module/plugins/crypter/JunocloudMeFolder.py delete mode 100644 module/plugins/crypter/RapidfileshareNetFolder.py (limited to 'module/plugins/crypter') diff --git a/module/plugins/crypter/EasybytezComFolder.py b/module/plugins/crypter/EasybytezComFolder.py index 04f9b853b..6c643e83f 100644 --- a/module/plugins/crypter/EasybytezComFolder.py +++ b/module/plugins/crypter/EasybytezComFolder.py @@ -17,8 +17,6 @@ class EasybytezComFolder(XFSCrypter): __authors__ = [("stickell", "l.stickell@yahoo.it")] - HOSTER_DOMAIN = "easybytez.com" - LOGIN_ACCOUNT = True diff --git a/module/plugins/crypter/JunocloudMeFolder.py b/module/plugins/crypter/JunocloudMeFolder.py deleted file mode 100644 index 990f25902..000000000 --- a/module/plugins/crypter/JunocloudMeFolder.py +++ /dev/null @@ -1,23 +0,0 @@ -# -*- coding: utf-8 -*- - -from module.plugins.internal.XFSCrypter import XFSCrypter, create_getInfo - - -class JunocloudMeFolder(XFSCrypter): - __name__ = "JunocloudMeFolder" - __type__ = "crypter" - __version__ = "0.03" - - __pattern__ = r'http://(?:www\.)?junocloud\.me/folders/(?P\d+/\w+)' - __config__ = [("use_subfolder", "bool", "Save package to subfolder", True), - ("subfolder_per_package", "bool", "Create a subfolder for each package", True)] - - __description__ = """Junocloud.me folder decrypter plugin""" - __license__ = "GPLv3" - __authors__ = [("guidobelix", "guidobelix@hotmail.it")] - - - HOSTER_DOMAIN = "junocloud.me" - - -getInfo = create_getInfo(JunocloudMeFolder) diff --git a/module/plugins/crypter/RapidfileshareNetFolder.py b/module/plugins/crypter/RapidfileshareNetFolder.py deleted file mode 100644 index fc3d4241e..000000000 --- a/module/plugins/crypter/RapidfileshareNetFolder.py +++ /dev/null @@ -1,23 +0,0 @@ -# -*- coding: utf-8 -*- - -from module.plugins.internal.XFSCrypter import XFSCrypter, create_getInfo - - -class RapidfileshareNetFolder(XFSCrypter): - __name__ = "RapidfileshareNetFolder" - __type__ = "crypter" - __version__ = "0.03" - - __pattern__ = r'http://(?:www\.)?rapidfileshare\.net/users/\w+/\d+/\w+' - __config__ = [("use_subfolder", "bool", "Save package to subfolder", True), - ("subfolder_per_package", "bool", "Create a subfolder for each package", True)] - - __description__ = """Rapidfileshare.net folder decrypter plugin""" - __license__ = "GPLv3" - __authors__ = [("guidobelix", "guidobelix@hotmail.it")] - - - HOSTER_DOMAIN = "rapidfileshare.net" - - -getInfo = create_getInfo(RapidfileshareNetFolder) diff --git a/module/plugins/crypter/TusfilesNetFolder.py b/module/plugins/crypter/TusfilesNetFolder.py index 20bed0ab1..cb8efc9a8 100644 --- a/module/plugins/crypter/TusfilesNetFolder.py +++ b/module/plugins/crypter/TusfilesNetFolder.py @@ -22,8 +22,6 @@ class TusfilesNetFolder(XFSCrypter): ("stickell", "l.stickell@yahoo.it")] - HOSTER_DOMAIN = "tusfiles.net" - PAGES_PATTERN = r'>\((\d+) \w+\)<' URL_REPLACEMENTS = [(__pattern__ + ".*", r'https://www.tusfiles.net/go/\g/')] -- cgit v1.2.3 From e1baccf1ec914563d3b2b845906cce024e7cd3b1 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 13 Jan 2015 23:14:50 +0100 Subject: Replace 'except' with 'except Exception' --- module/plugins/crypter/ChipDe.py | 2 +- module/plugins/crypter/Go4UpCom.py | 2 +- module/plugins/crypter/LinkCryptWs.py | 2 +- module/plugins/crypter/NCryptIn.py | 2 +- module/plugins/crypter/RelinkUs.py | 4 ++-- module/plugins/crypter/ShareLinksBiz.py | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) (limited to 'module/plugins/crypter') diff --git a/module/plugins/crypter/ChipDe.py b/module/plugins/crypter/ChipDe.py index 133e5a005..2fc36c355 100644 --- a/module/plugins/crypter/ChipDe.py +++ b/module/plugins/crypter/ChipDe.py @@ -22,7 +22,7 @@ class ChipDe(Crypter): self.html = self.load(pyfile.url) try: f = re.search(r'"(http://video\.chip\.de/.+)"', self.html) - except: + except Exception: self.fail(_("Failed to find the URL")) else: self.urls = [f.group(1)] diff --git a/module/plugins/crypter/Go4UpCom.py b/module/plugins/crypter/Go4UpCom.py index 102bc32b5..a7e16c0ab 100644 --- a/module/plugins/crypter/Go4UpCom.py +++ b/module/plugins/crypter/Go4UpCom.py @@ -40,7 +40,7 @@ class Go4UpCom(SimpleCrypter): for html in pages: try: links.append(re.search(r' Date: Wed, 14 Jan 2015 12:43:54 +0100 Subject: [FilecryptCc.py] Added support for ReCaptchaV2 Fix for https://github.com/pyload/pyload/issues/976 --- module/plugins/crypter/FilecryptCc.py | 31 ++++++++++++++----------------- 1 file changed, 14 insertions(+), 17 deletions(-) (limited to 'module/plugins/crypter') diff --git a/module/plugins/crypter/FilecryptCc.py b/module/plugins/crypter/FilecryptCc.py index af31dc743..51e6eb296 100644 --- a/module/plugins/crypter/FilecryptCc.py +++ b/module/plugins/crypter/FilecryptCc.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- - +# http://filecrypt.cc/Container/64E039F859.html import base64 import binascii import re @@ -8,13 +8,13 @@ from Crypto.Cipher import AES from urlparse import urljoin from module.plugins.Crypter import Crypter -from module.plugins.internal.CaptchaService import ReCaptcha +from module.plugins.internal.CaptchaService import ReCaptchaV2 class FilecryptCc(Crypter): __name__ = "FilecryptCc" __type__ = "crypter" - __version__ = "0.09" + __version__ = "0.10" __pattern__ = r'https?://(?:www\.)?filecrypt\.cc/Container/\w+' @@ -74,7 +74,7 @@ class FilecryptCc(Crypter): self.logInfo(_("Folder is password protected")) password = self.getPassword() - + if not password: self.fail(_("Please enter the password in package section and try again")) @@ -108,20 +108,17 @@ class FilecryptCc(Crypter): post={'button.x': captcha_code[0], 'button.y': captcha_code[1]}, cookies=True, decode=True) + + elif 'class="g-recaptcha"' in self.html: #: ReCaptchaV2 + captcha = ReCaptchaV2(self) + response = captcha.doTheCaptcha(self.pyfile.url.split("/")[2]) + self.siteWithLinks = self.load(self.pyfile.url, cookies=True, decode=True, post={"g-recaptcha-response":response}) + else: - recaptcha = ReCaptcha(self) - captcha_key = recaptcha.detect_key() - - if captcha_key: - self.siteWithLinks = self.load(self.pyfile.url, - post={'g-recaptcha-response': recaptcha.challenge(captcha_key, True)}, - cookies=True, - decode=True) - else: - self.logDebug("No captcha found") - self.siteWithLinks = self.html - - if "recaptcha_image" in self.siteWithLinks: + self.logInfo(_("No captcha found")) + self.siteWithLinks = self.html + + if "recaptcha_image" in self.siteWithLinks or "data-sitekey" in self.siteWithLinks: self.invalidCaptcha() self.retry() -- cgit v1.2.3 From c4f167e267ba949ee20ec8a6d3c611d6dd93b325 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 20 Jan 2015 01:22:00 +0100 Subject: Fix plugin filename case --- module/plugins/crypter/C1NeonCom.py | 19 +++++++++++++++++++ module/plugins/crypter/C1neonCom.py | 19 ------------------- module/plugins/crypter/Movie2KTo.py | 19 +++++++++++++++++++ module/plugins/crypter/Movie2kTo.py | 19 ------------------- module/plugins/crypter/OronComFolder.py | 0 5 files changed, 38 insertions(+), 38 deletions(-) create mode 100644 module/plugins/crypter/C1NeonCom.py delete mode 100644 module/plugins/crypter/C1neonCom.py create mode 100644 module/plugins/crypter/Movie2KTo.py delete mode 100644 module/plugins/crypter/Movie2kTo.py mode change 100755 => 100644 module/plugins/crypter/OronComFolder.py (limited to 'module/plugins/crypter') diff --git a/module/plugins/crypter/C1NeonCom.py b/module/plugins/crypter/C1NeonCom.py new file mode 100644 index 000000000..926633ff7 --- /dev/null +++ b/module/plugins/crypter/C1NeonCom.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- + +from module.plugins.internal.DeadCrypter import DeadCrypter, create_getInfo + + +class C1NeonCom(DeadCrypter): + __name__ = "C1NeonCom" + __type__ = "crypter" + __version__ = "0.05" + + __pattern__ = r'http://(?:www\.)?c1neon\.com/.+' + __config__ = [] + + __description__ = """C1neon.com decrypter plugin""" + __license__ = "GPLv3" + __authors__ = [("godofdream", "soilfiction@gmail.com")] + + +getInfo = create_getInfo(C1NeonCom) diff --git a/module/plugins/crypter/C1neonCom.py b/module/plugins/crypter/C1neonCom.py deleted file mode 100644 index 926633ff7..000000000 --- a/module/plugins/crypter/C1neonCom.py +++ /dev/null @@ -1,19 +0,0 @@ -# -*- coding: utf-8 -*- - -from module.plugins.internal.DeadCrypter import DeadCrypter, create_getInfo - - -class C1NeonCom(DeadCrypter): - __name__ = "C1NeonCom" - __type__ = "crypter" - __version__ = "0.05" - - __pattern__ = r'http://(?:www\.)?c1neon\.com/.+' - __config__ = [] - - __description__ = """C1neon.com decrypter plugin""" - __license__ = "GPLv3" - __authors__ = [("godofdream", "soilfiction@gmail.com")] - - -getInfo = create_getInfo(C1NeonCom) diff --git a/module/plugins/crypter/Movie2KTo.py b/module/plugins/crypter/Movie2KTo.py new file mode 100644 index 000000000..76bf702ac --- /dev/null +++ b/module/plugins/crypter/Movie2KTo.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- + +from module.plugins.internal.DeadCrypter import DeadCrypter, create_getInfo + + +class Movie2KTo(DeadCrypter): + __name__ = "Movie2KTo" + __type__ = "crypter" + __version__ = "0.51" + + __pattern__ = r'http://(?:www\.)?movie2k\.to/(.+)\.html' + __config__ = [] + + __description__ = """Movie2k.to decrypter plugin""" + __license__ = "GPLv3" + __authors__ = [("4Christopher", "4Christopher@gmx.de")] + + +getInfo = create_getInfo(Movie2KTo) diff --git a/module/plugins/crypter/Movie2kTo.py b/module/plugins/crypter/Movie2kTo.py deleted file mode 100644 index 76bf702ac..000000000 --- a/module/plugins/crypter/Movie2kTo.py +++ /dev/null @@ -1,19 +0,0 @@ -# -*- coding: utf-8 -*- - -from module.plugins.internal.DeadCrypter import DeadCrypter, create_getInfo - - -class Movie2KTo(DeadCrypter): - __name__ = "Movie2KTo" - __type__ = "crypter" - __version__ = "0.51" - - __pattern__ = r'http://(?:www\.)?movie2k\.to/(.+)\.html' - __config__ = [] - - __description__ = """Movie2k.to decrypter plugin""" - __license__ = "GPLv3" - __authors__ = [("4Christopher", "4Christopher@gmx.de")] - - -getInfo = create_getInfo(Movie2KTo) diff --git a/module/plugins/crypter/OronComFolder.py b/module/plugins/crypter/OronComFolder.py old mode 100755 new mode 100644 -- cgit v1.2.3 From cf4ded052964047de88d676045329b8fa4fca2dc Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Thu, 22 Jan 2015 21:31:19 +0100 Subject: Update plugins after CaptchaService changes --- module/plugins/crypter/FilecryptCc.py | 26 +++++++++++++++----------- module/plugins/crypter/MegaCoNzFolder.py | 2 +- module/plugins/crypter/NCryptIn.py | 6 +++--- module/plugins/crypter/RelinkUs.py | 6 ++++-- module/plugins/crypter/SafelinkingNet.py | 4 ++-- 5 files changed, 25 insertions(+), 19 deletions(-) (limited to 'module/plugins/crypter') diff --git a/module/plugins/crypter/FilecryptCc.py b/module/plugins/crypter/FilecryptCc.py index 51e6eb296..096fd414d 100644 --- a/module/plugins/crypter/FilecryptCc.py +++ b/module/plugins/crypter/FilecryptCc.py @@ -8,13 +8,13 @@ from Crypto.Cipher import AES from urlparse import urljoin from module.plugins.Crypter import Crypter -from module.plugins.internal.CaptchaService import ReCaptchaV2 +from module.plugins.internal.CaptchaService import ReCaptcha class FilecryptCc(Crypter): __name__ = "FilecryptCc" __type__ = "crypter" - __version__ = "0.10" + __version__ = "0.11" __pattern__ = r'https?://(?:www\.)?filecrypt\.cc/Container/\w+' @@ -74,7 +74,7 @@ class FilecryptCc(Crypter): self.logInfo(_("Folder is password protected")) password = self.getPassword() - + if not password: self.fail(_("Please enter the password in package section and try again")) @@ -108,15 +108,19 @@ class FilecryptCc(Crypter): post={'button.x': captcha_code[0], 'button.y': captcha_code[1]}, cookies=True, decode=True) - - elif 'class="g-recaptcha"' in self.html: #: ReCaptchaV2 - captcha = ReCaptchaV2(self) - response = captcha.doTheCaptcha(self.pyfile.url.split("/")[2]) - self.siteWithLinks = self.load(self.pyfile.url, cookies=True, decode=True, post={"g-recaptcha-response":response}) - + else: - self.logInfo(_("No captcha found")) - self.siteWithLinks = self.html + recaptcha = ReCaptcha(self) + captcha_key = recaptcha.detect_key() + + if captcha_key: + response, challenge = recaptcha.challenge(captcha_key) + self.siteWithLinks = self.load(self.pyfile.url, + post={'g-recaptcha-response': response}, + decode=True) + else: + self.logInfo(_("No captcha found")) + self.siteWithLinks = self.html if "recaptcha_image" in self.siteWithLinks or "data-sitekey" in self.siteWithLinks: self.invalidCaptcha() diff --git a/module/plugins/crypter/MegaCoNzFolder.py b/module/plugins/crypter/MegaCoNzFolder.py index bec4eba22..954bfb9a5 100644 --- a/module/plugins/crypter/MegaCoNzFolder.py +++ b/module/plugins/crypter/MegaCoNzFolder.py @@ -29,4 +29,4 @@ class MegaCoNzFolder(Crypter): self.urls = re.findall(r'(https://mega.co.nz/#N!.+?)<', self.html) if not self.urls: #@TODO: Remove in 0.4.10 - self.fail("No link grabbed") + self.fail(_("No link grabbed")) diff --git a/module/plugins/crypter/NCryptIn.py b/module/plugins/crypter/NCryptIn.py index 7c881ce75..f75f6d484 100644 --- a/module/plugins/crypter/NCryptIn.py +++ b/module/plugins/crypter/NCryptIn.py @@ -13,7 +13,7 @@ from module.plugins.internal.CaptchaService import ReCaptcha class NCryptIn(Crypter): __name__ = "NCryptIn" __type__ = "crypter" - __version__ = "1.33" + __version__ = "1.34" __pattern__ = r'http://(?:www\.)?ncrypt\.in/(?Pfolder|link|frame)-([^/\?]+)' __config__ = [("use_subfolder", "bool", "Save package to subfolder", True), @@ -156,7 +156,7 @@ class NCryptIn(Crypter): captcha_key = re.search(r'\?k=(.*?)"', form).group(1) self.logDebug("Resolving ReCaptcha with key [%s]" % captcha_key) recaptcha = ReCaptcha(self) - challenge, response = recaptcha.challenge(captcha_key) + response, challenge = recaptcha.challenge(captcha_key) postData['recaptcha_challenge_field'] = challenge postData['recaptcha_response_field'] = response @@ -205,7 +205,7 @@ class NCryptIn(Crypter): elif link_source_type == "web": return self.handleWebLinks() else: - self.error('Unknown source type "%s" (this is probably a bug)' % link_source_type) + self.error(_('Unknown source type "%s"') % link_source_type) def handleSingleLink(self): diff --git a/module/plugins/crypter/RelinkUs.py b/module/plugins/crypter/RelinkUs.py index 0fd80d593..a6014c866 100644 --- a/module/plugins/crypter/RelinkUs.py +++ b/module/plugins/crypter/RelinkUs.py @@ -191,7 +191,7 @@ class RelinkUs(Crypter): elif source == 'web': return self.handleWEBLinks() else: - self.error('Unknown source type "%s" (this is probably a bug)' % source) + self.error(_('Unknown source type "%s"') % source) def handleCNL2Links(self): @@ -223,8 +223,10 @@ class RelinkUs(Crypter): with open(dlc_filepath, "wb") as f: f.write(dlc) package_links.append(dlc_filepath) + except Exception: - self.fail("Unable to download DLC container") + self.fail(_("Unable to download DLC container")) + return package_links diff --git a/module/plugins/crypter/SafelinkingNet.py b/module/plugins/crypter/SafelinkingNet.py index a56a0a44c..8e46e1e41 100644 --- a/module/plugins/crypter/SafelinkingNet.py +++ b/module/plugins/crypter/SafelinkingNet.py @@ -14,7 +14,7 @@ from module.plugins.internal.CaptchaService import SolveMedia class SafelinkingNet(Crypter): __name__ = "SafelinkingNet" __type__ = "crypter" - __version__ = "0.13" + __version__ = "0.14" __pattern__ = r'https?://(?:www\.)?safelinking\.net/([pd])/\w+' __config__ = [("use_subfolder", "bool", "Save package to subfolder", True), @@ -57,7 +57,7 @@ class SafelinkingNet(Crypter): else: self.fail(_("Error parsing captcha")) - challenge, response = captcha.challenge(captchaKey) + response, challenge = captcha.challenge(captchaKey) postData['adcopy_challenge'] = challenge postData['adcopy_response'] = response -- cgit v1.2.3 From 031d86706aa13270793e31c21ad3f386ca62752b Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 24 Jan 2015 03:50:33 +0100 Subject: Spare code improvements --- module/plugins/crypter/CloudzillaToFolder.py | 6 +----- module/plugins/crypter/DevhostStFolder.py | 6 +----- 2 files changed, 2 insertions(+), 10 deletions(-) (limited to 'module/plugins/crypter') diff --git a/module/plugins/crypter/CloudzillaToFolder.py b/module/plugins/crypter/CloudzillaToFolder.py index c156d4de4..76019d928 100644 --- a/module/plugins/crypter/CloudzillaToFolder.py +++ b/module/plugins/crypter/CloudzillaToFolder.py @@ -10,7 +10,7 @@ from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo class CloudzillaToFolder(SimpleHoster): __name__ = "CloudzillaToFolder" __type__ = "crypter" - __version__ = "0.01" + __version__ = "0.02" __pattern__ = r'http://(?:www\.)?cloudzilla\.to/share/folder/(?P[\w^_]+)' @@ -36,8 +36,4 @@ class CloudzillaToFolder(SimpleHoster): self.retry(reason="Wrong password") - def getLinks(self): - return [urljoin("http://www.cloudzilla.to", link) for link in super(CloudzillaToFolder, self).getLinks()] - - getInfo = create_getInfo(CloudzillaToFolder) diff --git a/module/plugins/crypter/DevhostStFolder.py b/module/plugins/crypter/DevhostStFolder.py index 5ac9d4faf..8779cae5e 100644 --- a/module/plugins/crypter/DevhostStFolder.py +++ b/module/plugins/crypter/DevhostStFolder.py @@ -13,7 +13,7 @@ from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo class DevhostStFolder(SimpleCrypter): __name__ = "DevhostStFolder" __type__ = "crypter" - __version__ = "0.03" + __version__ = "0.04" __pattern__ = r'http://(?:www\.)?d-h\.st/users/(?P\w+)(/\?fld_id=(?P\d+))?' __config__ = [("use_subfolder", "bool", "Save package to subfolder", True), @@ -54,8 +54,4 @@ class DevhostStFolder(SimpleCrypter): return {'name': name, 'folder': folder} - def getLinks(self): - return [urljoin("http://d-h.st", link) for link in re.findall(self.LINK_PATTERN, self.html)] - - getInfo = create_getInfo(DevhostStFolder) -- cgit v1.2.3 From cb9e67a5437ddfafd6a93f5a208b9faf3f2d5575 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Thu, 29 Jan 2015 15:56:57 +0100 Subject: Some file encoding fixup + optimizations --- module/plugins/crypter/RelinkUs.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'module/plugins/crypter') diff --git a/module/plugins/crypter/RelinkUs.py b/module/plugins/crypter/RelinkUs.py index a6014c866..2165445b6 100644 --- a/module/plugins/crypter/RelinkUs.py +++ b/module/plugins/crypter/RelinkUs.py @@ -9,12 +9,13 @@ import os from Crypto.Cipher import AES from module.plugins.Crypter import Crypter +from module.utils import save_join class RelinkUs(Crypter): __name__ = "RelinkUs" __type__ = "crypter" - __version__ = "3.11" + __version__ = "3.12" __pattern__ = r'http://(?:www\.)?relink\.us/(f/|((view|go)\.php\?id=))(?P.+)' __config__ = [("use_subfolder", "bool", "Save package to subfolder", True), @@ -219,7 +220,7 @@ class RelinkUs(Crypter): try: dlc = self.load(container_url) dlc_filename = self.fileid + ".dlc" - dlc_filepath = os.path.join(self.config['general']['download_folder'], dlc_filename) + dlc_filepath = save_join(self.config['general']['download_folder'], dlc_filename) with open(dlc_filepath, "wb") as f: f.write(dlc) package_links.append(dlc_filepath) -- cgit v1.2.3 From 79725268402043906f619f7c09e848e02ab8a17b Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 31 Jan 2015 22:00:59 +0100 Subject: Spare code cosmetics --- module/plugins/crypter/EmbeduploadCom.py | 4 ++-- module/plugins/crypter/FilecryptCc.py | 7 ++----- module/plugins/crypter/LinkCryptWs.py | 6 +----- module/plugins/crypter/MultiloadCz.py | 4 ++-- module/plugins/crypter/NCryptIn.py | 6 +----- module/plugins/crypter/RelinkUs.py | 6 +----- module/plugins/crypter/ShareLinksBiz.py | 16 +++++----------- module/plugins/crypter/XFileSharingProFolder.py | 4 ++-- 8 files changed, 16 insertions(+), 37 deletions(-) (limited to 'module/plugins/crypter') diff --git a/module/plugins/crypter/EmbeduploadCom.py b/module/plugins/crypter/EmbeduploadCom.py index be3181793..456e48a32 100644 --- a/module/plugins/crypter/EmbeduploadCom.py +++ b/module/plugins/crypter/EmbeduploadCom.py @@ -35,7 +35,7 @@ class EmbeduploadCom(Crypter): self.logDebug("PF: %s" % prefered_set) - tmp_links.extend([x[1] for x in m if x[0] in prefered_set]) + tmp_links.extend(x[1] for x in m if x[0] in prefered_set) self.urls = self.getLocation(tmp_links) if not self.urls: @@ -44,7 +44,7 @@ class EmbeduploadCom(Crypter): self.logDebug("IG: %s" % ignored_set) - tmp_links.extend([x[1] for x in m if x[0] not in ignored_set]) + tmp_links.extend(x[1] for x in m if x[0] not in ignored_set) self.urls = self.getLocation(tmp_links) diff --git a/module/plugins/crypter/FilecryptCc.py b/module/plugins/crypter/FilecryptCc.py index 096fd414d..6773ce9b6 100644 --- a/module/plugins/crypter/FilecryptCc.py +++ b/module/plugins/crypter/FilecryptCc.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # http://filecrypt.cc/Container/64E039F859.html -import base64 + import binascii import re @@ -167,14 +167,11 @@ class FilecryptCc(Crypter): # Get key key = binascii.unhexlify(str(jk)) - # Decode crypted - crypted = base64.standard_b64decode(crypted) - # Decrypt Key = key IV = key obj = AES.new(Key, AES.MODE_CBC, IV) - text = obj.decrypt(crypted) + text = obj.decrypt(crypted.decode('base64')) # Extract links links = filter(lambda x: x != "", diff --git a/module/plugins/crypter/LinkCryptWs.py b/module/plugins/crypter/LinkCryptWs.py index c67372e3d..098f2542f 100644 --- a/module/plugins/crypter/LinkCryptWs.py +++ b/module/plugins/crypter/LinkCryptWs.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -import base64 import binascii import re @@ -307,14 +306,11 @@ class LinkCryptWs(Crypter): self.logDebug("JsEngine returns value [%s]" % jreturn) - # Decode crypted - crypted = base64.standard_b64decode(crypted) - # Decrypt Key = key IV = key obj = AES.new(Key, AES.MODE_CBC, IV) - text = obj.decrypt(crypted) + text = obj.decrypt(crypted.decode('base64')) # Extract links text = text.replace("\x00", "").replace("\r", "") diff --git a/module/plugins/crypter/MultiloadCz.py b/module/plugins/crypter/MultiloadCz.py index fa1eb02d7..55f424f36 100644 --- a/module/plugins/crypter/MultiloadCz.py +++ b/module/plugins/crypter/MultiloadCz.py @@ -35,8 +35,8 @@ class MultiloadCz(Crypter): m = re.findall(self.LINK_PATTERN, self.html) if m: prefered_set = set(self.getConfig("usedHoster").split('|')) - self.urls.extend([x[1] for x in m if x[0] in prefered_set]) + self.urls.extend(x[1] for x in m if x[0] in prefered_set) if not self.urls: ignored_set = set(self.getConfig("ignoredHoster").split('|')) - self.urls.extend([x[1] for x in m if x[0] not in ignored_set]) + self.urls.extend(x[1] for x in m if x[0] not in ignored_set) diff --git a/module/plugins/crypter/NCryptIn.py b/module/plugins/crypter/NCryptIn.py index f75f6d484..ecb913586 100644 --- a/module/plugins/crypter/NCryptIn.py +++ b/module/plugins/crypter/NCryptIn.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -import base64 import binascii import re @@ -296,14 +295,11 @@ class NCryptIn(Crypter): self.logDebug("JsEngine returns value [%s]" % jreturn) key = binascii.unhexlify(jreturn) - # Decode crypted - crypted = base64.standard_b64decode(crypted) - # Decrypt Key = key IV = key obj = AES.new(Key, AES.MODE_CBC, IV) - text = obj.decrypt(crypted) + text = obj.decrypt(crypted.decode('base64')) # Extract links text = text.replace("\x00", "").replace("\r", "") diff --git a/module/plugins/crypter/RelinkUs.py b/module/plugins/crypter/RelinkUs.py index 2165445b6..860dff06b 100644 --- a/module/plugins/crypter/RelinkUs.py +++ b/module/plugins/crypter/RelinkUs.py @@ -2,7 +2,6 @@ from __future__ import with_statement -import base64 import binascii import re import os @@ -279,14 +278,11 @@ class RelinkUs(Crypter): self.logDebug("JsEngine returns value [%s]" % jreturn) key = binascii.unhexlify(jreturn) - # Decode crypted - crypted = base64.standard_b64decode(crypted) - # Decrypt Key = key IV = key obj = AES.new(Key, AES.MODE_CBC, IV) - text = obj.decrypt(crypted) + text = obj.decrypt(crypted.decode('base64')) # Extract links text = text.replace("\x00", "").replace("\r", "") diff --git a/module/plugins/crypter/ShareLinksBiz.py b/module/plugins/crypter/ShareLinksBiz.py index df53b5879..d79735d42 100644 --- a/module/plugins/crypter/ShareLinksBiz.py +++ b/module/plugins/crypter/ShareLinksBiz.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -import base64 import binascii import re @@ -248,14 +247,12 @@ class ShareLinksBiz(Crypter): params = res.split(";;") # Get jk - strlist = list(base64.standard_b64decode(params[1])) - strlist.reverse() - jk = ''.join(strlist) + strlist = list(params[1].decode('base64')) + jk = ''.join(strlist[::-1]) # Get crypted - strlist = list(base64.standard_b64decode(params[2])) - strlist.reverse() - crypted = ''.join(strlist) + strlist = list(params[2].decode('base64')) + crypted = ''.join(strlist[::-1]) # Log and return return crypted, jk @@ -267,14 +264,11 @@ class ShareLinksBiz(Crypter): self.logDebug("JsEngine returns value [%s]" % jreturn) key = binascii.unhexlify(jreturn) - # Decode crypted - crypted = base64.standard_b64decode(crypted) - # Decrypt Key = key IV = key obj = AES.new(Key, AES.MODE_CBC, IV) - text = obj.decrypt(crypted) + text = obj.decrypt(crypted.decode('base64')) # Extract links text = text.replace("\x00", "").replace("\r", "") diff --git a/module/plugins/crypter/XFileSharingProFolder.py b/module/plugins/crypter/XFileSharingProFolder.py index 55cd41931..1d001772d 100644 --- a/module/plugins/crypter/XFileSharingProFolder.py +++ b/module/plugins/crypter/XFileSharingProFolder.py @@ -20,7 +20,7 @@ class XFileSharingProFolder(XFSCrypter): def _log(self, type, args): - msg = " | ".join([str(a).strip() for a in args if a]) + 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()))) @@ -31,7 +31,7 @@ class XFileSharingProFolder(XFSCrypter): self.__pattern__ = self.core.pluginManager.crypterPlugins[self.__name__]['pattern'] self.HOSTER_DOMAIN = re.match(self.__pattern__, self.pyfile.url).group("DOMAIN").lower() - self.HOSTER_NAME = "".join([part.capitalize() for part in re.split(r'(\.|\d+)', self.HOSTER_DOMAIN) if part != '.']) + self.HOSTER_NAME = "".join(part.capitalize() for part in re.split(r'(\.|\d+)', self.HOSTER_DOMAIN) if part != '.') if self.HOSTER_NAME[0].isdigit(): self.HOSTER_NAME = 'X' + self.HOSTER_NAME -- cgit v1.2.3 From 5aeec6fd8448af42bd39f327d8d8d35e3c20e4aa Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 3 Feb 2015 00:50:37 +0100 Subject: [MegaCoNzFolder] Fixup --- module/plugins/crypter/MegaCoNzFolder.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'module/plugins/crypter') diff --git a/module/plugins/crypter/MegaCoNzFolder.py b/module/plugins/crypter/MegaCoNzFolder.py index 954bfb9a5..4bef61f67 100644 --- a/module/plugins/crypter/MegaCoNzFolder.py +++ b/module/plugins/crypter/MegaCoNzFolder.py @@ -2,15 +2,15 @@ import re -from module.plugins.internal.Crypter import Crypter +from module.plugins.Crypter import Crypter class MegaCoNzFolder(Crypter): __name__ = "MegaCoNzFolder" __type__ = "crypter" - __version__ = "0.03" + __version__ = "0.04" - __pattern__ = r'(?:https?://(?:www\.)?mega\.co\.nz/|mega:|chrome:.+?)#F!(?P[\w+^_])!(?P[\w,\\-]+)' + __pattern__ = r'(?:https?://(?:www\.)?mega\.co\.nz/|mega:|chrome:.+?)#F!(?P[\w^_]+)!(?P[\w,\\-]+)' __config__ = [("use_subfolder", "bool", "Save package to subfolder", True), ("subfolder_per_package", "bool", "Create a subfolder for each package", True)] -- cgit v1.2.3 From b25bc61dd47d8d3c42969bd0f72443b21c4b059e Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 8 Feb 2015 02:09:45 +0100 Subject: Spare code cosmetics --- module/plugins/crypter/DailymotionBatch.py | 6 +++--- module/plugins/crypter/FilecryptCc.py | 4 ++-- module/plugins/crypter/LinkCryptWs.py | 3 +-- module/plugins/crypter/NCryptIn.py | 3 +-- module/plugins/crypter/RelinkUs.py | 3 +-- module/plugins/crypter/ShareLinksBiz.py | 3 +-- module/plugins/crypter/YoutubeBatch.py | 6 +++--- 7 files changed, 12 insertions(+), 16 deletions(-) (limited to 'module/plugins/crypter') diff --git a/module/plugins/crypter/DailymotionBatch.py b/module/plugins/crypter/DailymotionBatch.py index 8d4cb64df..82b80ab2f 100644 --- a/module/plugins/crypter/DailymotionBatch.py +++ b/module/plugins/crypter/DailymotionBatch.py @@ -24,9 +24,9 @@ class DailymotionBatch(Crypter): def api_response(self, ref, req=None): - url = urljoin("https://api.dailymotion.com/", ref) - page = self.load(url, get=req) - return json_loads(page) + url = urljoin("https://api.dailymotion.com/", ref) + html = self.load(url, get=req) + return json_loads(html) def getPlaylistInfo(self, id): diff --git a/module/plugins/crypter/FilecryptCc.py b/module/plugins/crypter/FilecryptCc.py index 6773ce9b6..d15d2ae4b 100644 --- a/module/plugins/crypter/FilecryptCc.py +++ b/module/plugins/crypter/FilecryptCc.py @@ -174,7 +174,7 @@ class FilecryptCc(Crypter): text = obj.decrypt(crypted.decode('base64')) # Extract links - links = filter(lambda x: x != "", - text.replace("\x00", "").replace("\r", "").split("\n")) + text = text.replace("\x00", "").replace("\r", "") + links = filter(bool, text.split('\n')) return links diff --git a/module/plugins/crypter/LinkCryptWs.py b/module/plugins/crypter/LinkCryptWs.py index 098f2542f..018ed90ba 100644 --- a/module/plugins/crypter/LinkCryptWs.py +++ b/module/plugins/crypter/LinkCryptWs.py @@ -314,8 +314,7 @@ class LinkCryptWs(Crypter): # Extract links text = text.replace("\x00", "").replace("\r", "") - links = text.split("\n") - links = filter(lambda x: x != "", links) + links = filter(bool, text.split('\n')) # Log and return self.logDebug("Package has %d links" % len(links)) diff --git a/module/plugins/crypter/NCryptIn.py b/module/plugins/crypter/NCryptIn.py index ecb913586..20e7c72e2 100644 --- a/module/plugins/crypter/NCryptIn.py +++ b/module/plugins/crypter/NCryptIn.py @@ -303,8 +303,7 @@ class NCryptIn(Crypter): # Extract links text = text.replace("\x00", "").replace("\r", "") - links = text.split("\n") - links = filter(lambda x: x != "", links) + links = filter(bool, text.split('\n')) # Log and return self.logDebug("Block has %d links" % len(links)) diff --git a/module/plugins/crypter/RelinkUs.py b/module/plugins/crypter/RelinkUs.py index 860dff06b..c50481af0 100644 --- a/module/plugins/crypter/RelinkUs.py +++ b/module/plugins/crypter/RelinkUs.py @@ -286,8 +286,7 @@ class RelinkUs(Crypter): # Extract links text = text.replace("\x00", "").replace("\r", "") - links = text.split("\n") - links = filter(lambda x: x != "", links) + links = filter(bool, text.split('\n')) # Log and return self.logDebug("Package has %d links" % len(links)) diff --git a/module/plugins/crypter/ShareLinksBiz.py b/module/plugins/crypter/ShareLinksBiz.py index d79735d42..00a037b2e 100644 --- a/module/plugins/crypter/ShareLinksBiz.py +++ b/module/plugins/crypter/ShareLinksBiz.py @@ -272,8 +272,7 @@ class ShareLinksBiz(Crypter): # Extract links text = text.replace("\x00", "").replace("\r", "") - links = text.split("\n") - links = filter(lambda x: x != "", links) + links = filter(bool, text.split('\n')) # Log and return self.logDebug("Block has %d links" % len(links)) diff --git a/module/plugins/crypter/YoutubeBatch.py b/module/plugins/crypter/YoutubeBatch.py index 73ebf5fb3..40b4eedd2 100644 --- a/module/plugins/crypter/YoutubeBatch.py +++ b/module/plugins/crypter/YoutubeBatch.py @@ -31,9 +31,9 @@ class YoutubeBatch(Crypter): def api_response(self, ref, req): req.update({"key": self.API_KEY}) - url = urljoin("https://www.googleapis.com/youtube/v3/", ref) - page = self.load(url, get=req) - return json_loads(page) + url = urljoin("https://www.googleapis.com/youtube/v3/", ref) + html = self.load(url, get=req) + return json_loads(html) def getChannel(self, user): -- cgit v1.2.3 From d04a0a9b436df0c048f6d7d06f71df0ee8d1ec6f Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 6 Mar 2015 22:54:04 +0100 Subject: [DailymotionBatch][YoutubeBatch] Renamed --- module/plugins/crypter/DailymotionBatch.py | 106 ------------------ module/plugins/crypter/DailymotionComFolder.py | 106 ++++++++++++++++++ module/plugins/crypter/YoutubeBatch.py | 148 ------------------------- module/plugins/crypter/YoutubeComFolder.py | 148 +++++++++++++++++++++++++ 4 files changed, 254 insertions(+), 254 deletions(-) delete mode 100644 module/plugins/crypter/DailymotionBatch.py create mode 100644 module/plugins/crypter/DailymotionComFolder.py delete mode 100644 module/plugins/crypter/YoutubeBatch.py create mode 100644 module/plugins/crypter/YoutubeComFolder.py (limited to 'module/plugins/crypter') diff --git a/module/plugins/crypter/DailymotionBatch.py b/module/plugins/crypter/DailymotionBatch.py deleted file mode 100644 index 82b80ab2f..000000000 --- a/module/plugins/crypter/DailymotionBatch.py +++ /dev/null @@ -1,106 +0,0 @@ -# -*- coding: utf-8 -*- - -import re - -from urlparse import urljoin - -from module.common.json_layer import json_loads -from module.plugins.Crypter import Crypter -from module.utils import save_join - - -class DailymotionBatch(Crypter): - __name__ = "DailymotionBatch" - __type__ = "crypter" - __version__ = "0.01" - - __pattern__ = r'https?://(?:www\.)?dailymotion\.com/((playlists/)?(?Pplaylist|user)/)?(?P[\w^_]+)(?(TYPE)|#)' - __config__ = [("use_subfolder", "bool", "Save package to subfolder", True), - ("subfolder_per_package", "bool", "Create a subfolder for each package", True)] - - __description__ = """Dailymotion.com channel & playlist decrypter""" - __license__ = "GPLv3" - __authors__ = [("Walter Purcaro", "vuolter@gmail.com")] - - - def api_response(self, ref, req=None): - url = urljoin("https://api.dailymotion.com/", ref) - html = self.load(url, get=req) - return json_loads(html) - - - def getPlaylistInfo(self, id): - ref = "playlist/" + id - req = {"fields": "name,owner.screenname"} - playlist = self.api_response(ref, req) - - if "error" in playlist: - return - - name = playlist['name'] - owner = playlist['owner.screenname'] - return name, owner - - - def _getPlaylists(self, user_id, page=1): - ref = "user/%s/playlists" % user_id - req = {"fields": "id", "page": page, "limit": 100} - user = self.api_response(ref, req) - - if "error" in user: - return - - for playlist in user['list']: - yield playlist['id'] - - if user['has_more']: - for item in self._getPlaylists(user_id, page + 1): - yield item - - - def getPlaylists(self, user_id): - return [(id,) + self.getPlaylistInfo(id) for id in self._getPlaylists(user_id)] - - - def _getVideos(self, id, page=1): - ref = "playlist/%s/videos" % id - req = {"fields": "url", "page": page, "limit": 100} - playlist = self.api_response(ref, req) - - if "error" in playlist: - return - - for video in playlist['list']: - yield video['url'] - - if playlist['has_more']: - for item in self._getVideos(id, page + 1): - yield item - - - def getVideos(self, playlist_id): - return list(self._getVideos(playlist_id))[::-1] - - - def decrypt(self, pyfile): - m = re.match(self.__pattern__, pyfile.url) - m_id = m.group('ID') - m_type = m.group('TYPE') - - if m_type == "playlist": - self.logDebug("Url recognized as Playlist") - p_info = self.getPlaylistInfo(m_id) - playlists = [(m_id,) + p_info] if p_info else None - else: - self.logDebug("Url recognized as Channel") - playlists = self.getPlaylists(m_id) - self.logDebug("%s playlist\s found on channel \"%s\"" % (len(playlists), m_id)) - - if not playlists: - self.fail(_("No playlist available")) - - for p_id, p_name, p_owner in playlists: - p_videos = self.getVideos(p_id) - p_folder = save_join(self.config['general']['download_folder'], p_owner, p_name) - self.logDebug("%s video\s found on playlist \"%s\"" % (len(p_videos), p_name)) - self.packages.append((p_name, p_videos, p_folder)) #: folder is NOT recognized by pyload 0.4.9! diff --git a/module/plugins/crypter/DailymotionComFolder.py b/module/plugins/crypter/DailymotionComFolder.py new file mode 100644 index 000000000..e7cbbfb2c --- /dev/null +++ b/module/plugins/crypter/DailymotionComFolder.py @@ -0,0 +1,106 @@ +# -*- coding: utf-8 -*- + +import re + +from urlparse import urljoin + +from module.common.json_layer import json_loads +from module.plugins.Crypter import Crypter +from module.utils import save_join + + +class DailymotionComFolder(Crypter): + __name__ = "DailymotionComFolder" + __type__ = "crypter" + __version__ = "0.01" + + __pattern__ = r'https?://(?:www\.)?dailymotion\.com/((playlists/)?(?Pplaylist|user)/)?(?P[\w^_]+)(?(TYPE)|#)' + __config__ = [("use_subfolder", "bool", "Save package to subfolder", True), + ("subfolder_per_package", "bool", "Create a subfolder for each package", True)] + + __description__ = """Dailymotion.com channel & playlist decrypter""" + __license__ = "GPLv3" + __authors__ = [("Walter Purcaro", "vuolter@gmail.com")] + + + def api_response(self, ref, req=None): + url = urljoin("https://api.dailymotion.com/", ref) + html = self.load(url, get=req) + return json_loads(html) + + + def getPlaylistInfo(self, id): + ref = "playlist/" + id + req = {"fields": "name,owner.screenname"} + playlist = self.api_response(ref, req) + + if "error" in playlist: + return + + name = playlist['name'] + owner = playlist['owner.screenname'] + return name, owner + + + def _getPlaylists(self, user_id, page=1): + ref = "user/%s/playlists" % user_id + req = {"fields": "id", "page": page, "limit": 100} + user = self.api_response(ref, req) + + if "error" in user: + return + + for playlist in user['list']: + yield playlist['id'] + + if user['has_more']: + for item in self._getPlaylists(user_id, page + 1): + yield item + + + def getPlaylists(self, user_id): + return [(id,) + self.getPlaylistInfo(id) for id in self._getPlaylists(user_id)] + + + def _getVideos(self, id, page=1): + ref = "playlist/%s/videos" % id + req = {"fields": "url", "page": page, "limit": 100} + playlist = self.api_response(ref, req) + + if "error" in playlist: + return + + for video in playlist['list']: + yield video['url'] + + if playlist['has_more']: + for item in self._getVideos(id, page + 1): + yield item + + + def getVideos(self, playlist_id): + return list(self._getVideos(playlist_id))[::-1] + + + def decrypt(self, pyfile): + m = re.match(self.__pattern__, pyfile.url) + m_id = m.group('ID') + m_type = m.group('TYPE') + + if m_type == "playlist": + self.logDebug("Url recognized as Playlist") + p_info = self.getPlaylistInfo(m_id) + playlists = [(m_id,) + p_info] if p_info else None + else: + self.logDebug("Url recognized as Channel") + playlists = self.getPlaylists(m_id) + self.logDebug("%s playlist\s found on channel \"%s\"" % (len(playlists), m_id)) + + if not playlists: + self.fail(_("No playlist available")) + + for p_id, p_name, p_owner in playlists: + p_videos = self.getVideos(p_id) + p_folder = save_join(self.config['general']['download_folder'], p_owner, p_name) + self.logDebug("%s video\s found on playlist \"%s\"" % (len(p_videos), p_name)) + self.packages.append((p_name, p_videos, p_folder)) #: folder is NOT recognized by pyload 0.4.9! diff --git a/module/plugins/crypter/YoutubeBatch.py b/module/plugins/crypter/YoutubeBatch.py deleted file mode 100644 index 40b4eedd2..000000000 --- a/module/plugins/crypter/YoutubeBatch.py +++ /dev/null @@ -1,148 +0,0 @@ -# -*- coding: utf-8 -*- - -import re - -from urlparse import urljoin - -from module.common.json_layer import json_loads -from module.plugins.Crypter import Crypter -from module.utils import save_join - - -class YoutubeBatch(Crypter): - __name__ = "YoutubeBatch" - __type__ = "crypter" - __version__ = "1.01" - - __pattern__ = r'https?://(?:www\.|m\.)?youtube\.com/(?Puser|playlist|view_play_list)(/|.*?[?&](?:list|p)=)(?P[\w-]+)' - __config__ = [("use_subfolder", "bool", "Save package to subfolder", True), - ("subfolder_per_package", "bool", "Create a subfolder for each package", True), - ("likes", "bool", "Grab user (channel) liked videos", False), - ("favorites", "bool", "Grab user (channel) favorite videos", False), - ("uploads", "bool", "Grab channel unplaylisted videos", True)] - - __description__ = """Youtube.com channel & playlist decrypter plugin""" - __license__ = "GPLv3" - __authors__ = [("Walter Purcaro", "vuolter@gmail.com")] - - - API_KEY = "AIzaSyCKnWLNlkX-L4oD1aEzqqhRw1zczeD6_k0" - - - def api_response(self, ref, req): - req.update({"key": self.API_KEY}) - url = urljoin("https://www.googleapis.com/youtube/v3/", ref) - html = self.load(url, get=req) - return json_loads(html) - - - def getChannel(self, user): - channels = self.api_response("channels", {"part": "id,snippet,contentDetails", "forUsername": user, "maxResults": "50"}) - if channels['items']: - channel = channels['items'][0] - return {"id": channel['id'], - "title": channel['snippet']['title'], - "relatedPlaylists": channel['contentDetails']['relatedPlaylists'], - "user": user} # One lone channel for user? - - - def getPlaylist(self, p_id): - playlists = self.api_response("playlists", {"part": "snippet", "id": p_id}) - if playlists['items']: - playlist = playlists['items'][0] - return {"id": p_id, - "title": playlist['snippet']['title'], - "channelId": playlist['snippet']['channelId'], - "channelTitle": playlist['snippet']['channelTitle']} - - - def _getPlaylists(self, id, token=None): - req = {"part": "id", "maxResults": "50", "channelId": id} - if token: - req.update({"pageToken": token}) - - playlists = self.api_response("playlists", req) - - for playlist in playlists['items']: - yield playlist['id'] - - if "nextPageToken" in playlists: - for item in self._getPlaylists(id, playlists['nextPageToken']): - yield item - - - def getPlaylists(self, ch_id): - return map(self.getPlaylist, self._getPlaylists(ch_id)) - - - def _getVideosId(self, id, token=None): - req = {"part": "contentDetails", "maxResults": "50", "playlistId": id} - if token: - req.update({"pageToken": token}) - - playlist = self.api_response("playlistItems", req) - - for item in playlist['items']: - yield item['contentDetails']['videoId'] - - if "nextPageToken" in playlist: - for item in self._getVideosId(id, playlist['nextPageToken']): - yield item - - - def getVideosId(self, p_id): - return list(self._getVideosId(p_id)) - - - def decrypt(self, pyfile): - m = re.match(self.__pattern__, pyfile.url) - m_id = m.group('ID') - m_type = m.group('TYPE') - - if m_type == "user": - self.logDebug("Url recognized as Channel") - user = m_id - channel = self.getChannel(user) - - if channel: - playlists = self.getPlaylists(channel['id']) - self.logDebug("%s playlist\s found on channel \"%s\"" % (len(playlists), channel['title'])) - - relatedplaylist = {p_name: self.getPlaylist(p_id) for p_name, p_id in channel['relatedPlaylists'].iteritems()} - self.logDebug("Channel's related playlists found = %s" % relatedplaylist.keys()) - - relatedplaylist['uploads']['title'] = "Unplaylisted videos" - relatedplaylist['uploads']['checkDups'] = True #: checkDups flag - - for p_name, p_data in relatedplaylist.iteritems(): - if self.getConfig(p_name): - p_data['title'] += " of " + user - playlists.append(p_data) - else: - playlists = [] - else: - self.logDebug("Url recognized as Playlist") - playlists = [self.getPlaylist(m_id)] - - if not playlists: - self.fail(_("No playlist available")) - - addedvideos = [] - urlize = lambda x: "https://www.youtube.com/watch?v=" + x - for p in playlists: - p_name = p['title'] - p_videos = self.getVideosId(p['id']) - p_folder = save_join(self.config['general']['download_folder'], p['channelTitle'], p_name) - self.logDebug("%s video\s found on playlist \"%s\"" % (len(p_videos), p_name)) - - if not p_videos: - continue - elif "checkDups" in p: - p_urls = [urlize(v_id) for v_id in p_videos if v_id not in addedvideos] - self.logDebug("%s video\s available on playlist \"%s\" after duplicates cleanup" % (len(p_urls), p_name)) - else: - p_urls = map(urlize, p_videos) - - self.packages.append((p_name, p_urls, p_folder)) #: folder is NOT recognized by pyload 0.4.9! - - addedvideos.extend(p_videos) diff --git a/module/plugins/crypter/YoutubeComFolder.py b/module/plugins/crypter/YoutubeComFolder.py new file mode 100644 index 000000000..628cf9428 --- /dev/null +++ b/module/plugins/crypter/YoutubeComFolder.py @@ -0,0 +1,148 @@ +# -*- coding: utf-8 -*- + +import re + +from urlparse import urljoin + +from module.common.json_layer import json_loads +from module.plugins.Crypter import Crypter +from module.utils import save_join + + +class YoutubeComFolder(Crypter): + __name__ = "YoutubeComFolder" + __type__ = "crypter" + __version__ = "1.01" + + __pattern__ = r'https?://(?:www\.|m\.)?youtube\.com/(?Puser|playlist|view_play_list)(/|.*?[?&](?:list|p)=)(?P[\w-]+)' + __config__ = [("use_subfolder", "bool", "Save package to subfolder", True), + ("subfolder_per_package", "bool", "Create a subfolder for each package", True), + ("likes", "bool", "Grab user (channel) liked videos", False), + ("favorites", "bool", "Grab user (channel) favorite videos", False), + ("uploads", "bool", "Grab channel unplaylisted videos", True)] + + __description__ = """Youtube.com channel & playlist decrypter plugin""" + __license__ = "GPLv3" + __authors__ = [("Walter Purcaro", "vuolter@gmail.com")] + + + API_KEY = "AIzaSyCKnWLNlkX-L4oD1aEzqqhRw1zczeD6_k0" + + + def api_response(self, ref, req): + req.update({"key": self.API_KEY}) + url = urljoin("https://www.googleapis.com/youtube/v3/", ref) + html = self.load(url, get=req) + return json_loads(html) + + + def getChannel(self, user): + channels = self.api_response("channels", {"part": "id,snippet,contentDetails", "forUsername": user, "maxResults": "50"}) + if channels['items']: + channel = channels['items'][0] + return {"id": channel['id'], + "title": channel['snippet']['title'], + "relatedPlaylists": channel['contentDetails']['relatedPlaylists'], + "user": user} # One lone channel for user? + + + def getPlaylist(self, p_id): + playlists = self.api_response("playlists", {"part": "snippet", "id": p_id}) + if playlists['items']: + playlist = playlists['items'][0] + return {"id": p_id, + "title": playlist['snippet']['title'], + "channelId": playlist['snippet']['channelId'], + "channelTitle": playlist['snippet']['channelTitle']} + + + def _getPlaylists(self, id, token=None): + req = {"part": "id", "maxResults": "50", "channelId": id} + if token: + req.update({"pageToken": token}) + + playlists = self.api_response("playlists", req) + + for playlist in playlists['items']: + yield playlist['id'] + + if "nextPageToken" in playlists: + for item in self._getPlaylists(id, playlists['nextPageToken']): + yield item + + + def getPlaylists(self, ch_id): + return map(self.getPlaylist, self._getPlaylists(ch_id)) + + + def _getVideosId(self, id, token=None): + req = {"part": "contentDetails", "maxResults": "50", "playlistId": id} + if token: + req.update({"pageToken": token}) + + playlist = self.api_response("playlistItems", req) + + for item in playlist['items']: + yield item['contentDetails']['videoId'] + + if "nextPageToken" in playlist: + for item in self._getVideosId(id, playlist['nextPageToken']): + yield item + + + def getVideosId(self, p_id): + return list(self._getVideosId(p_id)) + + + def decrypt(self, pyfile): + m = re.match(self.__pattern__, pyfile.url) + m_id = m.group('ID') + m_type = m.group('TYPE') + + if m_type == "user": + self.logDebug("Url recognized as Channel") + user = m_id + channel = self.getChannel(user) + + if channel: + playlists = self.getPlaylists(channel['id']) + self.logDebug("%s playlist\s found on channel \"%s\"" % (len(playlists), channel['title'])) + + relatedplaylist = {p_name: self.getPlaylist(p_id) for p_name, p_id in channel['relatedPlaylists'].iteritems()} + self.logDebug("Channel's related playlists found = %s" % relatedplaylist.keys()) + + relatedplaylist['uploads']['title'] = "Unplaylisted videos" + relatedplaylist['uploads']['checkDups'] = True #: checkDups flag + + for p_name, p_data in relatedplaylist.iteritems(): + if self.getConfig(p_name): + p_data['title'] += " of " + user + playlists.append(p_data) + else: + playlists = [] + else: + self.logDebug("Url recognized as Playlist") + playlists = [self.getPlaylist(m_id)] + + if not playlists: + self.fail(_("No playlist available")) + + addedvideos = [] + urlize = lambda x: "https://www.youtube.com/watch?v=" + x + for p in playlists: + p_name = p['title'] + p_videos = self.getVideosId(p['id']) + p_folder = save_join(self.config['general']['download_folder'], p['channelTitle'], p_name) + self.logDebug("%s video\s found on playlist \"%s\"" % (len(p_videos), p_name)) + + if not p_videos: + continue + elif "checkDups" in p: + p_urls = [urlize(v_id) for v_id in p_videos if v_id not in addedvideos] + self.logDebug("%s video\s available on playlist \"%s\" after duplicates cleanup" % (len(p_urls), p_name)) + else: + p_urls = map(urlize, p_videos) + + self.packages.append((p_name, p_urls, p_folder)) #: folder is NOT recognized by pyload 0.4.9! + + addedvideos.extend(p_videos) -- cgit v1.2.3 From f85e28e565a1e0a76e6271d0b0853d6d48b4a043 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 10 Mar 2015 01:16:29 +0100 Subject: [MultiHook] Fix _pluginSet (fix LinkdecrypterCom issue) --- module/plugins/crypter/XFileSharingProFolder.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'module/plugins/crypter') diff --git a/module/plugins/crypter/XFileSharingProFolder.py b/module/plugins/crypter/XFileSharingProFolder.py index 1d001772d..7d5cc9c6d 100644 --- a/module/plugins/crypter/XFileSharingProFolder.py +++ b/module/plugins/crypter/XFileSharingProFolder.py @@ -8,7 +8,7 @@ from module.plugins.internal.XFSCrypter import XFSCrypter, create_getInfo class XFileSharingProFolder(XFSCrypter): __name__ = "XFileSharingProFolder" __type__ = "crypter" - __version__ = "0.04" + __version__ = "0.05" __pattern__ = r'^unmatchable$' __config__ = [("use_subfolder", "bool", "Save package to subfolder", True), @@ -33,9 +33,6 @@ class XFileSharingProFolder(XFSCrypter): self.HOSTER_DOMAIN = re.match(self.__pattern__, self.pyfile.url).group("DOMAIN").lower() self.HOSTER_NAME = "".join(part.capitalize() for part in re.split(r'(\.|\d+)', self.HOSTER_DOMAIN) if part != '.') - if self.HOSTER_NAME[0].isdigit(): - self.HOSTER_NAME = 'X' + self.HOSTER_NAME - account = self.core.accountManager.getAccountPlugin(self.HOSTER_NAME) if account and account.canUse(): -- cgit v1.2.3 From 415d543fe8ab9082b48cf0836565efbca65a9aa2 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 10 Mar 2015 01:27:50 +0100 Subject: [DDLMusicOrg] Removed --- module/plugins/crypter/DDLMusicOrg.py | 51 ----------------------------------- 1 file changed, 51 deletions(-) delete mode 100644 module/plugins/crypter/DDLMusicOrg.py (limited to 'module/plugins/crypter') diff --git a/module/plugins/crypter/DDLMusicOrg.py b/module/plugins/crypter/DDLMusicOrg.py deleted file mode 100644 index 55181e9ad..000000000 --- a/module/plugins/crypter/DDLMusicOrg.py +++ /dev/null @@ -1,51 +0,0 @@ -# -*- coding: utf-8 -*- - -import re - -from time import sleep - -from module.plugins.Crypter import Crypter - - -class DDLMusicOrg(Crypter): - __name__ = "DDLMusicOrg" - __type__ = "crypter" - __version__ = "0.30" - - __pattern__ = r'http://(?:www\.)?ddl-music\.org/captcha/ddlm_cr\d\.php\?\d+\?\d+' - __config__ = [("use_subfolder", "bool", "Save package to subfolder", True), - ("subfolder_per_package", "bool", "Create a subfolder for each package", True)] - - __description__ = """Ddl-music.org decrypter plugin""" - __license__ = "GPLv3" - __authors__ = [("mkaay", "mkaay@mkaay.de")] - - - def setup(self): - self.multiDL = False - - - def decrypt(self, pyfile): - html = self.load(pyfile.url, cookies=True) - - if re.search(r"Wer dies nicht rechnen kann", html) is not None: - self.offline() - - math = re.search(r"(\d+) ([+-]) (\d+) =\s+", htmlwithlink) - if m: - self.urls = [m.group(1)] - else: - self.retry() -- cgit v1.2.3 From 7beb65e991bc6d1913c3b5bb2ef69e659d5b8342 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 10 Mar 2015 01:55:52 +0100 Subject: Spare code cosmetics --- module/plugins/crypter/EmbeduploadCom.py | 4 ++-- module/plugins/crypter/FilecryptCc.py | 12 +++++------- module/plugins/crypter/LinkdecrypterCom.py | 4 ++-- module/plugins/crypter/MultiloadCz.py | 4 ++-- 4 files changed, 11 insertions(+), 13 deletions(-) (limited to 'module/plugins/crypter') diff --git a/module/plugins/crypter/EmbeduploadCom.py b/module/plugins/crypter/EmbeduploadCom.py index 456e48a32..5336a0d03 100644 --- a/module/plugins/crypter/EmbeduploadCom.py +++ b/module/plugins/crypter/EmbeduploadCom.py @@ -30,7 +30,7 @@ class EmbeduploadCom(Crypter): m = re.findall(self.LINK_PATTERN, self.html) if m: - prefered_set = set(self.getConfig("preferedHoster").split('|')) + prefered_set = set(self.getConfig('preferedHoster').split('|')) prefered_set = map(lambda s: s.lower().split('.')[0], prefered_set) self.logDebug("PF: %s" % prefered_set) @@ -39,7 +39,7 @@ class EmbeduploadCom(Crypter): self.urls = self.getLocation(tmp_links) if not self.urls: - ignored_set = set(self.getConfig("ignoredHoster").split('|')) + ignored_set = set(self.getConfig('ignoredHoster').split('|')) ignored_set = map(lambda s: s.lower().split('.')[0], ignored_set) self.logDebug("IG: %s" % ignored_set) diff --git a/module/plugins/crypter/FilecryptCc.py b/module/plugins/crypter/FilecryptCc.py index d15d2ae4b..baea8886b 100644 --- a/module/plugins/crypter/FilecryptCc.py +++ b/module/plugins/crypter/FilecryptCc.py @@ -39,7 +39,7 @@ class FilecryptCc(Crypter): def decrypt(self, pyfile): - self.html = self.load(pyfile.url, cookies=True) + self.html = self.load(pyfile.url) if "content notfound" in self.html: #@NOTE: "content notfound" is NOT a typo self.offline() @@ -64,7 +64,7 @@ class FilecryptCc(Crypter): self.logInfo(_("Found %d mirrors") % len(mirror)) for i in mirror[1:]: - self.siteWithLinks = self.siteWithLinks + self.load(i, cookies=True).decode("utf-8", "replace") + self.siteWithLinks = self.siteWithLinks + self.load(i).decode("utf-8", "replace") def handlePasswordProtection(self): @@ -78,7 +78,7 @@ class FilecryptCc(Crypter): if not password: self.fail(_("Please enter the password in package section and try again")) - self.html = self.load(self.pyfile.url, post={"password": password}, cookies=True) + self.html = self.load(self.pyfile.url, post={"password": password}) def handleCaptcha(self): @@ -94,7 +94,6 @@ class FilecryptCc(Crypter): self.siteWithLinks = self.load(self.pyfile.url, post={'recaptcha_response_field': captcha_code}, - cookies=True, decode=True) elif m2: #: circle captcha self.logDebug("Captcha-URL: %s" % m2.group(1)) @@ -106,7 +105,6 @@ class FilecryptCc(Crypter): self.siteWithLinks = self.load(self.pyfile.url, post={'button.x': captcha_code[0], 'button.y': captcha_code[1]}, - cookies=True, decode=True) else: @@ -142,9 +140,9 @@ class FilecryptCc(Crypter): weblinks = re.findall(self.WEBLINK_PATTERN, self.siteWithLinks) for link in weblinks: - res = self.load("http://filecrypt.cc/Link/%s.html" % link, cookies=True) + res = self.load("http://filecrypt.cc/Link/%s.html" % link) link2 = re.search('', res) - res2 = self.load(link2.group(1), just_header=True, cookies=True) + res2 = self.load(link2.group(1), just_header=True) self.links.append(res2['location']) except Exception, e: diff --git a/module/plugins/crypter/LinkdecrypterCom.py b/module/plugins/crypter/LinkdecrypterCom.py index 7f24784c7..7dc174d66 100644 --- a/module/plugins/crypter/LinkdecrypterCom.py +++ b/module/plugins/crypter/LinkdecrypterCom.py @@ -34,7 +34,7 @@ class LinkdecrypterCom(Crypter): retries = 5 post_dict = {"link_cache": "on", "pro_links": pyfile.url, "modo_links": "text"} - self.html = self.load('http://linkdecrypter.com/', post=post_dict, cookies=True, decode=True) + self.html = self.load('http://linkdecrypter.com/', post=post_dict, decode=True) while retries: m = re.search(self.TEXTAREA_PATTERN, self.html, flags=re.S) @@ -65,4 +65,4 @@ class LinkdecrypterCom(Crypter): else: retries -= 1 - self.html = self.load('http://linkdecrypter.com/', cookies=True, decode=True) + self.html = self.load('http://linkdecrypter.com/', decode=True) diff --git a/module/plugins/crypter/MultiloadCz.py b/module/plugins/crypter/MultiloadCz.py index 55f424f36..006408c4b 100644 --- a/module/plugins/crypter/MultiloadCz.py +++ b/module/plugins/crypter/MultiloadCz.py @@ -34,9 +34,9 @@ class MultiloadCz(Crypter): else: m = re.findall(self.LINK_PATTERN, self.html) if m: - prefered_set = set(self.getConfig("usedHoster").split('|')) + prefered_set = set(self.getConfig('usedHoster').split('|')) self.urls.extend(x[1] for x in m if x[0] in prefered_set) if not self.urls: - ignored_set = set(self.getConfig("ignoredHoster").split('|')) + ignored_set = set(self.getConfig('ignoredHoster').split('|')) self.urls.extend(x[1] for x in m if x[0] not in ignored_set) -- cgit v1.2.3 From e65d19ee3a1e435bf2896ed829e5581eeef92dd2 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 14 Mar 2015 11:07:54 +0100 Subject: Import cleanup for datetime and time modules --- module/plugins/crypter/DlProtectCom.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/crypter') diff --git a/module/plugins/crypter/DlProtectCom.py b/module/plugins/crypter/DlProtectCom.py index 4a188aa83..5c20942ff 100644 --- a/module/plugins/crypter/DlProtectCom.py +++ b/module/plugins/crypter/DlProtectCom.py @@ -1,9 +1,9 @@ # -*- coding: utf-8 -*- import re +import time from base64 import urlsafe_b64encode -from time import time from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo @@ -40,7 +40,7 @@ class DlProtectCom(SimpleCrypter): self.wait(2) else: - mstime = int(round(time() * 1000)) + mstime = int(round(time.time() * 1000)) b64time = "_" + urlsafe_b64encode(str(mstime)).replace("=", "%3D") post_req.update({'i' : b64time, -- cgit v1.2.3 From 31850c215fa2a9ce741f2bc94a11897b2a375dbe Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 20 Mar 2015 23:26:13 +0100 Subject: [DevhostStFolder] Fixup --- module/plugins/crypter/DevhostStFolder.py | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) (limited to 'module/plugins/crypter') diff --git a/module/plugins/crypter/DevhostStFolder.py b/module/plugins/crypter/DevhostStFolder.py index 8779cae5e..2753ee389 100644 --- a/module/plugins/crypter/DevhostStFolder.py +++ b/module/plugins/crypter/DevhostStFolder.py @@ -13,7 +13,7 @@ from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo class DevhostStFolder(SimpleCrypter): __name__ = "DevhostStFolder" __type__ = "crypter" - __version__ = "0.04" + __version__ = "0.05" __pattern__ = r'http://(?:www\.)?d-h\.st/users/(?P\w+)(/\?fld_id=(?P\d+))?' __config__ = [("use_subfolder", "bool", "Save package to subfolder", True), @@ -25,17 +25,18 @@ class DevhostStFolder(SimpleCrypter): ("Walter Purcaro", "vuolter@gmail.com")] - LINK_PATTERN = r'(?:/> |;">)Back to \w+<)' + LINK_PATTERN = r'(?:/> |;">)Back to \w+<)' OFFLINE_PATTERN = r'"/cHP">test\.png<' - def getFileInfo(self): - if re.search(self.OFFLINE_PATTERN, self.html): - self.offline() + def checkNameSize(self, getinfo=True): + if not self.info or getinfo: + self.logDebug("File info (BEFORE): %s" % self.info) + self.info.update(self.getInfo(self.pyfile.url, self.html)) + self.logDebug("File info (AFTER): %s" % self.info) try: - id = re.match(self.__pattern__, self.pyfile.url).group('ID') - if id == "0": + if self.info['pattern']['ID'] == "0": raise p = r'href="(.+?)">Back to \w+<' @@ -43,15 +44,22 @@ class DevhostStFolder(SimpleCrypter): html = self.load(urljoin("http://d-h.st", m.group(1)), cookies=False) - p = '\?fld_id=%s.*?">(.+?)<' % id + p = '\?fld_id=%s.*?">(.+?)<' % self.info['pattern']['ID'] m = re.search(p, html) - name = folder = m.group(1) + self.pyfile.name = m.group(1) except Exception, e: self.logDebug(e) - name = folder = re.match(self.__pattern__, self.pyfile.url).group('USER') + self.pyfile.name = self.info['pattern']['USER'] - return {'name': name, 'folder': folder} + try: + folder = self.info['folder'] = self.pyfile.name + + except Exception: + pass + + self.logDebug("File name: %s" % self.pyfile.name, + "File folder: %s" % self.pyfile.name) getInfo = create_getInfo(DevhostStFolder) -- cgit v1.2.3 From 7d90803262ccbb4fc5296a4dc3ce30fe98f55631 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Wed, 25 Mar 2015 23:10:07 +0100 Subject: __config__ cosmetics --- module/plugins/crypter/BitshareComFolder.py | 5 +++-- module/plugins/crypter/ChipDe.py | 4 ++-- module/plugins/crypter/CrockoComFolder.py | 5 +++-- module/plugins/crypter/CzshareComFolder.py | 4 ++-- module/plugins/crypter/DailymotionComFolder.py | 4 ++-- module/plugins/crypter/DataHuFolder.py | 5 +++-- module/plugins/crypter/DepositfilesComFolder.py | 5 +++-- module/plugins/crypter/Dereferer.py | 4 ++-- module/plugins/crypter/DevhostStFolder.py | 5 +++-- module/plugins/crypter/DlProtectCom.py | 5 +++-- module/plugins/crypter/DontKnowMe.py | 4 ++-- module/plugins/crypter/DuckCryptInfo.py | 4 ++-- module/plugins/crypter/EasybytezComFolder.py | 4 ++-- module/plugins/crypter/EmbeduploadCom.py | 8 ++++---- module/plugins/crypter/FilecloudIoFolder.py | 5 +++-- module/plugins/crypter/FilefactoryComFolder.py | 5 +++-- module/plugins/crypter/FilerNetFolder.py | 5 +++-- module/plugins/crypter/FileserveComFolder.py | 4 ++-- module/plugins/crypter/FilesonicComFolder.py | 1 + module/plugins/crypter/FilestubeCom.py | 5 +++-- module/plugins/crypter/FiletramCom.py | 5 +++-- module/plugins/crypter/FourChanOrg.py | 4 ++-- module/plugins/crypter/FreakhareComFolder.py | 5 +++-- module/plugins/crypter/FreetexthostCom.py | 5 +++-- module/plugins/crypter/FshareVnFolder.py | 5 +++-- module/plugins/crypter/Go4UpCom.py | 3 +++ module/plugins/crypter/GooGl.py | 4 ++-- module/plugins/crypter/HoerbuchIn.py | 4 ++-- module/plugins/crypter/ImgurComAlbum.py | 5 +++-- module/plugins/crypter/LetitbitNetFolder.py | 4 ++-- module/plugins/crypter/LinkSaveIn.py | 4 ++-- module/plugins/crypter/LinkdecrypterCom.py | 4 ++-- module/plugins/crypter/LixIn.py | 4 ++-- module/plugins/crypter/MediafireComFolder.py | 4 ++-- module/plugins/crypter/MegaCoNzFolder.py | 4 ++-- module/plugins/crypter/MegaRapidCzFolder.py | 5 +++-- module/plugins/crypter/MegauploadComFolder.py | 1 + module/plugins/crypter/MultiUpOrg.py | 5 +++-- module/plugins/crypter/MultiloadCz.py | 8 ++++---- module/plugins/crypter/NCryptIn.py | 4 ++-- module/plugins/crypter/NetfolderIn.py | 5 +++-- module/plugins/crypter/NosvideoCom.py | 5 +++-- module/plugins/crypter/OneKhDe.py | 4 ++-- module/plugins/crypter/PastebinCom.py | 5 +++-- module/plugins/crypter/QuickshareCzFolder.py | 4 ++-- module/plugins/crypter/RelinkUs.py | 4 ++-- module/plugins/crypter/SafelinkingNet.py | 4 ++-- module/plugins/crypter/SexuriaCom.py | 4 ++-- module/plugins/crypter/ShareLinksBiz.py | 4 ++-- module/plugins/crypter/SharingmatrixComFolder.py | 1 + module/plugins/crypter/TnyCz.py | 5 +++-- module/plugins/crypter/TurbobitNetFolder.py | 5 +++-- module/plugins/crypter/TusfilesNetFolder.py | 4 ++-- module/plugins/crypter/UlozToFolder.py | 4 ++-- module/plugins/crypter/UploadableChFolder.py | 5 +++-- module/plugins/crypter/UploadedToFolder.py | 5 +++-- module/plugins/crypter/WuploadComFolder.py | 1 + module/plugins/crypter/XFileSharingProFolder.py | 4 ++-- module/plugins/crypter/XupPl.py | 4 ++-- module/plugins/crypter/YoutubeComFolder.py | 10 +++++----- 60 files changed, 148 insertions(+), 117 deletions(-) (limited to 'module/plugins/crypter') diff --git a/module/plugins/crypter/BitshareComFolder.py b/module/plugins/crypter/BitshareComFolder.py index c70a849b6..256c5b5aa 100644 --- a/module/plugins/crypter/BitshareComFolder.py +++ b/module/plugins/crypter/BitshareComFolder.py @@ -9,8 +9,9 @@ class BitshareComFolder(SimpleCrypter): __version__ = "0.03" __pattern__ = r'http://(?:www\.)?bitshare\.com/\?d=\w+' - __config__ = [("use_subfolder", "bool", "Save package to subfolder", True), - ("subfolder_per_package", "bool", "Create a subfolder for each package", True)] + __config__ = [("use_premium" , "bool", "Use premium account if available" , True), + ("use_subfolder" , "bool", "Save package to subfolder" , True), + ("subfolder_per_pack", "bool", "Create a subfolder for each package", True)] __description__ = """Bitshare.com folder decrypter plugin""" __license__ = "GPLv3" diff --git a/module/plugins/crypter/ChipDe.py b/module/plugins/crypter/ChipDe.py index 2fc36c355..f535da48d 100644 --- a/module/plugins/crypter/ChipDe.py +++ b/module/plugins/crypter/ChipDe.py @@ -10,8 +10,8 @@ class ChipDe(Crypter): __version__ = "0.10" __pattern__ = r'http://(?:www\.)?chip\.de/video/.+\.html' - __config__ = [("use_subfolder", "bool", "Save package to subfolder", True), - ("subfolder_per_package", "bool", "Create a subfolder for each package", True)] + __config__ = [("use_subfolder" , "bool", "Save package to subfolder" , True), + ("subfolder_per_pack", "bool", "Create a subfolder for each package", True)] __description__ = """Chip.de decrypter plugin""" __license__ = "GPLv3" diff --git a/module/plugins/crypter/CrockoComFolder.py b/module/plugins/crypter/CrockoComFolder.py index 57bb339ff..a01f3e814 100644 --- a/module/plugins/crypter/CrockoComFolder.py +++ b/module/plugins/crypter/CrockoComFolder.py @@ -9,8 +9,9 @@ class CrockoComFolder(SimpleCrypter): __version__ = "0.01" __pattern__ = r'http://(?:www\.)?crocko\.com/f/.+' - __config__ = [("use_subfolder", "bool", "Save package to subfolder", True), - ("subfolder_per_package", "bool", "Create a subfolder for each package", True)] + __config__ = [("use_premium" , "bool", "Use premium account if available" , True), + ("use_subfolder" , "bool", "Save package to subfolder" , True), + ("subfolder_per_pack", "bool", "Create a subfolder for each package", True)] __description__ = """Crocko.com folder decrypter plugin""" __license__ = "GPLv3" diff --git a/module/plugins/crypter/CzshareComFolder.py b/module/plugins/crypter/CzshareComFolder.py index 5623a4093..b1f242416 100644 --- a/module/plugins/crypter/CzshareComFolder.py +++ b/module/plugins/crypter/CzshareComFolder.py @@ -10,8 +10,8 @@ class CzshareComFolder(Crypter): __version__ = "0.20" __pattern__ = r'http://(?:www\.)?(czshare|sdilej)\.(com|cz)/folders/.+' - __config__ = [("use_subfolder", "bool", "Save package to subfolder", True), - ("subfolder_per_package", "bool", "Create a subfolder for each package", True)] + __config__ = [("use_subfolder" , "bool", "Save package to subfolder" , True), + ("subfolder_per_pack", "bool", "Create a subfolder for each package", True)] __description__ = """Czshare.com folder decrypter plugin, now Sdilej.cz""" __license__ = "GPLv3" diff --git a/module/plugins/crypter/DailymotionComFolder.py b/module/plugins/crypter/DailymotionComFolder.py index e7cbbfb2c..5c078000a 100644 --- a/module/plugins/crypter/DailymotionComFolder.py +++ b/module/plugins/crypter/DailymotionComFolder.py @@ -15,8 +15,8 @@ class DailymotionComFolder(Crypter): __version__ = "0.01" __pattern__ = r'https?://(?:www\.)?dailymotion\.com/((playlists/)?(?Pplaylist|user)/)?(?P[\w^_]+)(?(TYPE)|#)' - __config__ = [("use_subfolder", "bool", "Save package to subfolder", True), - ("subfolder_per_package", "bool", "Create a subfolder for each package", True)] + __config__ = [("use_subfolder" , "bool", "Save package to subfolder" , True), + ("subfolder_per_pack", "bool", "Create a subfolder for each package", True)] __description__ = """Dailymotion.com channel & playlist decrypter""" __license__ = "GPLv3" diff --git a/module/plugins/crypter/DataHuFolder.py b/module/plugins/crypter/DataHuFolder.py index a5602d6c6..67f5e788f 100644 --- a/module/plugins/crypter/DataHuFolder.py +++ b/module/plugins/crypter/DataHuFolder.py @@ -11,8 +11,9 @@ class DataHuFolder(SimpleCrypter): __version__ = "0.06" __pattern__ = r'http://(?:www\.)?data\.hu/dir/\w+' - __config__ = [("use_subfolder", "bool", "Save package to subfolder", True), - ("subfolder_per_package", "bool", "Create a subfolder for each package", True)] + __config__ = [("use_premium" , "bool", "Use premium account if available" , True), + ("use_subfolder" , "bool", "Save package to subfolder" , True), + ("subfolder_per_pack", "bool", "Create a subfolder for each package", True)] __description__ = """Data.hu folder decrypter plugin""" __license__ = "GPLv3" diff --git a/module/plugins/crypter/DepositfilesComFolder.py b/module/plugins/crypter/DepositfilesComFolder.py index 147f093c3..b23d4a41e 100644 --- a/module/plugins/crypter/DepositfilesComFolder.py +++ b/module/plugins/crypter/DepositfilesComFolder.py @@ -9,8 +9,9 @@ class DepositfilesComFolder(SimpleCrypter): __version__ = "0.01" __pattern__ = r'http://(?:www\.)?depositfiles\.com/folders/\w+' - __config__ = [("use_subfolder", "bool", "Save package to subfolder", True), - ("subfolder_per_package", "bool", "Create a subfolder for each package", True)] + __config__ = [("use_premium" , "bool", "Use premium account if available" , True), + ("use_subfolder" , "bool", "Save package to subfolder" , True), + ("subfolder_per_pack", "bool", "Create a subfolder for each package", True)] __description__ = """Depositfiles.com folder decrypter plugin""" __license__ = "GPLv3" diff --git a/module/plugins/crypter/Dereferer.py b/module/plugins/crypter/Dereferer.py index 0729c8cb6..8427c1540 100644 --- a/module/plugins/crypter/Dereferer.py +++ b/module/plugins/crypter/Dereferer.py @@ -9,8 +9,8 @@ class Dereferer(SimpleDereferer): __version__ = "0.11" __pattern__ = r'https?://([^/]+)/.*?(?P(ht|f)tps?(://|%3A%2F%2F).+)' - __config__ = [("use_subfolder", "bool", "Save package to subfolder", True), - ("subfolder_per_package", "bool", "Create a subfolder for each package", True)] + __config__ = [("use_subfolder" , "bool", "Save package to subfolder" , True), + ("subfolder_per_pack", "bool", "Create a subfolder for each package", True)] __description__ = """Crypter for dereferers""" __license__ = "GPLv3" diff --git a/module/plugins/crypter/DevhostStFolder.py b/module/plugins/crypter/DevhostStFolder.py index 2753ee389..5cafbf6b8 100644 --- a/module/plugins/crypter/DevhostStFolder.py +++ b/module/plugins/crypter/DevhostStFolder.py @@ -16,8 +16,9 @@ class DevhostStFolder(SimpleCrypter): __version__ = "0.05" __pattern__ = r'http://(?:www\.)?d-h\.st/users/(?P\w+)(/\?fld_id=(?P\d+))?' - __config__ = [("use_subfolder", "bool", "Save package to subfolder", True), - ("subfolder_per_package", "bool", "Create a subfolder for each package", True)] + __config__ = [("use_premium" , "bool", "Use premium account if available" , True), + ("use_subfolder" , "bool", "Save package to subfolder" , True), + ("subfolder_per_pack", "bool", "Create a subfolder for each package", True)] __description__ = """d-h.st folder decrypter plugin""" __license__ = "GPLv3" diff --git a/module/plugins/crypter/DlProtectCom.py b/module/plugins/crypter/DlProtectCom.py index 5c20942ff..a9f39c6f3 100644 --- a/module/plugins/crypter/DlProtectCom.py +++ b/module/plugins/crypter/DlProtectCom.py @@ -14,8 +14,9 @@ class DlProtectCom(SimpleCrypter): __version__ = "0.03" __pattern__ = r'https?://(?:www\.)?dl-protect\.com/((en|fr)/)?\w+' - __config__ = [("use_subfolder", "bool", "Save package to subfolder", True), - ("subfolder_per_package", "bool", "Create a subfolder for each package", True)] + __config__ = [("use_premium" , "bool", "Use premium account if available" , True), + ("use_subfolder" , "bool", "Save package to subfolder" , True), + ("subfolder_per_pack", "bool", "Create a subfolder for each package", True)] __description__ = """Dl-protect.com decrypter plugin""" __license__ = "GPLv3" diff --git a/module/plugins/crypter/DontKnowMe.py b/module/plugins/crypter/DontKnowMe.py index d656cde4c..e56751972 100644 --- a/module/plugins/crypter/DontKnowMe.py +++ b/module/plugins/crypter/DontKnowMe.py @@ -9,8 +9,8 @@ class DontKnowMe(SimpleDereferer): __version__ = "0.11" __pattern__ = r'http://(?:www\.)?dontknow\.me/at/\?(?P.+)' - __config__ = [("use_subfolder", "bool", "Save package to subfolder", True), - ("subfolder_per_package", "bool", "Create a subfolder for each package", True)] + __config__ = [("use_subfolder" , "bool", "Save package to subfolder" , True), + ("subfolder_per_pack", "bool", "Create a subfolder for each package", True)] __description__ = """DontKnow.me decrypter plugin""" __license__ = "GPLv3" diff --git a/module/plugins/crypter/DuckCryptInfo.py b/module/plugins/crypter/DuckCryptInfo.py index 07cc5cdc4..cc108d101 100644 --- a/module/plugins/crypter/DuckCryptInfo.py +++ b/module/plugins/crypter/DuckCryptInfo.py @@ -13,8 +13,8 @@ class DuckCryptInfo(Crypter): __version__ = "0.02" __pattern__ = r'http://(?:www\.)?duckcrypt\.info/(folder|wait|link)/(\w+)/?(\w*)' - __config__ = [("use_subfolder", "bool", "Save package to subfolder", True), - ("subfolder_per_package", "bool", "Create a subfolder for each package", True)] + __config__ = [("use_subfolder" , "bool", "Save package to subfolder" , True), + ("subfolder_per_pack", "bool", "Create a subfolder for each package", True)] __description__ = """DuckCrypt.info decrypter plugin""" __license__ = "GPLv3" diff --git a/module/plugins/crypter/EasybytezComFolder.py b/module/plugins/crypter/EasybytezComFolder.py index 6c643e83f..fdd3d4ff4 100644 --- a/module/plugins/crypter/EasybytezComFolder.py +++ b/module/plugins/crypter/EasybytezComFolder.py @@ -9,8 +9,8 @@ class EasybytezComFolder(XFSCrypter): __version__ = "0.10" __pattern__ = r'http://(?:www\.)?easybytez\.com/users/\d+/\d+' - __config__ = [("use_subfolder", "bool", "Save package to subfolder", True), - ("subfolder_per_package", "bool", "Create a subfolder for each package", True)] + __config__ = [("use_subfolder" , "bool", "Save package to subfolder" , True), + ("subfolder_per_pack", "bool", "Create a subfolder for each package", True)] __description__ = """Easybytez.com folder decrypter plugin""" __license__ = "GPLv3" diff --git a/module/plugins/crypter/EmbeduploadCom.py b/module/plugins/crypter/EmbeduploadCom.py index 5336a0d03..d61fc7fda 100644 --- a/module/plugins/crypter/EmbeduploadCom.py +++ b/module/plugins/crypter/EmbeduploadCom.py @@ -11,10 +11,10 @@ class EmbeduploadCom(Crypter): __version__ = "0.02" __pattern__ = r'http://(?:www\.)?embedupload\.com/\?d=.+' - __config__ = [("use_subfolder", "bool", "Save package to subfolder", True), - ("subfolder_per_package", "bool", "Create a subfolder for each package", True), - ("preferedHoster", "str", "Prefered hoster list (bar-separated)", "embedupload"), - ("ignoredHoster", "str", "Ignored hoster list (bar-separated)", "")] + __config__ = [("use_subfolder" , "bool", "Save package to subfolder" , True ), + ("subfolder_per_pack", "bool", "Create a subfolder for each package" , True ), + ("preferedHoster" , "str" , "Prefered hoster list (bar-separated)", "embedupload"), + ("ignoredHoster" , "str" , "Ignored hoster list (bar-separated)" , "" )] __description__ = """EmbedUpload.com decrypter plugin""" __license__ = "GPLv3" diff --git a/module/plugins/crypter/FilecloudIoFolder.py b/module/plugins/crypter/FilecloudIoFolder.py index 83cce352d..f900f4910 100644 --- a/module/plugins/crypter/FilecloudIoFolder.py +++ b/module/plugins/crypter/FilecloudIoFolder.py @@ -9,8 +9,9 @@ class FilecloudIoFolder(SimpleCrypter): __version__ = "0.03" __pattern__ = r'https?://(?:www\.)?(filecloud\.io|ifile\.it)/_\w+' - __config__ = [("use_subfolder", "bool", "Save package to subfolder", True), - ("subfolder_per_package", "bool", "Create a subfolder for each package", True)] + __config__ = [("use_premium" , "bool", "Use premium account if available" , True), + ("use_subfolder" , "bool", "Save package to subfolder" , True), + ("subfolder_per_pack", "bool", "Create a subfolder for each package", True)] __description__ = """Filecloud.io folder decrypter plugin""" __license__ = "GPLv3" diff --git a/module/plugins/crypter/FilefactoryComFolder.py b/module/plugins/crypter/FilefactoryComFolder.py index 261c7e01a..c0cd028cc 100644 --- a/module/plugins/crypter/FilefactoryComFolder.py +++ b/module/plugins/crypter/FilefactoryComFolder.py @@ -9,8 +9,9 @@ class FilefactoryComFolder(SimpleCrypter): __version__ = "0.32" __pattern__ = r'https?://(?:www\.)?filefactory\.com/(?:f|folder)/\w+' - __config__ = [("use_subfolder", "bool", "Save package to subfolder", True), - ("subfolder_per_package", "bool", "Create a subfolder for each package", True)] + __config__ = [("use_premium" , "bool", "Use premium account if available" , True), + ("use_subfolder" , "bool", "Save package to subfolder" , True), + ("subfolder_per_pack", "bool", "Create a subfolder for each package", True)] __description__ = """Filefactory.com folder decrypter plugin""" __license__ = "GPLv3" diff --git a/module/plugins/crypter/FilerNetFolder.py b/module/plugins/crypter/FilerNetFolder.py index d33e26ee8..e2b44e868 100644 --- a/module/plugins/crypter/FilerNetFolder.py +++ b/module/plugins/crypter/FilerNetFolder.py @@ -9,8 +9,9 @@ class FilerNetFolder(SimpleCrypter): __version__ = "0.42" __pattern__ = r'https?://filer\.net/folder/\w{16}' - __config__ = [("use_subfolder", "bool", "Save package to subfolder", True), - ("subfolder_per_package", "bool", "Create a subfolder for each package", True)] + __config__ = [("use_premium" , "bool", "Use premium account if available" , True), + ("use_subfolder" , "bool", "Save package to subfolder" , True), + ("subfolder_per_pack", "bool", "Create a subfolder for each package", True)] __description__ = """Filer.net decrypter plugin""" __license__ = "GPLv3" diff --git a/module/plugins/crypter/FileserveComFolder.py b/module/plugins/crypter/FileserveComFolder.py index e6b35fd36..95ef49498 100644 --- a/module/plugins/crypter/FileserveComFolder.py +++ b/module/plugins/crypter/FileserveComFolder.py @@ -11,8 +11,8 @@ class FileserveComFolder(Crypter): __version__ = "0.11" __pattern__ = r'http://(?:www\.)?fileserve\.com/list/\w+' - __config__ = [("use_subfolder", "bool", "Save package to subfolder", True), - ("subfolder_per_package", "bool", "Create a subfolder for each package", True)] + __config__ = [("use_subfolder" , "bool", "Save package to subfolder" , True), + ("subfolder_per_pack", "bool", "Create a subfolder for each package", True)] __description__ = """FileServe.com folder decrypter plugin""" __license__ = "GPLv3" diff --git a/module/plugins/crypter/FilesonicComFolder.py b/module/plugins/crypter/FilesonicComFolder.py index d58516986..8fc28d592 100644 --- a/module/plugins/crypter/FilesonicComFolder.py +++ b/module/plugins/crypter/FilesonicComFolder.py @@ -9,6 +9,7 @@ class FilesonicComFolder(DeadCrypter): __version__ = "0.12" __pattern__ = r'http://(?:www\.)?filesonic\.com/folder/\w+' + __config__ = [] __description__ = """Filesonic.com folder decrypter plugin""" __license__ = "GPLv3" diff --git a/module/plugins/crypter/FilestubeCom.py b/module/plugins/crypter/FilestubeCom.py index 16ebdda37..133f4a53f 100644 --- a/module/plugins/crypter/FilestubeCom.py +++ b/module/plugins/crypter/FilestubeCom.py @@ -9,8 +9,9 @@ class FilestubeCom(SimpleCrypter): __version__ = "0.05" __pattern__ = r'http://(?:www\.)?filestube\.(?:com|to)/\w+' - __config__ = [("use_subfolder", "bool", "Save package to subfolder", True), - ("subfolder_per_package", "bool", "Create a subfolder for each package", True)] + __config__ = [("use_premium" , "bool", "Use premium account if available" , True), + ("use_subfolder" , "bool", "Save package to subfolder" , True), + ("subfolder_per_pack", "bool", "Create a subfolder for each package", True)] __description__ = """Filestube.com decrypter plugin""" __license__ = "GPLv3" diff --git a/module/plugins/crypter/FiletramCom.py b/module/plugins/crypter/FiletramCom.py index 76530c589..b012d35bc 100644 --- a/module/plugins/crypter/FiletramCom.py +++ b/module/plugins/crypter/FiletramCom.py @@ -9,8 +9,9 @@ class FiletramCom(SimpleCrypter): __version__ = "0.03" __pattern__ = r'http://(?:www\.)?filetram\.com/[^/]+/.+' - __config__ = [("use_subfolder", "bool", "Save package to subfolder", True), - ("subfolder_per_package", "bool", "Create a subfolder for each package", True)] + __config__ = [("use_premium" , "bool", "Use premium account if available" , True), + ("use_subfolder" , "bool", "Save package to subfolder" , True), + ("subfolder_per_pack", "bool", "Create a subfolder for each package", True)] __description__ = """Filetram.com decrypter plugin""" __license__ = "GPLv3" diff --git a/module/plugins/crypter/FourChanOrg.py b/module/plugins/crypter/FourChanOrg.py index c3fe3db4b..40a18179c 100644 --- a/module/plugins/crypter/FourChanOrg.py +++ b/module/plugins/crypter/FourChanOrg.py @@ -13,8 +13,8 @@ class FourChanOrg(Crypter): __version__ = "0.31" __pattern__ = r'http://(?:www\.)?boards\.4chan\.org/\w+/res/(\d+)' - __config__ = [("use_subfolder", "bool", "Save package to subfolder", True), - ("subfolder_per_package", "bool", "Create a subfolder for each package", True)] + __config__ = [("use_subfolder" , "bool", "Save package to subfolder" , True), + ("subfolder_per_pack", "bool", "Create a subfolder for each package", True)] __description__ = """4chan.org folder decrypter plugin""" __license__ = "GPLv3" diff --git a/module/plugins/crypter/FreakhareComFolder.py b/module/plugins/crypter/FreakhareComFolder.py index 7c1b7de2b..cf89d6a6d 100644 --- a/module/plugins/crypter/FreakhareComFolder.py +++ b/module/plugins/crypter/FreakhareComFolder.py @@ -11,8 +11,9 @@ class FreakhareComFolder(SimpleCrypter): __version__ = "0.03" __pattern__ = r'http://(?:www\.)?freakshare\.com/folder/.+' - __config__ = [("use_subfolder", "bool", "Save package to subfolder", True), - ("subfolder_per_package", "bool", "Create a subfolder for each package", True)] + __config__ = [("use_premium" , "bool", "Use premium account if available" , True), + ("use_subfolder" , "bool", "Save package to subfolder" , True), + ("subfolder_per_pack", "bool", "Create a subfolder for each package", True)] __description__ = """Freakhare.com folder decrypter plugin""" __license__ = "GPLv3" diff --git a/module/plugins/crypter/FreetexthostCom.py b/module/plugins/crypter/FreetexthostCom.py index c33c9ff64..cf6fbb8a4 100644 --- a/module/plugins/crypter/FreetexthostCom.py +++ b/module/plugins/crypter/FreetexthostCom.py @@ -11,8 +11,9 @@ class FreetexthostCom(SimpleCrypter): __version__ = "0.01" __pattern__ = r'http://(?:www\.)?freetexthost\.com/\w+' - __config__ = [("use_subfolder", "bool", "Save package to subfolder", True), - ("subfolder_per_package", "bool", "Create a subfolder for each package", True)] + __config__ = [("use_premium" , "bool", "Use premium account if available" , True), + ("use_subfolder" , "bool", "Save package to subfolder" , True), + ("subfolder_per_pack", "bool", "Create a subfolder for each package", True)] __description__ = """Freetexthost.com decrypter plugin""" __license__ = "GPLv3" diff --git a/module/plugins/crypter/FshareVnFolder.py b/module/plugins/crypter/FshareVnFolder.py index 474364e40..04508198a 100644 --- a/module/plugins/crypter/FshareVnFolder.py +++ b/module/plugins/crypter/FshareVnFolder.py @@ -9,8 +9,9 @@ class FshareVnFolder(SimpleCrypter): __version__ = "0.01" __pattern__ = r'http://(?:www\.)?fshare\.vn/folder/.+' - __config__ = [("use_subfolder", "bool", "Save package to subfolder", True), - ("subfolder_per_package", "bool", "Create a subfolder for each package", True)] + __config__ = [("use_premium" , "bool", "Use premium account if available" , True), + ("use_subfolder" , "bool", "Save package to subfolder" , True), + ("subfolder_per_pack", "bool", "Create a subfolder for each package", True)] __description__ = """Fshare.vn folder decrypter plugin""" __license__ = "GPLv3" diff --git a/module/plugins/crypter/Go4UpCom.py b/module/plugins/crypter/Go4UpCom.py index a7e16c0ab..39b85e09c 100644 --- a/module/plugins/crypter/Go4UpCom.py +++ b/module/plugins/crypter/Go4UpCom.py @@ -13,6 +13,9 @@ class Go4UpCom(SimpleCrypter): __version__ = "0.11" __pattern__ = r'http://go4up\.com/(dl/\w{12}|rd/\w{12}/\d+)' + __config__ = [("use_premium" , "bool", "Use premium account if available" , True), + ("use_subfolder" , "bool", "Save package to subfolder" , True), + ("subfolder_per_pack", "bool", "Create a subfolder for each package", True)] __description__ = """Go4Up.com decrypter plugin""" __license__ = "GPLv3" diff --git a/module/plugins/crypter/GooGl.py b/module/plugins/crypter/GooGl.py index d548a3375..b5f0c0447 100644 --- a/module/plugins/crypter/GooGl.py +++ b/module/plugins/crypter/GooGl.py @@ -10,8 +10,8 @@ class GooGl(Crypter): __version__ = "0.01" __pattern__ = r'https?://(?:www\.)?goo\.gl/\w+' - __config__ = [("use_subfolder", "bool", "Save package to subfolder", True), - ("subfolder_per_package", "bool", "Create a subfolder for each package", True)] + __config__ = [("use_subfolder" , "bool", "Save package to subfolder" , True), + ("subfolder_per_pack", "bool", "Create a subfolder for each package", True)] __description__ = """Goo.gl decrypter plugin""" __license__ = "GPLv3" diff --git a/module/plugins/crypter/HoerbuchIn.py b/module/plugins/crypter/HoerbuchIn.py index a347e4232..ccc3ab664 100644 --- a/module/plugins/crypter/HoerbuchIn.py +++ b/module/plugins/crypter/HoerbuchIn.py @@ -13,8 +13,8 @@ class HoerbuchIn(Crypter): __version__ = "0.60" __pattern__ = r'http://(?:www\.)?hoerbuch\.in/(wp/horbucher/\d+/.+/|tp/out\.php\?.+|protection/folder_\d+\.html)' - __config__ = [("use_subfolder", "bool", "Save package to subfolder", True), - ("subfolder_per_package", "bool", "Create a subfolder for each package", True)] + __config__ = [("use_subfolder" , "bool", "Save package to subfolder" , True), + ("subfolder_per_pack", "bool", "Create a subfolder for each package", True)] __description__ = """Hoerbuch.in decrypter plugin""" __license__ = "GPLv3" diff --git a/module/plugins/crypter/ImgurComAlbum.py b/module/plugins/crypter/ImgurComAlbum.py index 6c074f5f1..9ef7797af 100644 --- a/module/plugins/crypter/ImgurComAlbum.py +++ b/module/plugins/crypter/ImgurComAlbum.py @@ -10,8 +10,9 @@ class ImgurComAlbum(SimpleCrypter): __version__ = "0.51" __pattern__ = r'https?://(?:www\.|m\.)?imgur\.com/(a|gallery|)/?\w{5,7}' - __config__ = [("use_subfolder", "bool", "Save package to subfolder", True), - ("subfolder_per_package", "bool", "Create a subfolder for each package", True)] + __config__ = [("use_premium" , "bool", "Use premium account if available" , True), + ("use_subfolder" , "bool", "Save package to subfolder" , True), + ("subfolder_per_pack", "bool", "Create a subfolder for each package", True)] __description__ = """Imgur.com decrypter plugin""" __license__ = "GPLv3" diff --git a/module/plugins/crypter/LetitbitNetFolder.py b/module/plugins/crypter/LetitbitNetFolder.py index 56ecbc7f8..f5cc5fa78 100644 --- a/module/plugins/crypter/LetitbitNetFolder.py +++ b/module/plugins/crypter/LetitbitNetFolder.py @@ -10,8 +10,8 @@ class LetitbitNetFolder(Crypter): __version__ = "0.10" __pattern__ = r'http://(?:www\.)?letitbit\.net/folder/\w+' - __config__ = [("use_subfolder", "bool", "Save package to subfolder", True), - ("subfolder_per_package", "bool", "Create a subfolder for each package", True)] + __config__ = [("use_subfolder" , "bool", "Save package to subfolder" , True), + ("subfolder_per_pack", "bool", "Create a subfolder for each package", True)] __description__ = """Letitbit.net folder decrypter plugin""" __license__ = "GPLv3" diff --git a/module/plugins/crypter/LinkSaveIn.py b/module/plugins/crypter/LinkSaveIn.py index e96d0438e..040305bd9 100644 --- a/module/plugins/crypter/LinkSaveIn.py +++ b/module/plugins/crypter/LinkSaveIn.py @@ -9,8 +9,8 @@ class LinkSaveIn(SimpleDereferer): __version__ = "2.03" __pattern__ = r'https?://(?:www\.)?linksave\.in/\w+' - __config__ = [("use_subfolder", "bool", "Save package to subfolder", True), - ("subfolder_per_package", "bool", "Create a subfolder for each package", True)] + __config__ = [("use_subfolder" , "bool", "Save package to subfolder" , True), + ("subfolder_per_pack", "bool", "Create a subfolder for each package", True)] __description__ = """LinkSave.in decrypter plugin""" __license__ = "GPLv3" diff --git a/module/plugins/crypter/LinkdecrypterCom.py b/module/plugins/crypter/LinkdecrypterCom.py index 7dc174d66..01db87011 100644 --- a/module/plugins/crypter/LinkdecrypterCom.py +++ b/module/plugins/crypter/LinkdecrypterCom.py @@ -10,8 +10,8 @@ class LinkdecrypterCom(Crypter): __version__ = "0.29" __pattern__ = r'^unmatchable$' - __config__ = [("use_subfolder", "bool", "Save package to subfolder", True), - ("subfolder_per_package", "bool", "Create a subfolder for each package", True)] + __config__ = [("use_subfolder" , "bool", "Save package to subfolder" , True), + ("subfolder_per_pack", "bool", "Create a subfolder for each package", True)] __description__ = """Linkdecrypter.com decrypter plugin""" __license__ = "GPLv3" diff --git a/module/plugins/crypter/LixIn.py b/module/plugins/crypter/LixIn.py index d899d58c7..66a0cf339 100644 --- a/module/plugins/crypter/LixIn.py +++ b/module/plugins/crypter/LixIn.py @@ -11,8 +11,8 @@ class LixIn(Crypter): __version__ = "0.22" __pattern__ = r'http://(?:www\.)?lix\.in/(?P.+)' - __config__ = [("use_subfolder", "bool", "Save package to subfolder", True), - ("subfolder_per_package", "bool", "Create a subfolder for each package", True)] + __config__ = [("use_subfolder" , "bool", "Save package to subfolder" , True), + ("subfolder_per_pack", "bool", "Create a subfolder for each package", True)] __description__ = """Lix.in decrypter plugin""" __license__ = "GPLv3" diff --git a/module/plugins/crypter/MediafireComFolder.py b/module/plugins/crypter/MediafireComFolder.py index d1dc89518..c1612bb6a 100644 --- a/module/plugins/crypter/MediafireComFolder.py +++ b/module/plugins/crypter/MediafireComFolder.py @@ -12,8 +12,8 @@ class MediafireComFolder(Crypter): __version__ = "0.14" __pattern__ = r'http://(?:www\.)?mediafire\.com/(folder/|\?sharekey=|\?\w{13}($|[/#]))' - __config__ = [("use_subfolder", "bool", "Save package to subfolder", True), - ("subfolder_per_package", "bool", "Create a subfolder for each package", True)] + __config__ = [("use_subfolder" , "bool", "Save package to subfolder" , True), + ("subfolder_per_pack", "bool", "Create a subfolder for each package", True)] __description__ = """Mediafire.com folder decrypter plugin""" __license__ = "GPLv3" diff --git a/module/plugins/crypter/MegaCoNzFolder.py b/module/plugins/crypter/MegaCoNzFolder.py index 4bef61f67..bd135ac5f 100644 --- a/module/plugins/crypter/MegaCoNzFolder.py +++ b/module/plugins/crypter/MegaCoNzFolder.py @@ -11,8 +11,8 @@ class MegaCoNzFolder(Crypter): __version__ = "0.04" __pattern__ = r'(?:https?://(?:www\.)?mega\.co\.nz/|mega:|chrome:.+?)#F!(?P[\w^_]+)!(?P[\w,\\-]+)' - __config__ = [("use_subfolder", "bool", "Save package to subfolder", True), - ("subfolder_per_package", "bool", "Create a subfolder for each package", True)] + __config__ = [("use_subfolder" , "bool", "Save package to subfolder" , True), + ("subfolder_per_pack", "bool", "Create a subfolder for each package", True)] __description__ = """Mega.co.nz folder decrypter plugin""" __license__ = "GPLv3" diff --git a/module/plugins/crypter/MegaRapidCzFolder.py b/module/plugins/crypter/MegaRapidCzFolder.py index e7dff6c8a..63d41982d 100644 --- a/module/plugins/crypter/MegaRapidCzFolder.py +++ b/module/plugins/crypter/MegaRapidCzFolder.py @@ -9,8 +9,9 @@ class MegaRapidCzFolder(SimpleCrypter): __version__ = "0.02" __pattern__ = r'http://(?:www\.)?(share|mega)rapid\.cz/slozka/\d+/\w+' - __config__ = [("use_subfolder", "bool", "Save package to subfolder", True), - ("subfolder_per_package", "bool", "Create a subfolder for each package", True)] + __config__ = [("use_premium" , "bool", "Use premium account if available" , True), + ("use_subfolder" , "bool", "Save package to subfolder" , True), + ("subfolder_per_pack", "bool", "Create a subfolder for each package", True)] __description__ = """Share-Rapid.com folder decrypter plugin""" __license__ = "GPLv3" diff --git a/module/plugins/crypter/MegauploadComFolder.py b/module/plugins/crypter/MegauploadComFolder.py index 08f96700d..1af9d556d 100644 --- a/module/plugins/crypter/MegauploadComFolder.py +++ b/module/plugins/crypter/MegauploadComFolder.py @@ -9,6 +9,7 @@ class MegauploadComFolder(DeadCrypter): __version__ = "0.02" __pattern__ = r'http://(?:www\.)?megaupload\.com/(\?f|xml/folderfiles\.php\?.*&?folderid)=\w+' + __config__ = [] __description__ = """Megaupload.com folder decrypter plugin""" __license__ = "GPLv3" diff --git a/module/plugins/crypter/MultiUpOrg.py b/module/plugins/crypter/MultiUpOrg.py index 5209ebf09..3f9e819eb 100644 --- a/module/plugins/crypter/MultiUpOrg.py +++ b/module/plugins/crypter/MultiUpOrg.py @@ -12,8 +12,9 @@ class MultiUpOrg(SimpleCrypter): __version__ = "0.03" __pattern__ = r'http://(?:www\.)?multiup\.org/(en|fr)/(?Pproject|download|miror)/\w+(/\w+)?' - __config__ = [("use_subfolder", "bool", "Save package to subfolder", True), - ("subfolder_per_package", "bool", "Create a subfolder for each package", True)] + __config__ = [("use_premium" , "bool", "Use premium account if available" , True), + ("use_subfolder" , "bool", "Save package to subfolder" , True), + ("subfolder_per_pack", "bool", "Create a subfolder for each package", True)] __description__ = """MultiUp.org crypter plugin""" __license__ = "GPLv3" diff --git a/module/plugins/crypter/MultiloadCz.py b/module/plugins/crypter/MultiloadCz.py index 006408c4b..2abb627c3 100644 --- a/module/plugins/crypter/MultiloadCz.py +++ b/module/plugins/crypter/MultiloadCz.py @@ -10,10 +10,10 @@ class MultiloadCz(Crypter): __version__ = "0.40" __pattern__ = r'http://(?:[^/]*\.)?multiload\.cz/(stahnout|slozka)/.+' - __config__ = [("use_subfolder", "bool", "Save package to subfolder", True), - ("subfolder_per_package", "bool", "Create a subfolder for each package", True), - ("usedHoster", "str", "Prefered hoster list (bar-separated)", ""), - ("ignoredHoster", "str", "Ignored hoster list (bar-separated)", "")] + __config__ = [("use_subfolder" , "bool", "Save package to subfolder" , True), + ("subfolder_per_pack", "bool", "Create a subfolder for each package" , True), + ("usedHoster" , "str" , "Prefered hoster list (bar-separated)", "" ), + ("ignoredHoster" , "str" , "Ignored hoster list (bar-separated)" , "" )] __description__ = """Multiload.cz decrypter plugin""" __license__ = "GPLv3" diff --git a/module/plugins/crypter/NCryptIn.py b/module/plugins/crypter/NCryptIn.py index 20e7c72e2..8e69a9323 100644 --- a/module/plugins/crypter/NCryptIn.py +++ b/module/plugins/crypter/NCryptIn.py @@ -15,8 +15,8 @@ class NCryptIn(Crypter): __version__ = "1.34" __pattern__ = r'http://(?:www\.)?ncrypt\.in/(?Pfolder|link|frame)-([^/\?]+)' - __config__ = [("use_subfolder", "bool", "Save package to subfolder", True), - ("subfolder_per_package", "bool", "Create a subfolder for each package", True)] + __config__ = [("use_subfolder" , "bool", "Save package to subfolder" , True), + ("subfolder_per_pack", "bool", "Create a subfolder for each package", True)] __description__ = """NCrypt.in decrypter plugin""" __license__ = "GPLv3" diff --git a/module/plugins/crypter/NetfolderIn.py b/module/plugins/crypter/NetfolderIn.py index 62dc5c914..ac76c059e 100644 --- a/module/plugins/crypter/NetfolderIn.py +++ b/module/plugins/crypter/NetfolderIn.py @@ -11,8 +11,9 @@ class NetfolderIn(SimpleCrypter): __version__ = "0.72" __pattern__ = r'http://(?:www\.)?netfolder\.in/(folder\.php\?folder_id=)?(?P\w+)(?(1)|/\w+)' - __config__ = [("use_subfolder", "bool", "Save package to subfolder", True), - ("subfolder_per_package", "bool", "Create a subfolder for each package", True)] + __config__ = [("use_premium" , "bool", "Use premium account if available" , True), + ("use_subfolder" , "bool", "Save package to subfolder" , True), + ("subfolder_per_pack", "bool", "Create a subfolder for each package", True)] __description__ = """NetFolder.in decrypter plugin""" __license__ = "GPLv3" diff --git a/module/plugins/crypter/NosvideoCom.py b/module/plugins/crypter/NosvideoCom.py index 1e280abd2..9808837c4 100644 --- a/module/plugins/crypter/NosvideoCom.py +++ b/module/plugins/crypter/NosvideoCom.py @@ -9,8 +9,9 @@ class NosvideoCom(SimpleCrypter): __version__ = "0.03" __pattern__ = r'http://(?:www\.)?nosvideo\.com/\?v=\w+' - __config__ = [("use_subfolder", "bool", "Save package to subfolder", True), - ("subfolder_per_package", "bool", "Create a subfolder for each package", True)] + __config__ = [("use_premium" , "bool", "Use premium account if available" , True), + ("use_subfolder" , "bool", "Save package to subfolder" , True), + ("subfolder_per_pack", "bool", "Create a subfolder for each package", True)] __description__ = """Nosvideo.com decrypter plugin""" __license__ = "GPLv3" diff --git a/module/plugins/crypter/OneKhDe.py b/module/plugins/crypter/OneKhDe.py index 3e75d97b5..4dcb416f5 100644 --- a/module/plugins/crypter/OneKhDe.py +++ b/module/plugins/crypter/OneKhDe.py @@ -13,8 +13,8 @@ class OneKhDe(Crypter): __version__ = "0.11" __pattern__ = r'http://(?:www\.)?1kh\.de/f/' - __config__ = [("use_subfolder", "bool", "Save package to subfolder", True), - ("subfolder_per_package", "bool", "Create a subfolder for each package", True)] + __config__ = [("use_subfolder" , "bool", "Save package to subfolder" , True), + ("subfolder_per_pack", "bool", "Create a subfolder for each package", True)] __description__ = """1kh.de decrypter plugin""" __license__ = "GPLv3" diff --git a/module/plugins/crypter/PastebinCom.py b/module/plugins/crypter/PastebinCom.py index b3d5a4bea..e8ffec4e7 100644 --- a/module/plugins/crypter/PastebinCom.py +++ b/module/plugins/crypter/PastebinCom.py @@ -9,8 +9,9 @@ class PastebinCom(SimpleCrypter): __version__ = "0.03" __pattern__ = r'http://(?:www\.)?pastebin\.com/\w+' - __config__ = [("use_subfolder", "bool", "Save package to subfolder", True), - ("subfolder_per_package", "bool", "Create a subfolder for each package", True)] + __config__ = [("use_premium" , "bool", "Use premium account if available" , True), + ("use_subfolder" , "bool", "Save package to subfolder" , True), + ("subfolder_per_pack", "bool", "Create a subfolder for each package", True)] __description__ = """Pastebin.com decrypter plugin""" __license__ = "GPLv3" diff --git a/module/plugins/crypter/QuickshareCzFolder.py b/module/plugins/crypter/QuickshareCzFolder.py index 70666b55a..0ccba2a5e 100644 --- a/module/plugins/crypter/QuickshareCzFolder.py +++ b/module/plugins/crypter/QuickshareCzFolder.py @@ -10,8 +10,8 @@ class QuickshareCzFolder(Crypter): __version__ = "0.10" __pattern__ = r'http://(?:www\.)?quickshare\.cz/slozka-\d+' - __config__ = [("use_subfolder", "bool", "Save package to subfolder", True), - ("subfolder_per_package", "bool", "Create a subfolder for each package", True)] + __config__ = [("use_subfolder" , "bool", "Save package to subfolder" , True), + ("subfolder_per_pack", "bool", "Create a subfolder for each package", True)] __description__ = """Quickshare.cz folder decrypter plugin""" __license__ = "GPLv3" diff --git a/module/plugins/crypter/RelinkUs.py b/module/plugins/crypter/RelinkUs.py index c50481af0..e3082be00 100644 --- a/module/plugins/crypter/RelinkUs.py +++ b/module/plugins/crypter/RelinkUs.py @@ -17,8 +17,8 @@ class RelinkUs(Crypter): __version__ = "3.12" __pattern__ = r'http://(?:www\.)?relink\.us/(f/|((view|go)\.php\?id=))(?P.+)' - __config__ = [("use_subfolder", "bool", "Save package to subfolder", True), - ("subfolder_per_package", "bool", "Create a subfolder for each package", True)] + __config__ = [("use_subfolder" , "bool", "Save package to subfolder" , True), + ("subfolder_per_pack", "bool", "Create a subfolder for each package", True)] __description__ = """Relink.us decrypter plugin""" __license__ = "GPLv3" diff --git a/module/plugins/crypter/SafelinkingNet.py b/module/plugins/crypter/SafelinkingNet.py index 8e46e1e41..34a45ea6e 100644 --- a/module/plugins/crypter/SafelinkingNet.py +++ b/module/plugins/crypter/SafelinkingNet.py @@ -17,8 +17,8 @@ class SafelinkingNet(Crypter): __version__ = "0.14" __pattern__ = r'https?://(?:www\.)?safelinking\.net/([pd])/\w+' - __config__ = [("use_subfolder", "bool", "Save package to subfolder", True), - ("subfolder_per_package", "bool", "Create a subfolder for each package", True)] + __config__ = [("use_subfolder" , "bool", "Save package to subfolder" , True), + ("subfolder_per_pack", "bool", "Create a subfolder for each package", True)] __description__ = """Safelinking.net decrypter plugin""" __license__ = "GPLv3" diff --git a/module/plugins/crypter/SexuriaCom.py b/module/plugins/crypter/SexuriaCom.py index 3c952fd6b..fc69a693f 100644 --- a/module/plugins/crypter/SexuriaCom.py +++ b/module/plugins/crypter/SexuriaCom.py @@ -11,8 +11,8 @@ class SexuriaCom(Crypter): __version__ = "0.01" __pattern__ = r'http://(?:www\.)?sexuria\.com/(v1/)?(Pornos_Kostenlos_.+?_(\d+)\.html|dl_links_\d+_\d+\.html|id=\d+\&part=\d+\&link=\d+)' - __config__ = [("use_subfolder", "bool", "Save package to subfolder", True), - ("subfolder_per_package", "bool", "Create a subfolder for each package", True)] + __config__ = [("use_subfolder" , "bool", "Save package to subfolder" , True), + ("subfolder_per_pack", "bool", "Create a subfolder for each package", True)] __description__ = """Sexuria.com decrypter plugin""" __license__ = "GPLv3" diff --git a/module/plugins/crypter/ShareLinksBiz.py b/module/plugins/crypter/ShareLinksBiz.py index 00a037b2e..4a0b61b5f 100644 --- a/module/plugins/crypter/ShareLinksBiz.py +++ b/module/plugins/crypter/ShareLinksBiz.py @@ -13,8 +13,8 @@ class ShareLinksBiz(Crypter): __version__ = "1.14" __pattern__ = r'http://(?:www\.)?(share-links|s2l)\.biz/(?P_?\w+)' - __config__ = [("use_subfolder", "bool", "Save package to subfolder", True), - ("subfolder_per_package", "bool", "Create a subfolder for each package", True)] + __config__ = [("use_subfolder" , "bool", "Save package to subfolder" , True), + ("subfolder_per_pack", "bool", "Create a subfolder for each package", True)] __description__ = """Share-Links.biz decrypter plugin""" __license__ = "GPLv3" diff --git a/module/plugins/crypter/SharingmatrixComFolder.py b/module/plugins/crypter/SharingmatrixComFolder.py index e16bdf814..4448dd691 100644 --- a/module/plugins/crypter/SharingmatrixComFolder.py +++ b/module/plugins/crypter/SharingmatrixComFolder.py @@ -9,6 +9,7 @@ class SharingmatrixComFolder(DeadCrypter): __version__ = "0.01" __pattern__ = r'http://(?:www\.)?sharingmatrix\.com/folder/\w+' + __config__ = [] __description__ = """Sharingmatrix.com folder decrypter plugin""" __license__ = "GPLv3" diff --git a/module/plugins/crypter/TnyCz.py b/module/plugins/crypter/TnyCz.py index d36128550..719c26449 100644 --- a/module/plugins/crypter/TnyCz.py +++ b/module/plugins/crypter/TnyCz.py @@ -11,8 +11,9 @@ class TnyCz(SimpleCrypter): __version__ = "0.03" __pattern__ = r'http://(?:www\.)?tny\.cz/\w+' - __config__ = [("use_subfolder", "bool", "Save package to subfolder", True), - ("subfolder_per_package", "bool", "Create a subfolder for each package", True)] + __config__ = [("use_premium" , "bool", "Use premium account if available" , True), + ("use_subfolder" , "bool", "Save package to subfolder" , True), + ("subfolder_per_pack", "bool", "Create a subfolder for each package", True)] __description__ = """Tny.cz decrypter plugin""" __license__ = "GPLv3" diff --git a/module/plugins/crypter/TurbobitNetFolder.py b/module/plugins/crypter/TurbobitNetFolder.py index c6734c997..dcbd6a5d7 100644 --- a/module/plugins/crypter/TurbobitNetFolder.py +++ b/module/plugins/crypter/TurbobitNetFolder.py @@ -12,8 +12,9 @@ class TurbobitNetFolder(SimpleCrypter): __version__ = "0.05" __pattern__ = r'http://(?:www\.)?turbobit\.net/download/folder/(?P\w+)' - __config__ = [("use_subfolder", "bool", "Save package to subfolder", True), - ("subfolder_per_package", "bool", "Create a subfolder for each package", True)] + __config__ = [("use_premium" , "bool", "Use premium account if available" , True), + ("use_subfolder" , "bool", "Save package to subfolder" , True), + ("subfolder_per_pack", "bool", "Create a subfolder for each package", True)] __description__ = """Turbobit.net folder decrypter plugin""" __license__ = "GPLv3" diff --git a/module/plugins/crypter/TusfilesNetFolder.py b/module/plugins/crypter/TusfilesNetFolder.py index cb8efc9a8..47cc973f0 100644 --- a/module/plugins/crypter/TusfilesNetFolder.py +++ b/module/plugins/crypter/TusfilesNetFolder.py @@ -13,8 +13,8 @@ class TusfilesNetFolder(XFSCrypter): __version__ = "0.08" __pattern__ = r'https?://(?:www\.)?tusfiles\.net/go/(?P\w+)' - __config__ = [("use_subfolder", "bool", "Save package to subfolder", True), - ("subfolder_per_package", "bool", "Create a subfolder for each package", True)] + __config__ = [("use_subfolder" , "bool", "Save package to subfolder" , True), + ("subfolder_per_pack", "bool", "Create a subfolder for each package", True)] __description__ = """Tusfiles.net folder decrypter plugin""" __license__ = "GPLv3" diff --git a/module/plugins/crypter/UlozToFolder.py b/module/plugins/crypter/UlozToFolder.py index a1f3ed5ea..a9a6117c0 100644 --- a/module/plugins/crypter/UlozToFolder.py +++ b/module/plugins/crypter/UlozToFolder.py @@ -10,8 +10,8 @@ class UlozToFolder(Crypter): __version__ = "0.20" __pattern__ = r'http://(?:www\.)?(uloz\.to|ulozto\.(cz|sk|net)|bagruj\.cz|zachowajto\.pl)/(m|soubory)/.+' - __config__ = [("use_subfolder", "bool", "Save package to subfolder", True), - ("subfolder_per_package", "bool", "Create a subfolder for each package", True)] + __config__ = [("use_subfolder" , "bool", "Save package to subfolder" , True), + ("subfolder_per_pack", "bool", "Create a subfolder for each package", True)] __description__ = """Uloz.to folder decrypter plugin""" __license__ = "GPLv3" diff --git a/module/plugins/crypter/UploadableChFolder.py b/module/plugins/crypter/UploadableChFolder.py index 22f9ca2ed..f1eb93323 100644 --- a/module/plugins/crypter/UploadableChFolder.py +++ b/module/plugins/crypter/UploadableChFolder.py @@ -9,8 +9,9 @@ class UploadableChFolder(SimpleCrypter): __version__ = "0.03" __pattern__ = r'http://(?:www\.)?uploadable\.ch/list/\w+' - __config__ = [("use_subfolder", "bool", "Save package to subfolder", True), - ("subfolder_per_package", "bool", "Create a subfolder for each package", True)] + __config__ = [("use_premium" , "bool", "Use premium account if available" , True), + ("use_subfolder" , "bool", "Save package to subfolder" , True), + ("subfolder_per_pack", "bool", "Create a subfolder for each package", True)] __description__ = """ Uploadable.ch folder decrypter plugin """ __license__ = "GPLv3" diff --git a/module/plugins/crypter/UploadedToFolder.py b/module/plugins/crypter/UploadedToFolder.py index 0a71add70..b86c66bf7 100644 --- a/module/plugins/crypter/UploadedToFolder.py +++ b/module/plugins/crypter/UploadedToFolder.py @@ -13,8 +13,9 @@ class UploadedToFolder(SimpleCrypter): __version__ = "0.42" __pattern__ = r'http://(?:www\.)?(uploaded|ul)\.(to|net)/(f|folder|list)/(?P\w+)' - __config__ = [("use_subfolder", "bool", "Save package to subfolder", True), - ("subfolder_per_package", "bool", "Create a subfolder for each package", True)] + __config__ = [("use_premium" , "bool", "Use premium account if available" , True), + ("use_subfolder" , "bool", "Save package to subfolder" , True), + ("subfolder_per_pack", "bool", "Create a subfolder for each package", True)] __description__ = """UploadedTo decrypter plugin""" __license__ = "GPLv3" diff --git a/module/plugins/crypter/WuploadComFolder.py b/module/plugins/crypter/WuploadComFolder.py index 873c71fad..c4171667e 100644 --- a/module/plugins/crypter/WuploadComFolder.py +++ b/module/plugins/crypter/WuploadComFolder.py @@ -9,6 +9,7 @@ class WuploadComFolder(DeadCrypter): __version__ = "0.01" __pattern__ = r'http://(?:www\.)?wupload\.com/folder/\w+' + __config__ = [] __description__ = """Wupload.com folder decrypter plugin""" __license__ = "GPLv3" diff --git a/module/plugins/crypter/XFileSharingProFolder.py b/module/plugins/crypter/XFileSharingProFolder.py index 7d5cc9c6d..8b850271d 100644 --- a/module/plugins/crypter/XFileSharingProFolder.py +++ b/module/plugins/crypter/XFileSharingProFolder.py @@ -11,8 +11,8 @@ class XFileSharingProFolder(XFSCrypter): __version__ = "0.05" __pattern__ = r'^unmatchable$' - __config__ = [("use_subfolder", "bool", "Save package to subfolder", True), - ("subfolder_per_package", "bool", "Create a subfolder for each package", True)] + __config__ = [("use_subfolder" , "bool", "Save package to subfolder" , True), + ("subfolder_per_pack", "bool", "Create a subfolder for each package", True)] __description__ = """XFileSharingPro dummy folder decrypter plugin for hook""" __license__ = "GPLv3" diff --git a/module/plugins/crypter/XupPl.py b/module/plugins/crypter/XupPl.py index f2ecbee5a..5ab6750c4 100644 --- a/module/plugins/crypter/XupPl.py +++ b/module/plugins/crypter/XupPl.py @@ -9,8 +9,8 @@ class XupPl(Crypter): __version__ = "0.10" __pattern__ = r'https?://(?:[^/]*\.)?xup\.pl/.+' - __config__ = [("use_subfolder", "bool", "Save package to subfolder", True), - ("subfolder_per_package", "bool", "Create a subfolder for each package", True)] + __config__ = [("use_subfolder" , "bool", "Save package to subfolder" , True), + ("subfolder_per_pack", "bool", "Create a subfolder for each package", True)] __description__ = """Xup.pl decrypter plugin""" __license__ = "GPLv3" diff --git a/module/plugins/crypter/YoutubeComFolder.py b/module/plugins/crypter/YoutubeComFolder.py index 628cf9428..d7ca494fa 100644 --- a/module/plugins/crypter/YoutubeComFolder.py +++ b/module/plugins/crypter/YoutubeComFolder.py @@ -15,11 +15,11 @@ class YoutubeComFolder(Crypter): __version__ = "1.01" __pattern__ = r'https?://(?:www\.|m\.)?youtube\.com/(?Puser|playlist|view_play_list)(/|.*?[?&](?:list|p)=)(?P[\w-]+)' - __config__ = [("use_subfolder", "bool", "Save package to subfolder", True), - ("subfolder_per_package", "bool", "Create a subfolder for each package", True), - ("likes", "bool", "Grab user (channel) liked videos", False), - ("favorites", "bool", "Grab user (channel) favorite videos", False), - ("uploads", "bool", "Grab channel unplaylisted videos", True)] + __config__ = [("use_subfolder" , "bool", "Save package to subfolder" , True ), + ("subfolder_per_pack", "bool", "Create a subfolder for each package", True ), + ("likes" , "bool", "Grab user (channel) liked videos" , False), + ("favorites" , "bool", "Grab user (channel) favorite videos", False), + ("uploads" , "bool", "Grab channel unplaylisted videos" , True )] __description__ = """Youtube.com channel & playlist decrypter plugin""" __license__ = "GPLv3" -- cgit v1.2.3 From bc1af83376498c87ea8141a2e61c9d0ecb9dd5b5 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Thu, 26 Mar 2015 11:16:59 +0100 Subject: Tiny code cosmetics --- module/plugins/crypter/LinkdecrypterCom.py | 2 +- module/plugins/crypter/SexuriaCom.py | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'module/plugins/crypter') diff --git a/module/plugins/crypter/LinkdecrypterCom.py b/module/plugins/crypter/LinkdecrypterCom.py index 01db87011..c2e3ed91d 100644 --- a/module/plugins/crypter/LinkdecrypterCom.py +++ b/module/plugins/crypter/LinkdecrypterCom.py @@ -37,7 +37,7 @@ class LinkdecrypterCom(Crypter): self.html = self.load('http://linkdecrypter.com/', post=post_dict, decode=True) while retries: - m = re.search(self.TEXTAREA_PATTERN, self.html, flags=re.S) + m = re.search(self.TEXTAREA_PATTERN, self.html, re.S) if m: self.urls = [x for x in m.group(1).splitlines() if '[LINK-ERROR]' not in x] diff --git a/module/plugins/crypter/SexuriaCom.py b/module/plugins/crypter/SexuriaCom.py index fc69a693f..06dcf547e 100644 --- a/module/plugins/crypter/SexuriaCom.py +++ b/module/plugins/crypter/SexuriaCom.py @@ -19,13 +19,13 @@ class SexuriaCom(Crypter): __authors__ = [("NETHead", "NETHead.AT.gmx.DOT.net")] - PATTERN_SUPPORTED_MAIN = re.compile(r'http://(www\.)?sexuria\.com/(v1/)?Pornos_Kostenlos_.+?_(\d+)\.html', flags=re.I) - PATTERN_SUPPORTED_CRYPT = re.compile(r'http://(www\.)?sexuria\.com/(v1/)?dl_links_\d+_(?P\d+)\.html', flags=re.I) - PATTERN_SUPPORTED_REDIRECT = re.compile(r'http://(www\.)?sexuria\.com/out\.php\?id=(?P\d+)\&part=\d+\&link=\d+', flags=re.I) - PATTERN_TITLE = re.compile(r' - (?P<TITLE>.*) Sexuria - Kostenlose Pornos - Rapidshare XXX Porn', flags=re.I) - PATTERN_PASSWORD = re.compile(r'Passwort: .*?bgcolor="#EFEFEF">(?P.*?)', flags=re.I | re.S) - PATTERN_DL_LINK_PAGE = re.compile(r'"(dl_links_\d+_\d+\.html)"', flags=re.I) - PATTERN_REDIRECT_LINKS = re.compile(r'value="(http://sexuria\.com/out\.php\?id=\d+\&part=\d+\&link=\d+)" readonly', flags=re.I) + PATTERN_SUPPORTED_MAIN = re.compile(r'http://(www\.)?sexuria\.com/(v1/)?Pornos_Kostenlos_.+?_(\d+)\.html', re.I) + PATTERN_SUPPORTED_CRYPT = re.compile(r'http://(www\.)?sexuria\.com/(v1/)?dl_links_\d+_(?P\d+)\.html', re.I) + PATTERN_SUPPORTED_REDIRECT = re.compile(r'http://(www\.)?sexuria\.com/out\.php\?id=(?P\d+)\&part=\d+\&link=\d+', re.I) + PATTERN_TITLE = re.compile(r' - (?P<TITLE>.*) Sexuria - Kostenlose Pornos - Rapidshare XXX Porn', re.I) + PATTERN_PASSWORD = re.compile(r'Passwort: .*?bgcolor="#EFEFEF">(?P.*?)', re.I | re.S) + PATTERN_DL_LINK_PAGE = re.compile(r'"(dl_links_\d+_\d+\.html)"', re.I) + PATTERN_REDIRECT_LINKS = re.compile(r'value="(http://sexuria\.com/out\.php\?id=\d+\&part=\d+\&link=\d+)" readonly', re.I) def decrypt(self, pyfile): -- cgit v1.2.3 From 589121e80835c63aea0880a53c6678de5c31c16e Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 28 Mar 2015 01:59:01 +0100 Subject: Spare code cosmetics --- module/plugins/crypter/CrockoComFolder.py | 2 +- module/plugins/crypter/CzshareComFolder.py | 2 +- module/plugins/crypter/DepositfilesComFolder.py | 2 +- module/plugins/crypter/EmbeduploadCom.py | 2 +- module/plugins/crypter/FileserveComFolder.py | 2 +- module/plugins/crypter/FourChanOrg.py | 2 +- module/plugins/crypter/FreakhareComFolder.py | 2 +- module/plugins/crypter/FshareVnFolder.py | 2 +- module/plugins/crypter/LetitbitNetFolder.py | 2 +- module/plugins/crypter/LinkCryptWs.py | 6 +++--- module/plugins/crypter/MegaRapidCzFolder.py | 2 +- module/plugins/crypter/MultiloadCz.py | 4 ++-- module/plugins/crypter/NCryptIn.py | 4 ++-- module/plugins/crypter/PastebinCom.py | 2 +- module/plugins/crypter/QuickshareCzFolder.py | 2 +- module/plugins/crypter/UlozToFolder.py | 4 ++-- 16 files changed, 21 insertions(+), 21 deletions(-) (limited to 'module/plugins/crypter') diff --git a/module/plugins/crypter/CrockoComFolder.py b/module/plugins/crypter/CrockoComFolder.py index a01f3e814..f56cc449a 100644 --- a/module/plugins/crypter/CrockoComFolder.py +++ b/module/plugins/crypter/CrockoComFolder.py @@ -18,7 +18,7 @@ class CrockoComFolder(SimpleCrypter): __authors__ = [("zoidberg", "zoidberg@mujmail.cz")] - LINK_PATTERN = r'download' + LINK_PATTERN = r'download' getInfo = create_getInfo(CrockoComFolder) diff --git a/module/plugins/crypter/CzshareComFolder.py b/module/plugins/crypter/CzshareComFolder.py index b1f242416..c317b1b49 100644 --- a/module/plugins/crypter/CzshareComFolder.py +++ b/module/plugins/crypter/CzshareComFolder.py @@ -19,7 +19,7 @@ class CzshareComFolder(Crypter): FOLDER_PATTERN = r'\s*\s*(.*?)
' - LINK_PATTERN = r'info' + LINK_PATTERN = r'info' def decrypt(self, pyfile): diff --git a/module/plugins/crypter/DepositfilesComFolder.py b/module/plugins/crypter/DepositfilesComFolder.py index b23d4a41e..46ec265c3 100644 --- a/module/plugins/crypter/DepositfilesComFolder.py +++ b/module/plugins/crypter/DepositfilesComFolder.py @@ -18,7 +18,7 @@ class DepositfilesComFolder(SimpleCrypter): __authors__ = [("zoidberg", "zoidberg@mujmail.cz")] - LINK_PATTERN = r'
]*>\s*' + LINK_PATTERN = r'
\s*' getInfo = create_getInfo(DepositfilesComFolder) diff --git a/module/plugins/crypter/EmbeduploadCom.py b/module/plugins/crypter/EmbeduploadCom.py index d61fc7fda..28633f634 100644 --- a/module/plugins/crypter/EmbeduploadCom.py +++ b/module/plugins/crypter/EmbeduploadCom.py @@ -21,7 +21,7 @@ class EmbeduploadCom(Crypter): __authors__ = [("zoidberg", "zoidberg@mujmail.cz")] - LINK_PATTERN = r'
]*>\s*' + LINK_PATTERN = r'
\s*' def decrypt(self, pyfile): diff --git a/module/plugins/crypter/FileserveComFolder.py b/module/plugins/crypter/FileserveComFolder.py index 95ef49498..1363e2d45 100644 --- a/module/plugins/crypter/FileserveComFolder.py +++ b/module/plugins/crypter/FileserveComFolder.py @@ -20,7 +20,7 @@ class FileserveComFolder(Crypter): FOLDER_PATTERN = r'(.*?)
' - LINK_PATTERN = r'
' + LINK_PATTERN = r'' def decrypt(self, pyfile): diff --git a/module/plugins/crypter/FourChanOrg.py b/module/plugins/crypter/FourChanOrg.py index 40a18179c..c90c84b6f 100644 --- a/module/plugins/crypter/FourChanOrg.py +++ b/module/plugins/crypter/FourChanOrg.py @@ -23,5 +23,5 @@ class FourChanOrg(Crypter): def decrypt(self, pyfile): pagehtml = self.load(pyfile.url) - images = set(re.findall(r'(images\.4chan\.org/[^/]*/src/[^"<]*)', pagehtml)) + images = set(re.findall(r'(images\.4chan\.org/[^/]*/src/[^"<]+)', pagehtml)) self.urls = ["http://" + image for image in images] diff --git a/module/plugins/crypter/FreakhareComFolder.py b/module/plugins/crypter/FreakhareComFolder.py index cf89d6a6d..173660668 100644 --- a/module/plugins/crypter/FreakhareComFolder.py +++ b/module/plugins/crypter/FreakhareComFolder.py @@ -20,7 +20,7 @@ class FreakhareComFolder(SimpleCrypter): __authors__ = [("stickell", "l.stickell@yahoo.it")] - LINK_PATTERN = r'' + LINK_PATTERN = r'' NAME_PATTERN = r'Folder:
(?P.+)' PAGES_PATTERN = r'Pages: +(\d+)' diff --git a/module/plugins/crypter/FshareVnFolder.py b/module/plugins/crypter/FshareVnFolder.py index 04508198a..bbee53337 100644 --- a/module/plugins/crypter/FshareVnFolder.py +++ b/module/plugins/crypter/FshareVnFolder.py @@ -18,7 +18,7 @@ class FshareVnFolder(SimpleCrypter): __authors__ = [("zoidberg", "zoidberg@mujmail.cz")] - LINK_PATTERN = r'
  • ' + LINK_PATTERN = r'
  • ' getInfo = create_getInfo(FshareVnFolder) diff --git a/module/plugins/crypter/LetitbitNetFolder.py b/module/plugins/crypter/LetitbitNetFolder.py index f5cc5fa78..b60d754a7 100644 --- a/module/plugins/crypter/LetitbitNetFolder.py +++ b/module/plugins/crypter/LetitbitNetFolder.py @@ -20,7 +20,7 @@ class LetitbitNetFolder(Crypter): FOLDER_PATTERN = r'(.*)
    ' - LINK_PATTERN = r'
    ' + LINK_PATTERN = r'' def decrypt(self, pyfile): diff --git a/module/plugins/crypter/LinkCryptWs.py b/module/plugins/crypter/LinkCryptWs.py index 018ed90ba..d3e75aad4 100644 --- a/module/plugins/crypter/LinkCryptWs.py +++ b/module/plugins/crypter/LinkCryptWs.py @@ -131,7 +131,7 @@ class LinkCryptWs(Crypter): def unlockCaptchaProtection(self): - captcha_url = re.search(r']*?>.*?<\s*?input.*?src="([^"]*?)"', self.html, re.I | re.S).group(1) + captcha_url = re.search(r']*?>.*?<\s*?input.*?src="(.+?)"', self.html, re.I | re.S).group(1) captcha_code = self.decryptCaptcha(captcha_url, forceUser=True, imgtype="gif", result_type='positional') self.html = self.load(self.pyfile.url, post={"x": captcha_code[0], "y": captcha_code[1]}) @@ -190,7 +190,7 @@ class LinkCryptWs(Crypter): self.logDebug("Search for Web links ") package_links = [] - pattern = r'
    ]*?>.*?]*?value="([^"]*?)"[^>]*?name="file"' + pattern = r']*?>.*?]*?value="(.+?)"[^>]*?name="file"' ids = re.findall(pattern, self.html, re.I | re.S) self.logDebug("Decrypting %d Web links" % len(ids)) @@ -244,7 +244,7 @@ class LinkCryptWs(Crypter): for line in self.container_html: if type in line: jseval = self.handle_javascript(line) - clink = re.search(r'href=["\']([^"\']*?)["\']',jseval,re.I) + clink = re.search(r'href=["\'](["\']+)', jseval, re.I) if not clink: continue diff --git a/module/plugins/crypter/MegaRapidCzFolder.py b/module/plugins/crypter/MegaRapidCzFolder.py index 63d41982d..fadd6dbed 100644 --- a/module/plugins/crypter/MegaRapidCzFolder.py +++ b/module/plugins/crypter/MegaRapidCzFolder.py @@ -18,7 +18,7 @@ class MegaRapidCzFolder(SimpleCrypter): __authors__ = [("zoidberg", "zoidberg@mujmail.cz")] - LINK_PATTERN = r']*>' + LINK_PATTERN = r'' getInfo = create_getInfo(MegaRapidCzFolder) diff --git a/module/plugins/crypter/MultiloadCz.py b/module/plugins/crypter/MultiloadCz.py index 2abb627c3..eea689a09 100644 --- a/module/plugins/crypter/MultiloadCz.py +++ b/module/plugins/crypter/MultiloadCz.py @@ -20,8 +20,8 @@ class MultiloadCz(Crypter): __authors__ = [("zoidberg", "zoidberg@mujmail.cz")] - FOLDER_PATTERN = r']*>([^>]*)' - LINK_PATTERN = r'

    ([^<]+)

    ' + FOLDER_PATTERN = r'

    ([^>]*)' + LINK_PATTERN = r'

    ([^<]+)

    ' def decrypt(self, pyfile): diff --git a/module/plugins/crypter/NCryptIn.py b/module/plugins/crypter/NCryptIn.py index 8e69a9323..7de2c0df7 100644 --- a/module/plugins/crypter/NCryptIn.py +++ b/module/plugins/crypter/NCryptIn.py @@ -27,7 +27,7 @@ class NCryptIn(Crypter): JK_KEY = "jk" CRYPTED_KEY = "crypted" - NAME_PATTERN = r'(https?://[^ <]+)(?:[^<]*)

  • ' - NAME_PATTERN = r'
    ' + NAME_PATTERN = r'
    ' getInfo = create_getInfo(PastebinCom) diff --git a/module/plugins/crypter/QuickshareCzFolder.py b/module/plugins/crypter/QuickshareCzFolder.py index 0ccba2a5e..3e38d36b4 100644 --- a/module/plugins/crypter/QuickshareCzFolder.py +++ b/module/plugins/crypter/QuickshareCzFolder.py @@ -18,7 +18,7 @@ class QuickshareCzFolder(Crypter): __authors__ = [("zoidberg", "zoidberg@mujmail.cz")] - FOLDER_PATTERN = r']*>(.*?)' + FOLDER_PATTERN = r'(.*?)' LINK_PATTERN = r'(http://www\.quickshare\.cz/\S+)' diff --git a/module/plugins/crypter/UlozToFolder.py b/module/plugins/crypter/UlozToFolder.py index a9a6117c0..3f2a60cf7 100644 --- a/module/plugins/crypter/UlozToFolder.py +++ b/module/plugins/crypter/UlozToFolder.py @@ -19,8 +19,8 @@ class UlozToFolder(Crypter): FOLDER_PATTERN = r'
      (.*?)
    ' - LINK_PATTERN = r'
    [^<]+' - NEXT_PAGE_PATTERN = r'' + LINK_PATTERN = r'
    .+?' + NEXT_PAGE_PATTERN = r'' def decrypt(self, pyfile): -- cgit v1.2.3 From 02e3ede3edcf4415ac466fbea9d4f25d9ccc8671 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Wed, 8 Apr 2015 15:38:01 +0200 Subject: Spare code cosmetics --- module/plugins/crypter/NCryptIn.py | 2 +- module/plugins/crypter/RelinkUs.py | 6 +++--- module/plugins/crypter/ShareLinksBiz.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'module/plugins/crypter') diff --git a/module/plugins/crypter/NCryptIn.py b/module/plugins/crypter/NCryptIn.py index 7de2c0df7..8ceb9d3c8 100644 --- a/module/plugins/crypter/NCryptIn.py +++ b/module/plugins/crypter/NCryptIn.py @@ -108,7 +108,7 @@ class NCryptIn(Crypter): def isProtected(self): form = re.search(r'(.*?)', self.cleanedHtml, re.S) - if form is not None: + if form: content = form.group(1) for keyword in ("password", "captcha"): if keyword in content: diff --git a/module/plugins/crypter/RelinkUs.py b/module/plugins/crypter/RelinkUs.py index e3082be00..ed3da1f9b 100644 --- a/module/plugins/crypter/RelinkUs.py +++ b/module/plugins/crypter/RelinkUs.py @@ -153,7 +153,7 @@ class RelinkUs(Crypter): # Try to get info from web m = re.search(self.FILE_TITLE_REGEX, self.html) - if m is not None: + if m: title = m.group(1).strip() if not self.FILE_NOTITLE in title: name = folder = title @@ -198,7 +198,7 @@ class RelinkUs(Crypter): self.logDebug("Search for CNL2 links") package_links = [] m = re.search(self.CNL2_FORM_REGEX, self.html, re.S) - if m is not None: + if m: cnl2_form = m.group(1) try: (vcrypted, vjk) = self._getCipherParams(cnl2_form) @@ -213,7 +213,7 @@ class RelinkUs(Crypter): self.logDebug("Search for DLC links") package_links = [] m = re.search(self.DLC_LINK_REGEX, self.html) - if m is not None: + if m: container_url = self.DLC_DOWNLOAD_URL + "?id=%s&dlc=1" % self.fileid self.logDebug("Downloading DLC container link [%s]" % container_url) try: diff --git a/module/plugins/crypter/ShareLinksBiz.py b/module/plugins/crypter/ShareLinksBiz.py index 4a0b61b5f..f17ba54d7 100644 --- a/module/plugins/crypter/ShareLinksBiz.py +++ b/module/plugins/crypter/ShareLinksBiz.py @@ -164,7 +164,7 @@ class ShareLinksBiz(Crypter): # Extract from web package header title_re = r'

    (.*)

    ' m = re.search(title_re, self.html, re.S) - if m is not None: + if m: title = m.group(1).strip() if 'unnamed' not in title: name = folder = title -- 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/crypter/LinkdecrypterCom.py | 1 + 1 file changed, 1 insertion(+) (limited to 'module/plugins/crypter') diff --git a/module/plugins/crypter/LinkdecrypterCom.py b/module/plugins/crypter/LinkdecrypterCom.py index c2e3ed91d..0704214d0 100644 --- a/module/plugins/crypter/LinkdecrypterCom.py +++ b/module/plugins/crypter/LinkdecrypterCom.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- import re + from module.plugins.Crypter import Crypter -- cgit v1.2.3 From bd365a1fed377665b00c3d815b096b7fa7a26374 Mon Sep 17 00:00:00 2001 From: zapp-brannigan Date: Wed, 22 Apr 2015 09:20:38 +0200 Subject: [FilecryptCc.py] Fix circle captcha Fix https://github.com/pyload/pyload/issues/1364 --- module/plugins/crypter/FilecryptCc.py | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) (limited to 'module/plugins/crypter') diff --git a/module/plugins/crypter/FilecryptCc.py b/module/plugins/crypter/FilecryptCc.py index baea8886b..7679e9446 100644 --- a/module/plugins/crypter/FilecryptCc.py +++ b/module/plugins/crypter/FilecryptCc.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # http://filecrypt.cc/Container/64E039F859.html - +import base64 import binascii import re @@ -14,7 +14,7 @@ from module.plugins.internal.CaptchaService import ReCaptcha class FilecryptCc(Crypter): __name__ = "FilecryptCc" __type__ = "crypter" - __version__ = "0.11" + __version__ = "0.12" __pattern__ = r'https?://(?:www\.)?filecrypt\.cc/Container/\w+' @@ -39,7 +39,7 @@ class FilecryptCc(Crypter): def decrypt(self, pyfile): - self.html = self.load(pyfile.url) + self.html = self.load(pyfile.url, cookies=True) if "content notfound" in self.html: #@NOTE: "content notfound" is NOT a typo self.offline() @@ -64,7 +64,7 @@ class FilecryptCc(Crypter): self.logInfo(_("Found %d mirrors") % len(mirror)) for i in mirror[1:]: - self.siteWithLinks = self.siteWithLinks + self.load(i).decode("utf-8", "replace") + self.siteWithLinks = self.siteWithLinks + self.load(i, cookies=True).decode("utf-8", "replace") def handlePasswordProtection(self): @@ -78,7 +78,7 @@ class FilecryptCc(Crypter): if not password: self.fail(_("Please enter the password in package section and try again")) - self.html = self.load(self.pyfile.url, post={"password": password}) + self.html = self.load(self.pyfile.url, post={"password": password}, cookies=True) def handleCaptcha(self): @@ -94,17 +94,17 @@ class FilecryptCc(Crypter): self.siteWithLinks = self.load(self.pyfile.url, post={'recaptcha_response_field': captcha_code}, + cookies=True, decode=True) elif m2: #: circle captcha self.logDebug("Captcha-URL: %s" % m2.group(1)) - captcha_code = self.decryptCaptcha(urljoin("http://filecrypt.cc", m2.group(1)), - forceUser=True, - imgtype="gif", + captcha_code = self.decryptCaptcha('https://www.filecrypt.cc/captcha/circle.php?c=abc', result_type='positional') - + self.siteWithLinks = self.load(self.pyfile.url, post={'button.x': captcha_code[0], 'button.y': captcha_code[1]}, + cookies=True, decode=True) else: @@ -140,9 +140,9 @@ class FilecryptCc(Crypter): weblinks = re.findall(self.WEBLINK_PATTERN, self.siteWithLinks) for link in weblinks: - res = self.load("http://filecrypt.cc/Link/%s.html" % link) + res = self.load("http://filecrypt.cc/Link/%s.html" % link, cookies=True) link2 = re.search('', res) - res2 = self.load(link2.group(1), just_header=True) + res2 = self.load(link2.group(1), just_header=True, cookies=True) self.links.append(res2['location']) except Exception, e: @@ -165,14 +165,17 @@ class FilecryptCc(Crypter): # Get key key = binascii.unhexlify(str(jk)) + # Decode crypted + crypted = base64.standard_b64decode(crypted) + # Decrypt Key = key IV = key obj = AES.new(Key, AES.MODE_CBC, IV) - text = obj.decrypt(crypted.decode('base64')) + text = obj.decrypt(crypted) # Extract links - text = text.replace("\x00", "").replace("\r", "") - links = filter(bool, text.split('\n')) + links = filter(lambda x: x != "", + text.replace("\x00", "").replace("\r", "").split("\n")) return links -- cgit v1.2.3 From efbbbfe6cdba907f678779c10fe6532bd1f0054e Mon Sep 17 00:00:00 2001 From: zapp-brannigan Date: Wed, 22 Apr 2015 09:45:16 +0200 Subject: Update FilecryptCc.py --- module/plugins/crypter/FilecryptCc.py | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) (limited to 'module/plugins/crypter') diff --git a/module/plugins/crypter/FilecryptCc.py b/module/plugins/crypter/FilecryptCc.py index 7679e9446..9dd4f665d 100644 --- a/module/plugins/crypter/FilecryptCc.py +++ b/module/plugins/crypter/FilecryptCc.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # http://filecrypt.cc/Container/64E039F859.html -import base64 + import binascii import re @@ -39,7 +39,7 @@ class FilecryptCc(Crypter): def decrypt(self, pyfile): - self.html = self.load(pyfile.url, cookies=True) + self.html = self.load(pyfile.url) if "content notfound" in self.html: #@NOTE: "content notfound" is NOT a typo self.offline() @@ -64,7 +64,7 @@ class FilecryptCc(Crypter): self.logInfo(_("Found %d mirrors") % len(mirror)) for i in mirror[1:]: - self.siteWithLinks = self.siteWithLinks + self.load(i, cookies=True).decode("utf-8", "replace") + self.siteWithLinks = self.siteWithLinks + self.load(i).decode("utf-8", "replace") def handlePasswordProtection(self): @@ -78,7 +78,7 @@ class FilecryptCc(Crypter): if not password: self.fail(_("Please enter the password in package section and try again")) - self.html = self.load(self.pyfile.url, post={"password": password}, cookies=True) + self.html = self.load(self.pyfile.url, post={"password": password}) def handleCaptcha(self): @@ -94,17 +94,15 @@ class FilecryptCc(Crypter): self.siteWithLinks = self.load(self.pyfile.url, post={'recaptcha_response_field': captcha_code}, - cookies=True, decode=True) elif m2: #: circle captcha self.logDebug("Captcha-URL: %s" % m2.group(1)) captcha_code = self.decryptCaptcha('https://www.filecrypt.cc/captcha/circle.php?c=abc', result_type='positional') - + self.siteWithLinks = self.load(self.pyfile.url, post={'button.x': captcha_code[0], 'button.y': captcha_code[1]}, - cookies=True, decode=True) else: @@ -140,9 +138,9 @@ class FilecryptCc(Crypter): weblinks = re.findall(self.WEBLINK_PATTERN, self.siteWithLinks) for link in weblinks: - res = self.load("http://filecrypt.cc/Link/%s.html" % link, cookies=True) + res = self.load("http://filecrypt.cc/Link/%s.html" % link) link2 = re.search('', res) - res2 = self.load(link2.group(1), just_header=True, cookies=True) + res2 = self.load(link2.group(1), just_header=True) self.links.append(res2['location']) except Exception, e: @@ -165,17 +163,14 @@ class FilecryptCc(Crypter): # Get key key = binascii.unhexlify(str(jk)) - # Decode crypted - crypted = base64.standard_b64decode(crypted) - # Decrypt Key = key IV = key obj = AES.new(Key, AES.MODE_CBC, IV) - text = obj.decrypt(crypted) + text = obj.decrypt(crypted.decode('base64')) # Extract links - links = filter(lambda x: x != "", - text.replace("\x00", "").replace("\r", "").split("\n")) + text = text.replace("\x00", "").replace("\r", "") + links = filter(bool, text.split('\n')) return links -- cgit v1.2.3 From 6f4f6a983362a8ac6037a04dfdb5c7e97aea761c Mon Sep 17 00:00:00 2001 From: Gutz-Pilz Date: Wed, 22 Apr 2015 14:39:57 +0200 Subject: remove "www" in circlecaptcha to get it working --- module/plugins/crypter/FilecryptCc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/crypter') diff --git a/module/plugins/crypter/FilecryptCc.py b/module/plugins/crypter/FilecryptCc.py index 9dd4f665d..ca4cf57cb 100644 --- a/module/plugins/crypter/FilecryptCc.py +++ b/module/plugins/crypter/FilecryptCc.py @@ -98,7 +98,7 @@ class FilecryptCc(Crypter): elif m2: #: circle captcha self.logDebug("Captcha-URL: %s" % m2.group(1)) - captcha_code = self.decryptCaptcha('https://www.filecrypt.cc/captcha/circle.php?c=abc', + captcha_code = self.decryptCaptcha('https://filecrypt.cc/captcha/circle.php?c=abc', result_type='positional') self.siteWithLinks = self.load(self.pyfile.url, -- cgit v1.2.3 From 3e9b1980a488ff9947554c6f72fbe18637f3567e Mon Sep 17 00:00:00 2001 From: zapp-brannigan Date: Wed, 22 Apr 2015 21:02:21 +0200 Subject: [FilecryptCc.py] Avoid hardcoded urls Fix https://github.com/pyload/pyload/issues/1364 again ;) --- module/plugins/crypter/FilecryptCc.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'module/plugins/crypter') diff --git a/module/plugins/crypter/FilecryptCc.py b/module/plugins/crypter/FilecryptCc.py index ca4cf57cb..3c55ddd01 100644 --- a/module/plugins/crypter/FilecryptCc.py +++ b/module/plugins/crypter/FilecryptCc.py @@ -14,7 +14,7 @@ from module.plugins.internal.CaptchaService import ReCaptcha class FilecryptCc(Crypter): __name__ = "FilecryptCc" __type__ = "crypter" - __version__ = "0.12" + __version__ = "0.13" __pattern__ = r'https?://(?:www\.)?filecrypt\.cc/Container/\w+' @@ -31,7 +31,7 @@ class FilecryptCc(Crypter): CAPTCHA_PATTERN = r'' + MIRROR_PAGE_PATTERN = r'"[\w]*" href="(https?://(?:www\.)?filecrypt.cc/Container/\w+\.html\?mirror=\d+)">' def setup(self): @@ -40,6 +40,7 @@ class FilecryptCc(Crypter): def decrypt(self, pyfile): self.html = self.load(pyfile.url) + self.base_url = self.pyfile.url.split("Container")[0] if "content notfound" in self.html: #@NOTE: "content notfound" is NOT a typo self.offline() @@ -88,7 +89,7 @@ class FilecryptCc(Crypter): if m: #: normal captcha self.logDebug("Captcha-URL: %s" % m.group(1)) - captcha_code = self.decryptCaptcha(urljoin("http://filecrypt.cc", m.group(1)), + captcha_code = self.decryptCaptcha(urljoin(self.base_url, m.group(1)), forceUser=True, imgtype="gif") @@ -98,7 +99,7 @@ class FilecryptCc(Crypter): elif m2: #: circle captcha self.logDebug("Captcha-URL: %s" % m2.group(1)) - captcha_code = self.decryptCaptcha('https://filecrypt.cc/captcha/circle.php?c=abc', + captcha_code = self.decryptCaptcha('%s%s?c=abc' %(self.base_url,m2.group(1)), result_type='positional') self.siteWithLinks = self.load(self.pyfile.url, @@ -130,7 +131,7 @@ class FilecryptCc(Crypter): return for i in dlc: - self.links.append("http://filecrypt.cc/DLC/%s.dlc" % i) + self.links.append("%s/DLC/%s.dlc" % (self.base_url,i)) def handleWeblinks(self): @@ -138,7 +139,7 @@ class FilecryptCc(Crypter): weblinks = re.findall(self.WEBLINK_PATTERN, self.siteWithLinks) for link in weblinks: - res = self.load("http://filecrypt.cc/Link/%s.html" % link) + res = self.load("%s/Link/%s.html" % (self.base_url,link)) link2 = re.search('', res) res2 = self.load(link2.group(1), just_header=True) self.links.append(res2['location']) -- cgit v1.2.3 From 2e13b1e9efedfbd39bbc5a0cee8795f6c46f842b Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Wed, 22 Apr 2015 21:18:24 +0200 Subject: [FilecryptCc] Version up --- module/plugins/crypter/FilecryptCc.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'module/plugins/crypter') diff --git a/module/plugins/crypter/FilecryptCc.py b/module/plugins/crypter/FilecryptCc.py index ca4cf57cb..fdb65b657 100644 --- a/module/plugins/crypter/FilecryptCc.py +++ b/module/plugins/crypter/FilecryptCc.py @@ -1,5 +1,7 @@ # -*- coding: utf-8 -*- -# http://filecrypt.cc/Container/64E039F859.html +# +# Test links: +# http://filecrypt.cc/Container/64E039F859.html import binascii import re @@ -14,7 +16,7 @@ from module.plugins.internal.CaptchaService import ReCaptcha class FilecryptCc(Crypter): __name__ = "FilecryptCc" __type__ = "crypter" - __version__ = "0.12" + __version__ = "0.13" __pattern__ = r'https?://(?:www\.)?filecrypt\.cc/Container/\w+' -- cgit v1.2.3 From bc7ea571a65f01d5eb2b30d6707418e4dad25258 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Wed, 22 Apr 2015 21:32:48 +0200 Subject: [FilecryptCc] Version up (2) --- module/plugins/crypter/FilecryptCc.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'module/plugins/crypter') diff --git a/module/plugins/crypter/FilecryptCc.py b/module/plugins/crypter/FilecryptCc.py index 1bbe8f4fe..495efd706 100644 --- a/module/plugins/crypter/FilecryptCc.py +++ b/module/plugins/crypter/FilecryptCc.py @@ -16,7 +16,7 @@ from module.plugins.internal.CaptchaService import ReCaptcha class FilecryptCc(Crypter): __name__ = "FilecryptCc" __type__ = "crypter" - __version__ = "0.13" + __version__ = "0.14" __pattern__ = r'https?://(?:www\.)?filecrypt\.cc/Container/\w+' @@ -101,7 +101,7 @@ class FilecryptCc(Crypter): elif m2: #: circle captcha self.logDebug("Captcha-URL: %s" % m2.group(1)) - captcha_code = self.decryptCaptcha('%s%s?c=abc' %(self.base_url,m2.group(1)), + captcha_code = self.decryptCaptcha('%s%s?c=abc' %(self.base_url, m2.group(1)), result_type='positional') self.siteWithLinks = self.load(self.pyfile.url, @@ -133,7 +133,7 @@ class FilecryptCc(Crypter): return for i in dlc: - self.links.append("%s/DLC/%s.dlc" % (self.base_url,i)) + self.links.append("%s/DLC/%s.dlc" % (self.base_url, i)) def handleWeblinks(self): @@ -141,7 +141,7 @@ class FilecryptCc(Crypter): weblinks = re.findall(self.WEBLINK_PATTERN, self.siteWithLinks) for link in weblinks: - res = self.load("%s/Link/%s.html" % (self.base_url,link)) + res = self.load("%s/Link/%s.html" % (self.base_url, link)) link2 = re.search('', res) res2 = self.load(link2.group(1), just_header=True) self.links.append(res2['location']) -- cgit v1.2.3 From 527692a7fff612168bbcb210a6fcc838137c479c Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Thu, 30 Apr 2015 22:09:26 +0200 Subject: Fix https://github.com/pyload/pyload/issues/1373 --- module/plugins/crypter/Go4UpCom.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'module/plugins/crypter') diff --git a/module/plugins/crypter/Go4UpCom.py b/module/plugins/crypter/Go4UpCom.py index 39b85e09c..6e7d09466 100644 --- a/module/plugins/crypter/Go4UpCom.py +++ b/module/plugins/crypter/Go4UpCom.py @@ -10,7 +10,7 @@ from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo class Go4UpCom(SimpleCrypter): __name__ = "Go4UpCom" __type__ = "crypter" - __version__ = "0.11" + __version__ = "0.12" __pattern__ = r'http://go4up\.com/(dl/\w{12}|rd/\w{12}/\d+)' __config__ = [("use_premium" , "bool", "Use premium account if available" , True), @@ -30,10 +30,10 @@ class Go4UpCom(SimpleCrypter): OFFLINE_PATTERN = r'>\s*(404 Page Not Found|File not Found|Mirror does not exist)' - def getLinks(self + def getLinks(self): links = [] - m = re.search(r'(/download/gethosts/.+?)"') + m = re.search(r'(/download/gethosts/.+?)"', self.html) if m: self.html = self.load(urljoin("http://go4up.com/", m.group(1))) pages = [self.load(url) for url in re.findall(self.LINK_PATTERN, self.html)] -- cgit v1.2.3 From 1ef93e913238275f7657d496ba3d2e7eeb5a30a2 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 1 May 2015 01:06:01 +0200 Subject: Use 'import' instead 'from' --- module/plugins/crypter/CloudzillaToFolder.py | 3 +-- module/plugins/crypter/DailymotionComFolder.py | 5 ++--- module/plugins/crypter/DevhostStFolder.py | 5 ++--- module/plugins/crypter/FilecryptCc.py | 4 ++-- module/plugins/crypter/Go4UpCom.py | 5 ++--- module/plugins/crypter/MultiUpOrg.py | 4 ++-- module/plugins/crypter/SafelinkingNet.py | 2 -- module/plugins/crypter/TusfilesNetFolder.py | 4 ++-- module/plugins/crypter/UploadedToFolder.py | 5 ++--- module/plugins/crypter/YoutubeComFolder.py | 5 ++--- 10 files changed, 17 insertions(+), 25 deletions(-) (limited to 'module/plugins/crypter') diff --git a/module/plugins/crypter/CloudzillaToFolder.py b/module/plugins/crypter/CloudzillaToFolder.py index 76019d928..96d7245f1 100644 --- a/module/plugins/crypter/CloudzillaToFolder.py +++ b/module/plugins/crypter/CloudzillaToFolder.py @@ -1,8 +1,7 @@ # -*- coding: utf-8 -*- import re - -from urlparse import urljoin +import urlparse from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo diff --git a/module/plugins/crypter/DailymotionComFolder.py b/module/plugins/crypter/DailymotionComFolder.py index 5c078000a..01caa0bb8 100644 --- a/module/plugins/crypter/DailymotionComFolder.py +++ b/module/plugins/crypter/DailymotionComFolder.py @@ -1,8 +1,7 @@ # -*- coding: utf-8 -*- import re - -from urlparse import urljoin +import urlparse from module.common.json_layer import json_loads from module.plugins.Crypter import Crypter @@ -24,7 +23,7 @@ class DailymotionComFolder(Crypter): def api_response(self, ref, req=None): - url = urljoin("https://api.dailymotion.com/", ref) + url = urlparse.urljoin("https://api.dailymotion.com/", ref) html = self.load(url, get=req) return json_loads(html) diff --git a/module/plugins/crypter/DevhostStFolder.py b/module/plugins/crypter/DevhostStFolder.py index 5cafbf6b8..4d15e2058 100644 --- a/module/plugins/crypter/DevhostStFolder.py +++ b/module/plugins/crypter/DevhostStFolder.py @@ -4,8 +4,7 @@ # http://d-h.st/users/shine/?fld_id=37263#files import re - -from urlparse import urljoin +import urlparse from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo @@ -42,7 +41,7 @@ class DevhostStFolder(SimpleCrypter): p = r'href="(.+?)">Back to \w+<' m = re.search(p, self.html) - html = self.load(urljoin("http://d-h.st", m.group(1)), + html = self.load(urlparse.urljoin("http://d-h.st", m.group(1)), cookies=False) p = '\?fld_id=%s.*?">(.+?)<' % self.info['pattern']['ID'] diff --git a/module/plugins/crypter/FilecryptCc.py b/module/plugins/crypter/FilecryptCc.py index 495efd706..a1a94b6f6 100644 --- a/module/plugins/crypter/FilecryptCc.py +++ b/module/plugins/crypter/FilecryptCc.py @@ -5,9 +5,9 @@ import binascii import re +import urlparse from Crypto.Cipher import AES -from urlparse import urljoin from module.plugins.Crypter import Crypter from module.plugins.internal.CaptchaService import ReCaptcha @@ -91,7 +91,7 @@ class FilecryptCc(Crypter): if m: #: normal captcha self.logDebug("Captcha-URL: %s" % m.group(1)) - captcha_code = self.decryptCaptcha(urljoin(self.base_url, m.group(1)), + captcha_code = self.decryptCaptcha(urlparse.urljoin(self.base_url, m.group(1)), forceUser=True, imgtype="gif") diff --git a/module/plugins/crypter/Go4UpCom.py b/module/plugins/crypter/Go4UpCom.py index 6e7d09466..22f31f6f6 100644 --- a/module/plugins/crypter/Go4UpCom.py +++ b/module/plugins/crypter/Go4UpCom.py @@ -1,8 +1,7 @@ # -*- coding: utf-8 -*- import re - -from urlparse import urljoin +import urlparse from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo @@ -35,7 +34,7 @@ class Go4UpCom(SimpleCrypter): m = re.search(r'(/download/gethosts/.+?)"', self.html) if m: - self.html = self.load(urljoin("http://go4up.com/", m.group(1))) + self.html = self.load(urlparse.urljoin("http://go4up.com/", m.group(1))) pages = [self.load(url) for url in re.findall(self.LINK_PATTERN, self.html)] else: pages = [self.html] diff --git a/module/plugins/crypter/MultiUpOrg.py b/module/plugins/crypter/MultiUpOrg.py index 3f9e819eb..b676c3029 100644 --- a/module/plugins/crypter/MultiUpOrg.py +++ b/module/plugins/crypter/MultiUpOrg.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- import re -from urlparse import urljoin +import urlparse from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo @@ -33,7 +33,7 @@ class MultiUpOrg(SimpleCrypter): pattern = r'style="width:97%;text-align:left".*\n.*href="(.*)"' if m_type == "download": dl_pattern = r'href="(.*)">.*\n.*
    DOWNLOAD
    ' - miror_page = urljoin("http://www.multiup.org", re.search(dl_pattern, self.html).group(1)) + miror_page = urlparse.urljoin("http://www.multiup.org", re.search(dl_pattern, self.html).group(1)) self.html = self.load(miror_page) return re.findall(pattern, self.html) diff --git a/module/plugins/crypter/SafelinkingNet.py b/module/plugins/crypter/SafelinkingNet.py index 34a45ea6e..7f0915065 100644 --- a/module/plugins/crypter/SafelinkingNet.py +++ b/module/plugins/crypter/SafelinkingNet.py @@ -2,8 +2,6 @@ import re -from pycurl import FOLLOWLOCATION - from BeautifulSoup import BeautifulSoup from module.common.json_layer import json_loads diff --git a/module/plugins/crypter/TusfilesNetFolder.py b/module/plugins/crypter/TusfilesNetFolder.py index 47cc973f0..1cc505b81 100644 --- a/module/plugins/crypter/TusfilesNetFolder.py +++ b/module/plugins/crypter/TusfilesNetFolder.py @@ -2,7 +2,7 @@ import math import re -from urlparse import urljoin +import urlparse from module.plugins.internal.XFSCrypter import XFSCrypter, create_getInfo @@ -28,7 +28,7 @@ class TusfilesNetFolder(XFSCrypter): def loadPage(self, page_n): - return self.load(urljoin(self.pyfile.url, str(page_n)), decode=True) + return self.load(urlparse.urljoin(self.pyfile.url, str(page_n)), decode=True) def handlePages(self, pyfile): diff --git a/module/plugins/crypter/UploadedToFolder.py b/module/plugins/crypter/UploadedToFolder.py index b86c66bf7..d54ed47eb 100644 --- a/module/plugins/crypter/UploadedToFolder.py +++ b/module/plugins/crypter/UploadedToFolder.py @@ -1,8 +1,7 @@ # -*- coding: utf-8 -*- import re - -from urlparse import urljoin +import urlparse from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo @@ -31,7 +30,7 @@ class UploadedToFolder(SimpleCrypter): if m is None: self.error(_("PLAIN_PATTERN not found")) - plain_link = urljoin("http://uploaded.net/", m.group(1)) + plain_link = urlparse.urljoin("http://uploaded.net/", m.group(1)) return self.load(plain_link).split('\n')[:-1] diff --git a/module/plugins/crypter/YoutubeComFolder.py b/module/plugins/crypter/YoutubeComFolder.py index d7ca494fa..a2b02b2f1 100644 --- a/module/plugins/crypter/YoutubeComFolder.py +++ b/module/plugins/crypter/YoutubeComFolder.py @@ -1,8 +1,7 @@ # -*- coding: utf-8 -*- import re - -from urlparse import urljoin +import urlparse from module.common.json_layer import json_loads from module.plugins.Crypter import Crypter @@ -31,7 +30,7 @@ class YoutubeComFolder(Crypter): def api_response(self, ref, req): req.update({"key": self.API_KEY}) - url = urljoin("https://www.googleapis.com/youtube/v3/", ref) + url = urlparse.urljoin("https://www.googleapis.com/youtube/v3/", ref) html = self.load(url, get=req) return json_loads(html) -- cgit v1.2.3 From 339b2e07d78b15ca014ee12f1501cdb235d9b064 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Mon, 18 May 2015 11:50:43 +0200 Subject: [SimpleHoster] Fix create_getInfo --- module/plugins/crypter/LinkCryptWs.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'module/plugins/crypter') diff --git a/module/plugins/crypter/LinkCryptWs.py b/module/plugins/crypter/LinkCryptWs.py index d3e75aad4..5c65e726d 100644 --- a/module/plugins/crypter/LinkCryptWs.py +++ b/module/plugins/crypter/LinkCryptWs.py @@ -91,7 +91,7 @@ class LinkCryptWs(Crypter): def isOnline(self): if "Linkcrypt.ws // Error 404" in self.html: - self.logDebug("folder doesen't exist anymore") + self.logDebug("Folder doesn't exist anymore") return False else: return True @@ -197,8 +197,6 @@ class LinkCryptWs(Crypter): for idx, weblink_id in enumerate(ids): try: - self.logDebug("Decrypting Web link %d, %s" % (idx + 1, weblink_id)) - res = self.load("http://linkcrypt.ws/out.html", post = {'file':weblink_id}) indexs = res.find("window.location =") + 19 @@ -206,8 +204,6 @@ class LinkCryptWs(Crypter): link2 = res[indexs:indexe] - self.logDebug(link2) - link2 = html_unescape(link2) package_links.append(link2) -- cgit v1.2.3 From b66a9380e5efba5b7ec44a81eaa8be2cda8ad8f6 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Mon, 25 May 2015 13:49:57 +0200 Subject: New crypter: GoogledriveComFolder --- module/plugins/crypter/GoogledriveComFolder.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 module/plugins/crypter/GoogledriveComFolder.py (limited to 'module/plugins/crypter') diff --git a/module/plugins/crypter/GoogledriveComFolder.py b/module/plugins/crypter/GoogledriveComFolder.py new file mode 100644 index 000000000..8e6cdbc51 --- /dev/null +++ b/module/plugins/crypter/GoogledriveComFolder.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -* + +from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo + + +class GoogledriveComFolder(SimpleCrypter): + __name__ = "GoogledriveCom" + __type__ = "crypter" + __version__ = "0.01" + + __pattern__ = r'https?://(?:www\.)?drive\.google\.com/folderview\?.*id=\w+' + + __description__ = """Drive.google.com folder decrypter plugin""" + __license__ = "GPLv3" + __authors__ = [("Walter Purcaro", "vuolter@gmail.com")] + + + NAME_PATTERN = r"folderName: '(?P.+?)'" + LINK_PATTERN = r'\[,"\w+"(?:,,".+?")?,"(.+?)"' + OFFLINE_PATTERN = r'' + + +getInfo = create_getInfo(GoogledriveComFolder) -- 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/crypter/FourChanOrg.py | 3 ++- module/plugins/crypter/LixIn.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'module/plugins/crypter') diff --git a/module/plugins/crypter/FourChanOrg.py b/module/plugins/crypter/FourChanOrg.py index c90c84b6f..366adef14 100644 --- a/module/plugins/crypter/FourChanOrg.py +++ b/module/plugins/crypter/FourChanOrg.py @@ -3,6 +3,7 @@ # Based on 4chandl by Roland Beermann (https://gist.github.com/enkore/3492599) import re +import urlparse from module.plugins.Crypter import Crypter @@ -24,4 +25,4 @@ class FourChanOrg(Crypter): def decrypt(self, pyfile): pagehtml = self.load(pyfile.url) images = set(re.findall(r'(images\.4chan\.org/[^/]*/src/[^"<]+)', pagehtml)) - self.urls = ["http://" + image for image in images] + self.urls = [urlparse.urljoin("http://", image) for image in images] diff --git a/module/plugins/crypter/LixIn.py b/module/plugins/crypter/LixIn.py index 66a0cf339..5c77eae5e 100644 --- a/module/plugins/crypter/LixIn.py +++ b/module/plugins/crypter/LixIn.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- import re +import urlparse from module.plugins.Crypter import Crypter @@ -46,7 +47,7 @@ class LixIn(Crypter): m = re.search(self.CAPTCHA_PATTERN, self.html) if m: self.logDebug("Trying captcha") - captcharesult = self.decryptCaptcha("http://lix.in/" + m.group(1)) + captcharesult = self.decryptCaptcha(urlparse.urljoin("http://lix.in/", m.group(1))) self.html = self.load(url, decode=True, post={"capt": captcharesult, "submit": "submit", "tiny": id}) else: -- cgit v1.2.3 From 8fdf78569ba68c8ee4849cbfc144a9fbdac263f5 Mon Sep 17 00:00:00 2001 From: Walter Purcaro <vuolter@users.noreply.github.com> Date: Mon, 25 May 2015 17:04:49 +0200 Subject: [UserAgentSwitcher] Fixup (3) --- module/plugins/crypter/GoogledriveComFolder.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'module/plugins/crypter') diff --git a/module/plugins/crypter/GoogledriveComFolder.py b/module/plugins/crypter/GoogledriveComFolder.py index 8e6cdbc51..70898b313 100644 --- a/module/plugins/crypter/GoogledriveComFolder.py +++ b/module/plugins/crypter/GoogledriveComFolder.py @@ -9,6 +9,8 @@ class GoogledriveComFolder(SimpleCrypter): __version__ = "0.01" __pattern__ = r'https?://(?:www\.)?drive\.google\.com/folderview\?.*id=\w+' + __config__ = [("use_subfolder" , "bool", "Save package to subfolder" , True), #: Overrides core.config['general']['folder_per_package'] + ("subfolder_per_pack", "bool", "Create a subfolder for each package", True)] __description__ = """Drive.google.com folder decrypter plugin""" __license__ = "GPLv3" -- 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/crypter/NetfolderIn.py | 64 +++-------------------------------- 1 file changed, 5 insertions(+), 59 deletions(-) (limited to 'module/plugins/crypter') diff --git a/module/plugins/crypter/NetfolderIn.py b/module/plugins/crypter/NetfolderIn.py index ac76c059e..32d59af03 100644 --- a/module/plugins/crypter/NetfolderIn.py +++ b/module/plugins/crypter/NetfolderIn.py @@ -1,19 +1,15 @@ # -*- coding: utf-8 -*- -import re +from module.plugins.internal.DeadCrypter import DeadCrypter, create_getInfo -from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo - -class NetfolderIn(SimpleCrypter): +class NetfolderIn(DeadCrypter): __name__ = "NetfolderIn" __type__ = "crypter" - __version__ = "0.72" + __version__ = "0.73" - __pattern__ = r'http://(?:www\.)?netfolder\.in/(folder\.php\?folder_id=)?(?P<ID>\w+)(?(1)|/\w+)' - __config__ = [("use_premium" , "bool", "Use premium account if available" , True), - ("use_subfolder" , "bool", "Save package to subfolder" , True), - ("subfolder_per_pack", "bool", "Create a subfolder for each package", True)] + __pattern__ = r'http://(?:www\.)?netfolder\.(in|me)/(folder\.php\?folder_id=)?(?P<ID>\w+)(?(1)|/\w+)' + __config__ = [] #@TODO: Remove in 0.4.10 __description__ = """NetFolder.in decrypter plugin""" __license__ = "GPLv3" @@ -21,54 +17,4 @@ class NetfolderIn(SimpleCrypter): ("fragonib", "fragonib[AT]yahoo[DOT]es")] - NAME_PATTERN = r'<div class="Text">Inhalt des Ordners <span.*>(?P<N>.+)</span></div>' - - - def prepare(self): - super(NetfolderIn, self).prepare() - - # Check for password protection - if self.isPasswordProtected(): - self.html = self.submitPassword() - if not self.html: - self.fail(_("Incorrect password, please set right password on Add package form and retry")) - - - def isPasswordProtected(self): - if '<input type="password" name="password"' in self.html: - self.logDebug("Links are password protected") - return True - return False - - - def submitPassword(self): - # Gather data - try: - m = re.match(self.__pattern__, self.pyfile.url) - id = m.group('ID') - except AttributeError: - self.logDebug("Unable to get package id from url [%s]" % self.pyfile.url) - return - url = "http://netfolder.in/folder.php?folder_id=" + id - password = self.getPassword() - - # Submit package password - post = {'password': password, 'save': 'Absenden'} - self.logDebug("Submitting password [%s] for protected links with id [%s]" % (password, id)) - html = self.load(url, {}, post) - - # Check for invalid password - if '<div class="InPage_Error">' in html: - self.logDebug("Incorrect password, please set right password on Edit package form and retry") - return None - - return html - - - def getLinks(self): - links = re.search(r'name="list" value="(.*?)"', self.html).group(1).split(",") - self.logDebug("Package has %d links" % len(links)) - return links - - getInfo = create_getInfo(NetfolderIn) -- 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/crypter/C1NeonCom.py | 2 +- module/plugins/crypter/CryptItCom.py | 2 +- module/plugins/crypter/DdlstorageComFolder.py | 2 +- module/plugins/crypter/DuploadOrgFolder.py | 2 +- module/plugins/crypter/FilebeerInfoFolder.py | 2 +- module/plugins/crypter/FilesonicComFolder.py | 2 +- module/plugins/crypter/FiredriveComFolder.py | 2 +- module/plugins/crypter/HotfileComFolder.py | 2 +- module/plugins/crypter/ILoadTo.py | 2 +- module/plugins/crypter/LofCc.py | 2 +- module/plugins/crypter/MBLinkInfo.py | 2 +- module/plugins/crypter/MegauploadComFolder.py | 2 +- module/plugins/crypter/Movie2KTo.py | 2 +- module/plugins/crypter/MultiuploadCom.py | 2 +- module/plugins/crypter/OronComFolder.py | 2 +- module/plugins/crypter/RSLayerCom.py | 2 +- module/plugins/crypter/SecuredIn.py | 2 +- module/plugins/crypter/SharingmatrixComFolder.py | 2 +- module/plugins/crypter/SpeedLoadOrgFolder.py | 2 +- module/plugins/crypter/StealthTo.py | 2 +- module/plugins/crypter/TrailerzoneInfo.py | 2 +- module/plugins/crypter/WiiReloadedOrg.py | 2 +- module/plugins/crypter/WuploadComFolder.py | 2 +- 23 files changed, 23 insertions(+), 23 deletions(-) (limited to 'module/plugins/crypter') diff --git a/module/plugins/crypter/C1NeonCom.py b/module/plugins/crypter/C1NeonCom.py index 926633ff7..9b6093081 100644 --- a/module/plugins/crypter/C1NeonCom.py +++ b/module/plugins/crypter/C1NeonCom.py @@ -9,7 +9,7 @@ class C1NeonCom(DeadCrypter): __version__ = "0.05" __pattern__ = r'http://(?:www\.)?c1neon\.com/.+' - __config__ = [] + __config__ = [] #@TODO: Remove in 0.4.10 __description__ = """C1neon.com decrypter plugin""" __license__ = "GPLv3" diff --git a/module/plugins/crypter/CryptItCom.py b/module/plugins/crypter/CryptItCom.py index 2cf4e9f62..1c9e841b7 100644 --- a/module/plugins/crypter/CryptItCom.py +++ b/module/plugins/crypter/CryptItCom.py @@ -9,7 +9,7 @@ class CryptItCom(DeadCrypter): __version__ = "0.11" __pattern__ = r'http://(?:www\.)?crypt-it\.com/(s|e|d|c)/\w+' - __config__ = [] + __config__ = [] #@TODO: Remove in 0.4.10 __description__ = """Crypt-it.com decrypter plugin""" __license__ = "GPLv3" diff --git a/module/plugins/crypter/DdlstorageComFolder.py b/module/plugins/crypter/DdlstorageComFolder.py index e02e77fda..dc6ec1da5 100644 --- a/module/plugins/crypter/DdlstorageComFolder.py +++ b/module/plugins/crypter/DdlstorageComFolder.py @@ -9,7 +9,7 @@ class DdlstorageComFolder(DeadCrypter): __version__ = "0.03" __pattern__ = r'https?://(?:www\.)?ddlstorage\.com/folder/\w+' - __config__ = [] + __config__ = [] #@TODO: Remove in 0.4.10 __description__ = """DDLStorage.com folder decrypter plugin""" __license__ = "GPLv3" diff --git a/module/plugins/crypter/DuploadOrgFolder.py b/module/plugins/crypter/DuploadOrgFolder.py index 066fbe3d7..d505806b7 100644 --- a/module/plugins/crypter/DuploadOrgFolder.py +++ b/module/plugins/crypter/DuploadOrgFolder.py @@ -9,7 +9,7 @@ class DuploadOrgFolder(DeadCrypter): __version__ = "0.02" __pattern__ = r'http://(?:www\.)?dupload\.org/folder/\d+' - __config__ = [] + __config__ = [] #@TODO: Remove in 0.4.10 __description__ = """Dupload.org folder decrypter plugin""" __license__ = "GPLv3" diff --git a/module/plugins/crypter/FilebeerInfoFolder.py b/module/plugins/crypter/FilebeerInfoFolder.py index a3c7ee74c..5b401c555 100644 --- a/module/plugins/crypter/FilebeerInfoFolder.py +++ b/module/plugins/crypter/FilebeerInfoFolder.py @@ -9,7 +9,7 @@ class FilebeerInfoFolder(DeadCrypter): __version__ = "0.02" __pattern__ = r'http://(?:www\.)?filebeer\.info/\d*~f\w+' - __config__ = [] + __config__ = [] #@TODO: Remove in 0.4.10 __description__ = """Filebeer.info folder decrypter plugin""" __license__ = "GPLv3" diff --git a/module/plugins/crypter/FilesonicComFolder.py b/module/plugins/crypter/FilesonicComFolder.py index 8fc28d592..6cd4d8b8c 100644 --- a/module/plugins/crypter/FilesonicComFolder.py +++ b/module/plugins/crypter/FilesonicComFolder.py @@ -9,7 +9,7 @@ class FilesonicComFolder(DeadCrypter): __version__ = "0.12" __pattern__ = r'http://(?:www\.)?filesonic\.com/folder/\w+' - __config__ = [] + __config__ = [] #@TODO: Remove in 0.4.10 __description__ = """Filesonic.com folder decrypter plugin""" __license__ = "GPLv3" diff --git a/module/plugins/crypter/FiredriveComFolder.py b/module/plugins/crypter/FiredriveComFolder.py index 7d3a357fd..792f3198b 100644 --- a/module/plugins/crypter/FiredriveComFolder.py +++ b/module/plugins/crypter/FiredriveComFolder.py @@ -9,7 +9,7 @@ class FiredriveComFolder(DeadCrypter): __version__ = "0.03" __pattern__ = r'https?://(?:www\.)?(firedrive|putlocker)\.com/share/.+' - __config__ = [] + __config__ = [] #@TODO: Remove in 0.4.10 __description__ = """Firedrive.com folder decrypter plugin""" __license__ = "GPLv3" diff --git a/module/plugins/crypter/HotfileComFolder.py b/module/plugins/crypter/HotfileComFolder.py index 4f40587ad..f1dd56228 100644 --- a/module/plugins/crypter/HotfileComFolder.py +++ b/module/plugins/crypter/HotfileComFolder.py @@ -9,7 +9,7 @@ class HotfileComFolder(DeadCrypter): __version__ = "0.30" __pattern__ = r'https?://(?:www\.)?hotfile\.com/list/\w+/\w+' - __config__ = [] + __config__ = [] #@TODO: Remove in 0.4.10 __description__ = """Hotfile.com folder decrypter plugin""" __license__ = "GPLv3" diff --git a/module/plugins/crypter/ILoadTo.py b/module/plugins/crypter/ILoadTo.py index f3415706d..4c7387739 100644 --- a/module/plugins/crypter/ILoadTo.py +++ b/module/plugins/crypter/ILoadTo.py @@ -9,7 +9,7 @@ class ILoadTo(DeadCrypter): __version__ = "0.11" __pattern__ = r'http://(?:www\.)?iload\.to/go/\d+-[\w.-]+/' - __config__ = [] + __config__ = [] #@TODO: Remove in 0.4.10 __description__ = """Iload.to decrypter plugin""" __license__ = "GPLv3" diff --git a/module/plugins/crypter/LofCc.py b/module/plugins/crypter/LofCc.py index 3cac0fbf2..62e05f299 100644 --- a/module/plugins/crypter/LofCc.py +++ b/module/plugins/crypter/LofCc.py @@ -9,7 +9,7 @@ class LofCc(DeadCrypter): __version__ = "0.21" __pattern__ = r'http://(?:www\.)?lof\.cc/(.+)' - __config__ = [] + __config__ = [] #@TODO: Remove in 0.4.10 __description__ = """Lof.cc decrypter plugin""" __license__ = "GPLv3" diff --git a/module/plugins/crypter/MBLinkInfo.py b/module/plugins/crypter/MBLinkInfo.py index 82c2d9719..7ff400f7e 100644 --- a/module/plugins/crypter/MBLinkInfo.py +++ b/module/plugins/crypter/MBLinkInfo.py @@ -9,7 +9,7 @@ class MBLinkInfo(DeadCrypter): __version__ = "0.03" __pattern__ = r'http://(?:www\.)?mblink\.info/?\?id=(\d+)' - __config__ = [] + __config__ = [] #@TODO: Remove in 0.4.10 __description__ = """MBLink.info decrypter plugin""" __license__ = "GPLv3" diff --git a/module/plugins/crypter/MegauploadComFolder.py b/module/plugins/crypter/MegauploadComFolder.py index 1af9d556d..60e4af57e 100644 --- a/module/plugins/crypter/MegauploadComFolder.py +++ b/module/plugins/crypter/MegauploadComFolder.py @@ -9,7 +9,7 @@ class MegauploadComFolder(DeadCrypter): __version__ = "0.02" __pattern__ = r'http://(?:www\.)?megaupload\.com/(\?f|xml/folderfiles\.php\?.*&?folderid)=\w+' - __config__ = [] + __config__ = [] #@TODO: Remove in 0.4.10 __description__ = """Megaupload.com folder decrypter plugin""" __license__ = "GPLv3" diff --git a/module/plugins/crypter/Movie2KTo.py b/module/plugins/crypter/Movie2KTo.py index 76bf702ac..919d77c86 100644 --- a/module/plugins/crypter/Movie2KTo.py +++ b/module/plugins/crypter/Movie2KTo.py @@ -9,7 +9,7 @@ class Movie2KTo(DeadCrypter): __version__ = "0.51" __pattern__ = r'http://(?:www\.)?movie2k\.to/(.+)\.html' - __config__ = [] + __config__ = [] #@TODO: Remove in 0.4.10 __description__ = """Movie2k.to decrypter plugin""" __license__ = "GPLv3" diff --git a/module/plugins/crypter/MultiuploadCom.py b/module/plugins/crypter/MultiuploadCom.py index 347b7e5af..41794445a 100644 --- a/module/plugins/crypter/MultiuploadCom.py +++ b/module/plugins/crypter/MultiuploadCom.py @@ -9,7 +9,7 @@ class MultiuploadCom(DeadCrypter): __version__ = "0.02" __pattern__ = r'http://(?:www\.)?multiupload\.(com|nl)/\w+' - __config__ = [] + __config__ = [] #@TODO: Remove in 0.4.10 __description__ = """ MultiUpload.com decrypter plugin """ __license__ = "GPLv3" diff --git a/module/plugins/crypter/OronComFolder.py b/module/plugins/crypter/OronComFolder.py index 9e06bdf32..048af7d82 100644 --- a/module/plugins/crypter/OronComFolder.py +++ b/module/plugins/crypter/OronComFolder.py @@ -9,7 +9,7 @@ class OronComFolder(DeadCrypter): __version__ = "0.11" __pattern__ = r'http://(?:www\.)?oron\.com/folder/\w+' - __config__ = [] + __config__ = [] #@TODO: Remove in 0.4.10 __description__ = """Oron.com folder decrypter plugin""" __license__ = "GPLv3" diff --git a/module/plugins/crypter/RSLayerCom.py b/module/plugins/crypter/RSLayerCom.py index cc3b23bbc..6f078e9e4 100644 --- a/module/plugins/crypter/RSLayerCom.py +++ b/module/plugins/crypter/RSLayerCom.py @@ -9,7 +9,7 @@ class RSLayerCom(DeadCrypter): __version__ = "0.21" __pattern__ = r'http://(?:www\.)?rs-layer\.com/directory-' - __config__ = [] + __config__ = [] #@TODO: Remove in 0.4.10 __description__ = """RS-Layer.com decrypter plugin""" __license__ = "GPLv3" diff --git a/module/plugins/crypter/SecuredIn.py b/module/plugins/crypter/SecuredIn.py index cbfa919ac..a2eac4f13 100644 --- a/module/plugins/crypter/SecuredIn.py +++ b/module/plugins/crypter/SecuredIn.py @@ -9,7 +9,7 @@ class SecuredIn(DeadCrypter): __version__ = "0.21" __pattern__ = r'http://(?:www\.)?secured\.in/download-[\d]+-\w{8}\.html' - __config__ = [] + __config__ = [] #@TODO: Remove in 0.4.10 __description__ = """Secured.in decrypter plugin""" __license__ = "GPLv3" diff --git a/module/plugins/crypter/SharingmatrixComFolder.py b/module/plugins/crypter/SharingmatrixComFolder.py index 4448dd691..eb1b4d8a6 100644 --- a/module/plugins/crypter/SharingmatrixComFolder.py +++ b/module/plugins/crypter/SharingmatrixComFolder.py @@ -9,7 +9,7 @@ class SharingmatrixComFolder(DeadCrypter): __version__ = "0.01" __pattern__ = r'http://(?:www\.)?sharingmatrix\.com/folder/\w+' - __config__ = [] + __config__ = [] #@TODO: Remove in 0.4.10 __description__ = """Sharingmatrix.com folder decrypter plugin""" __license__ = "GPLv3" diff --git a/module/plugins/crypter/SpeedLoadOrgFolder.py b/module/plugins/crypter/SpeedLoadOrgFolder.py index ddde7dec2..af768ef7b 100644 --- a/module/plugins/crypter/SpeedLoadOrgFolder.py +++ b/module/plugins/crypter/SpeedLoadOrgFolder.py @@ -9,7 +9,7 @@ class SpeedLoadOrgFolder(DeadCrypter): __version__ = "0.30" __pattern__ = r'http://(?:www\.)?speedload\.org/(\d+~f$|folder/\d+/)' - __config__ = [] + __config__ = [] #@TODO: Remove in 0.4.10 __description__ = """Speedload decrypter plugin""" __license__ = "GPLv3" diff --git a/module/plugins/crypter/StealthTo.py b/module/plugins/crypter/StealthTo.py index 5173421f1..551468980 100644 --- a/module/plugins/crypter/StealthTo.py +++ b/module/plugins/crypter/StealthTo.py @@ -9,7 +9,7 @@ class StealthTo(DeadCrypter): __version__ = "0.20" __pattern__ = r'http://(?:www\.)?stealth\.to/folder/.+' - __config__ = [] + __config__ = [] #@TODO: Remove in 0.4.10 __description__ = """Stealth.to decrypter plugin""" __license__ = "GPLv3" diff --git a/module/plugins/crypter/TrailerzoneInfo.py b/module/plugins/crypter/TrailerzoneInfo.py index 10780dd45..6f1c90612 100644 --- a/module/plugins/crypter/TrailerzoneInfo.py +++ b/module/plugins/crypter/TrailerzoneInfo.py @@ -9,7 +9,7 @@ class TrailerzoneInfo(DeadCrypter): __version__ = "0.03" __pattern__ = r'http://(?:www\.)?trailerzone\.info/.+' - __config__ = [] + __config__ = [] #@TODO: Remove in 0.4.10 __description__ = """TrailerZone.info decrypter plugin""" __license__ = "GPLv3" diff --git a/module/plugins/crypter/WiiReloadedOrg.py b/module/plugins/crypter/WiiReloadedOrg.py index c3c5b8222..eddc0e5d1 100644 --- a/module/plugins/crypter/WiiReloadedOrg.py +++ b/module/plugins/crypter/WiiReloadedOrg.py @@ -9,7 +9,7 @@ class WiiReloadedOrg(DeadCrypter): __version__ = "0.11" __pattern__ = r'http://(?:www\.)?wii-reloaded\.org/protect/get\.php\?i=.+' - __config__ = [] + __config__ = [] #@TODO: Remove in 0.4.10 __description__ = """Wii-Reloaded.org decrypter plugin""" __license__ = "GPLv3" diff --git a/module/plugins/crypter/WuploadComFolder.py b/module/plugins/crypter/WuploadComFolder.py index c4171667e..dece467a2 100644 --- a/module/plugins/crypter/WuploadComFolder.py +++ b/module/plugins/crypter/WuploadComFolder.py @@ -9,7 +9,7 @@ class WuploadComFolder(DeadCrypter): __version__ = "0.01" __pattern__ = r'http://(?:www\.)?wupload\.com/folder/\w+' - __config__ = [] + __config__ = [] #@TODO: Remove in 0.4.10 __description__ = """Wupload.com folder decrypter plugin""" __license__ = "GPLv3" -- cgit v1.2.3 From 08252b978c699bae3493cf1bee4accc285fc30b5 Mon Sep 17 00:00:00 2001 From: Walter Purcaro <vuolter@users.noreply.github.com> Date: Fri, 29 May 2015 00:54:25 +0200 Subject: [GooGl] Update --- module/plugins/crypter/GooGl.py | 26 +++++++++++++------------- module/plugins/crypter/LinkSaveIn.py | 7 +++++-- 2 files changed, 18 insertions(+), 15 deletions(-) (limited to 'module/plugins/crypter') diff --git a/module/plugins/crypter/GooGl.py b/module/plugins/crypter/GooGl.py index b5f0c0447..4cea66d2a 100644 --- a/module/plugins/crypter/GooGl.py +++ b/module/plugins/crypter/GooGl.py @@ -1,32 +1,32 @@ # -*- coding: utf-8 -*- -from module.plugins.Crypter import Crypter +from module.plugins.internal.SimpleDereferer import SimpleDereferer, create_getInfo from module.common.json_layer import json_loads -class GooGl(Crypter): +class GooGl(SimpleDereferer): __name__ = "GooGl" __type__ = "crypter" - __version__ = "0.01" + __version__ = "0.02" - __pattern__ = r'https?://(?:www\.)?goo\.gl/\w+' - __config__ = [("use_subfolder" , "bool", "Save package to subfolder" , True), - ("subfolder_per_pack", "bool", "Create a subfolder for each package", True)] + __pattern__ = r'https?://(?:www\.)?goo\.gl/(\w+/)?\w+' __description__ = """Goo.gl decrypter plugin""" __license__ = "GPLv3" - __authors__ = [("stickell", "l.stickell@yahoo.it")] + __authors__ = [("stickell" , "l.stickell@yahoo.it"), + ("Walter Purcaro", "vuolter@gmail.com" )] API_URL = "https://www.googleapis.com/urlshortener/v1/url" + OFFLINE_PATTERN = r'has been disabled|does not exist' - def decrypt(self, pyfile): - rep = self.load(self.API_URL, get={'shortUrl': pyfile.url}) + + def getLink(self): + rep = self.load(self.API_URL, get={'shortUrl': self.pyfile.url}) self.logDebug("JSON data: " + rep) rep = json_loads(rep) + return rep['longUrl'] if "longUrl" in rep else None + - if 'longUrl' in rep: - self.urls = [rep['longUrl']] - else: - self.fail(_("Unable to expand shortened link")) +getInfo = create_getInfo(GooGl) diff --git a/module/plugins/crypter/LinkSaveIn.py b/module/plugins/crypter/LinkSaveIn.py index 040305bd9..95652096d 100644 --- a/module/plugins/crypter/LinkSaveIn.py +++ b/module/plugins/crypter/LinkSaveIn.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.SimpleDereferer import SimpleDereferer +from module.plugins.internal.SimpleDereferer import SimpleDereferer, create_getInfo class LinkSaveIn(SimpleDereferer): __name__ = "LinkSaveIn" __type__ = "crypter" - __version__ = "2.03" + __version__ = "2.04" __pattern__ = r'https?://(?:www\.)?linksave\.in/\w+' __config__ = [("use_subfolder" , "bool", "Save package to subfolder" , True), @@ -20,3 +20,6 @@ class LinkSaveIn(SimpleDereferer): COOKIES = [("linksave.in", "Linksave_Language", "english")] OFFLINE_PATTERN = r'>(Error )?404 -' + + +getInfo = create_getInfo(LinkSaveIn) -- cgit v1.2.3 From a51c92425e3b77b5a6b85babd29cc97411ee647c Mon Sep 17 00:00:00 2001 From: Walter Purcaro <vuolter@users.noreply.github.com> Date: Fri, 29 May 2015 01:53:28 +0200 Subject: [SimpleDereferer] Handle direct link --- module/plugins/crypter/GooGl.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/crypter') diff --git a/module/plugins/crypter/GooGl.py b/module/plugins/crypter/GooGl.py index 4cea66d2a..30e193b9d 100644 --- a/module/plugins/crypter/GooGl.py +++ b/module/plugins/crypter/GooGl.py @@ -9,7 +9,7 @@ class GooGl(SimpleDereferer): __type__ = "crypter" __version__ = "0.02" - __pattern__ = r'https?://(?:www\.)?goo\.gl/(\w+/)?\w+' + __pattern__ = r'https?://(?:www\.)?goo\.gl/([a-zA-Z]+/)?\w+' __description__ = """Goo.gl decrypter plugin""" __license__ = "GPLv3" -- cgit v1.2.3