diff options
author | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-10-18 18:55:20 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-10-18 18:55:20 +0200 |
commit | 54025794ebf707ba0c0f2840d5364b0b380d17a9 (patch) | |
tree | 5844b0cb987d4f62b8faf2e8984268793a2ed653 /module/plugins/crypter | |
parent | Update containers (diff) | |
download | pyload-54025794ebf707ba0c0f2840d5364b0b380d17a9.tar.xz |
Update crypters
Diffstat (limited to 'module/plugins/crypter')
57 files changed, 191 insertions, 104 deletions
diff --git a/module/plugins/crypter/BitshareComFolder.py b/module/plugins/crypter/BitshareComFolder.py index eb094dd2a..daa7c63c4 100644 --- a/module/plugins/crypter/BitshareComFolder.py +++ b/module/plugins/crypter/BitshareComFolder.py @@ -10,7 +10,7 @@ class BitshareComFolder(SimpleCrypter): __status__ = "testing" __pattern__ = r'http://(?:www\.)?bitshare\.com/\?d=\w+' - __config__ = [("activated", "bool", "Activated", True), + __config__ = [("activated" , "bool", "Activated" , True), ("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)] diff --git a/module/plugins/crypter/ChipDe.py b/module/plugins/crypter/ChipDe.py index 3b02ccef0..c48dd87ba 100644 --- a/module/plugins/crypter/ChipDe.py +++ b/module/plugins/crypter/ChipDe.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- import re -from module.plugins.internal.Crypter import Crypter + +from module.plugins.internal.Crypter import Crypter, create_getInfo class ChipDe(Crypter): @@ -11,7 +12,7 @@ class ChipDe(Crypter): __status__ = "testing" __pattern__ = r'http://(?:www\.)?chip\.de/video/.+\.html' - __config__ = [("activated", "bool", "Activated", True), + __config__ = [("activated" , "bool", "Activated" , True), ("use_subfolder" , "bool", "Save package to subfolder" , True), ("subfolder_per_pack", "bool", "Create a subfolder for each package", True)] @@ -31,3 +32,6 @@ class ChipDe(Crypter): else: self.urls = [f.group(1)] self.log_debug("The file URL is %s" % self.urls[0]) + + +getInfo = create_getInfo(ChipDe) diff --git a/module/plugins/crypter/CrockoComFolder.py b/module/plugins/crypter/CrockoComFolder.py index 6bcef85d1..4bda4fca3 100644 --- a/module/plugins/crypter/CrockoComFolder.py +++ b/module/plugins/crypter/CrockoComFolder.py @@ -10,7 +10,7 @@ class CrockoComFolder(SimpleCrypter): __status__ = "testing" __pattern__ = r'http://(?:www\.)?crocko\.com/f/.+' - __config__ = [("activated", "bool", "Activated", True), + __config__ = [("activated" , "bool", "Activated" , True), ("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)] diff --git a/module/plugins/crypter/CzshareComFolder.py b/module/plugins/crypter/CzshareComFolder.py index d39f7d2a2..e671afd14 100644 --- a/module/plugins/crypter/CzshareComFolder.py +++ b/module/plugins/crypter/CzshareComFolder.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- import re -from module.plugins.internal.Crypter import Crypter + +from module.plugins.internal.Crypter import Crypter, create_getInfo class CzshareComFolder(Crypter): @@ -11,7 +12,7 @@ class CzshareComFolder(Crypter): __status__ = "testing" __pattern__ = r'http://(?:www\.)?(czshare|sdilej)\.(com|cz)/folders/.+' - __config__ = [("activated", "bool", "Activated", True), + __config__ = [("activated" , "bool", "Activated" , True), ("use_subfolder" , "bool", "Save package to subfolder" , True), ("subfolder_per_pack", "bool", "Create a subfolder for each package", True)] @@ -32,3 +33,6 @@ class CzshareComFolder(Crypter): self.error(_("FOLDER_PATTERN not found")) self.urls.extend(re.findall(self.LINK_PATTERN, m.group(1))) + + +getInfo = create_getInfo(CzshareComFolder) diff --git a/module/plugins/crypter/DailymotionComFolder.py b/module/plugins/crypter/DailymotionComFolder.py index 0abc720f1..de09285d7 100644 --- a/module/plugins/crypter/DailymotionComFolder.py +++ b/module/plugins/crypter/DailymotionComFolder.py @@ -3,9 +3,8 @@ import re import urlparse -from module.common.json_layer import json_loads -from module.plugins.internal.Crypter import Crypter -from module.utils import save_join as fs_join +from module.plugins.internal.Crypter import Crypter, create_getInfo +from module.plugins.internal.utils import fs_join, json class DailymotionComFolder(Crypter): @@ -15,7 +14,7 @@ class DailymotionComFolder(Crypter): __status__ = "testing" __pattern__ = r'https?://(?:www\.)?dailymotion\.com/((playlists/)?(?P<TYPE>playlist|user)/)?(?P<ID>[\w^_]+)(?(TYPE)|#)' - __config__ = [("activated", "bool", "Activated", True), + __config__ = [("activated" , "bool", "Activated" , True), ("use_subfolder" , "bool", "Save package to subfolder" , True), ("subfolder_per_pack", "bool", "Create a subfolder for each package", True)] @@ -27,7 +26,7 @@ class DailymotionComFolder(Crypter): def api_response(self, ref, data=None): url = urlparse.urljoin("https://api.dailymotion.com/", ref) html = self.load(url, get=data) - return json_loads(html) + return json.loads(html) def get_playlist_info(self, id): @@ -104,3 +103,6 @@ class DailymotionComFolder(Crypter): p_folder = fs_join(self.pyload.config.get("general", "download_folder"), p_owner, p_name) self.log_debug("%s video\s found on playlist \"%s\"" % (len(p_videos), p_name)) self.packages.append((p_name, p_videos, p_folder)) #@NOTE: Folder is NOT recognized by pyload 0.4.9! + + +getInfo = create_getInfo(DailymotionComFolder) diff --git a/module/plugins/crypter/DataHuFolder.py b/module/plugins/crypter/DataHuFolder.py index 1a961111d..64ac98006 100644 --- a/module/plugins/crypter/DataHuFolder.py +++ b/module/plugins/crypter/DataHuFolder.py @@ -12,7 +12,7 @@ class DataHuFolder(SimpleCrypter): __status__ = "testing" __pattern__ = r'http://(?:www\.)?data\.hu/dir/\w+' - __config__ = [("activated", "bool", "Activated", True), + __config__ = [("activated" , "bool", "Activated" , True), ("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)] diff --git a/module/plugins/crypter/DepositfilesComFolder.py b/module/plugins/crypter/DepositfilesComFolder.py index 70b397db3..91a133258 100644 --- a/module/plugins/crypter/DepositfilesComFolder.py +++ b/module/plugins/crypter/DepositfilesComFolder.py @@ -10,7 +10,7 @@ class DepositfilesComFolder(SimpleCrypter): __status__ = "testing" __pattern__ = r'http://(?:www\.)?depositfiles\.com/folders/\w+' - __config__ = [("activated", "bool", "Activated", True), + __config__ = [("activated" , "bool", "Activated" , True), ("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)] diff --git a/module/plugins/crypter/Dereferer.py b/module/plugins/crypter/Dereferer.py index 6ce2e7248..46319faf8 100644 --- a/module/plugins/crypter/Dereferer.py +++ b/module/plugins/crypter/Dereferer.py @@ -12,7 +12,7 @@ class Dereferer(SimpleCrypter): __status__ = "testing" __pattern__ = r'https?://(?:www\.)?(?:\w+\.)*?(?P<DOMAIN>(?:[\d.]+|[\w\-]{3,}(?:\.[a-zA-Z]{2,}){1,2})(?:\:\d+)?)/.*?(?P<LINK>(?:ht|f)tps?://.+)' - __config__ = [("activated", "bool", "Activated", True), + __config__ = [("activated" , "bool", "Activated" , True), ("use_subfolder" , "bool", "Save package to subfolder" , True), ("subfolder_per_pack", "bool", "Create a subfolder for each package", True)] diff --git a/module/plugins/crypter/DevhostStFolder.py b/module/plugins/crypter/DevhostStFolder.py index 92a50f580..b2934c50f 100644 --- a/module/plugins/crypter/DevhostStFolder.py +++ b/module/plugins/crypter/DevhostStFolder.py @@ -16,7 +16,7 @@ class DevhostStFolder(SimpleCrypter): __status__ = "testing" __pattern__ = r'http://(?:www\.)?d-h\.st/users/(?P<USER>\w+)(/\?fld_id=(?P<ID>\d+))?' - __config__ = [("activated", "bool", "Activated", True), + __config__ = [("activated" , "bool", "Activated" , True), ("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)] diff --git a/module/plugins/crypter/DlProtectCom.py b/module/plugins/crypter/DlProtectCom.py index 760cbfaa6..82fc2dbff 100644 --- a/module/plugins/crypter/DlProtectCom.py +++ b/module/plugins/crypter/DlProtectCom.py @@ -15,7 +15,7 @@ class DlProtectCom(SimpleCrypter): __status__ = "testing" __pattern__ = r'https?://(?:www\.)?dl-protect\.com/((en|fr)/)?\w+' - __config__ = [("activated", "bool", "Activated", True), + __config__ = [("activated" , "bool", "Activated" , True), ("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)] diff --git a/module/plugins/crypter/DuckCryptInfo.py b/module/plugins/crypter/DuckCryptInfo.py index eae58d60c..2548c3fbc 100644 --- a/module/plugins/crypter/DuckCryptInfo.py +++ b/module/plugins/crypter/DuckCryptInfo.py @@ -4,7 +4,7 @@ import re import BeautifulSoup -from module.plugins.internal.Crypter import Crypter +from module.plugins.internal.Crypter import Crypter, create_getInfo class DuckCryptInfo(Crypter): @@ -14,7 +14,7 @@ class DuckCryptInfo(Crypter): __status__ = "testing" __pattern__ = r'http://(?:www\.)?duckcrypt\.info/(folder|wait|link)/(\w+)/?(\w*)' - __config__ = [("activated", "bool", "Activated", True), + __config__ = [("activated" , "bool", "Activated" , True), ("use_subfolder" , "bool", "Save package to subfolder" , True), ("subfolder_per_pack", "bool", "Create a subfolder for each package", True)] @@ -41,11 +41,11 @@ class DuckCryptInfo(Crypter): def handle_folder(self, m): html = self.load("http://duckcrypt.info/ajax/auth.php?hash=" + str(m.group(2))) m = re.match(self.__pattern__, html) - self.log_debug("Redirectet to " + str(m.group(0))) + self.log_debug("Redirect to " + m.group(0)) html = self.load(str(m.group(0))) soup = BeautifulSoup.BeautifulSoup(html) cryptlinks = soup.findAll("div", attrs={'class': "folderbox"}) - self.log_debug("Redirectet to " + str(cryptlinks)) + self.log_debug("Redirect to " + cryptlinks) if not cryptlinks: self.error(_("No link found")) for clink in cryptlinks: @@ -59,3 +59,6 @@ class DuckCryptInfo(Crypter): self.urls = [soup.find("iframe")['src']] if not self.urls: self.log_info(_("No link found")) + + +getInfo = create_getInfo(DuckCryptInfo) diff --git a/module/plugins/crypter/EasybytezComFolder.py b/module/plugins/crypter/EasybytezComFolder.py index bbeef30bc..adb5ee69d 100644 --- a/module/plugins/crypter/EasybytezComFolder.py +++ b/module/plugins/crypter/EasybytezComFolder.py @@ -10,7 +10,7 @@ class EasybytezComFolder(XFSCrypter): __status__ = "testing" __pattern__ = r'http://(?:www\.)?easybytez\.com/users/\d+/\d+' - __config__ = [("activated", "bool", "Activated", True), + __config__ = [("activated" , "bool", "Activated" , True), ("use_subfolder" , "bool", "Save package to subfolder" , True), ("subfolder_per_pack", "bool", "Create a subfolder for each package", True)] diff --git a/module/plugins/crypter/EmbeduploadCom.py b/module/plugins/crypter/EmbeduploadCom.py index 96eb92f7e..4a32d7c8d 100644 --- a/module/plugins/crypter/EmbeduploadCom.py +++ b/module/plugins/crypter/EmbeduploadCom.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- import re -from module.plugins.internal.Crypter import Crypter + +from module.plugins.internal.Crypter import Crypter, create_getInfo from module.network.HTTPRequest import BadHeader @@ -12,7 +13,7 @@ class EmbeduploadCom(Crypter): __status__ = "testing" __pattern__ = r'http://(?:www\.)?embedupload\.com/\?d=.+' - __config__ = [("activated", "bool", "Activated", True), + __config__ = [("activated" , "bool", "Activated" , True), ("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"), @@ -60,3 +61,6 @@ class EmbeduploadCom(Crypter): except BadHeader: pass return new_links + + +getInfo = create_getInfo(EmbeduploadCom) diff --git a/module/plugins/crypter/FilecloudIoFolder.py b/module/plugins/crypter/FilecloudIoFolder.py index 63f6ad677..e40f05686 100644 --- a/module/plugins/crypter/FilecloudIoFolder.py +++ b/module/plugins/crypter/FilecloudIoFolder.py @@ -10,7 +10,7 @@ class FilecloudIoFolder(SimpleCrypter): __status__ = "testing" __pattern__ = r'https?://(?:www\.)?(filecloud\.io|ifile\.it)/_\w+' - __config__ = [("activated", "bool", "Activated", True), + __config__ = [("activated" , "bool", "Activated" , True), ("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)] diff --git a/module/plugins/crypter/FilecryptCc.py b/module/plugins/crypter/FilecryptCc.py index a516392f1..8e6772e7d 100644 --- a/module/plugins/crypter/FilecryptCc.py +++ b/module/plugins/crypter/FilecryptCc.py @@ -9,7 +9,7 @@ import urlparse from Crypto.Cipher import AES -from module.plugins.internal.Crypter import Crypter +from module.plugins.internal.Crypter import Crypter, create_getInfo from module.plugins.captcha.ReCaptcha import ReCaptcha from module.plugins.captcha.SolveMedia import SolveMedia @@ -210,3 +210,6 @@ class FilecryptCc(Crypter): links = filter(bool, text.split('\n')) return links + + +getInfo = create_getInfo(FilecryptCc) diff --git a/module/plugins/crypter/FilefactoryComFolder.py b/module/plugins/crypter/FilefactoryComFolder.py index 2d3634a1f..8e899e2db 100644 --- a/module/plugins/crypter/FilefactoryComFolder.py +++ b/module/plugins/crypter/FilefactoryComFolder.py @@ -10,7 +10,7 @@ class FilefactoryComFolder(SimpleCrypter): __status__ = "testing" __pattern__ = r'https?://(?:www\.)?filefactory\.com/(?:f|folder)/\w+' - __config__ = [("activated", "bool", "Activated", True), + __config__ = [("activated" , "bool", "Activated" , True), ("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)] diff --git a/module/plugins/crypter/FilerNetFolder.py b/module/plugins/crypter/FilerNetFolder.py index 5a79b17e3..f1beadb3a 100644 --- a/module/plugins/crypter/FilerNetFolder.py +++ b/module/plugins/crypter/FilerNetFolder.py @@ -10,7 +10,7 @@ class FilerNetFolder(SimpleCrypter): __status__ = "testing" __pattern__ = r'https?://filer\.net/folder/\w{16}' - __config__ = [("activated", "bool", "Activated", True), + __config__ = [("activated" , "bool", "Activated" , True), ("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)] diff --git a/module/plugins/crypter/FileserveComFolder.py b/module/plugins/crypter/FileserveComFolder.py index af01338cb..b799ded78 100644 --- a/module/plugins/crypter/FileserveComFolder.py +++ b/module/plugins/crypter/FileserveComFolder.py @@ -2,7 +2,7 @@ import re -from module.plugins.internal.Crypter import Crypter +from module.plugins.internal.Crypter import Crypter, create_getInfo class FileserveComFolder(Crypter): @@ -12,7 +12,7 @@ class FileserveComFolder(Crypter): __status__ = "testing" __pattern__ = r'http://(?:www\.)?fileserve\.com/list/\w+' - __config__ = [("activated", "bool", "Activated", True), + __config__ = [("activated" , "bool", "Activated" , True), ("use_subfolder" , "bool", "Save package to subfolder" , True), ("subfolder_per_pack", "bool", "Create a subfolder for each package", True)] @@ -38,3 +38,6 @@ class FileserveComFolder(Crypter): if new_links: self.urls = [map(lambda s: "http://fileserve.com%s" % s, new_links)] + + +getInfo = create_getInfo(FileserveComFolder) diff --git a/module/plugins/crypter/FilestubeCom.py b/module/plugins/crypter/FilestubeCom.py index c65296e8b..ac1ace568 100644 --- a/module/plugins/crypter/FilestubeCom.py +++ b/module/plugins/crypter/FilestubeCom.py @@ -10,7 +10,7 @@ class FilestubeCom(SimpleCrypter): __status__ = "testing" __pattern__ = r'http://(?:www\.)?filestube\.(?:com|to)/\w+' - __config__ = [("activated", "bool", "Activated", True), + __config__ = [("activated" , "bool", "Activated" , True), ("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)] diff --git a/module/plugins/crypter/FiletramCom.py b/module/plugins/crypter/FiletramCom.py index 18960f605..52d736656 100644 --- a/module/plugins/crypter/FiletramCom.py +++ b/module/plugins/crypter/FiletramCom.py @@ -10,7 +10,7 @@ class FiletramCom(SimpleCrypter): __status__ = "testing" __pattern__ = r'http://(?:www\.)?filetram\.com/[^/]+/.+' - __config__ = [("activated", "bool", "Activated", True), + __config__ = [("activated" , "bool", "Activated" , True), ("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)] diff --git a/module/plugins/crypter/FourChanOrg.py b/module/plugins/crypter/FourChanOrg.py index 519fb75c4..312f6ae18 100644 --- a/module/plugins/crypter/FourChanOrg.py +++ b/module/plugins/crypter/FourChanOrg.py @@ -5,7 +5,7 @@ import re import urlparse -from module.plugins.internal.Crypter import Crypter +from module.plugins.internal.Crypter import Crypter, create_getInfo class FourChanOrg(Crypter): @@ -15,7 +15,7 @@ class FourChanOrg(Crypter): __status__ = "testing" __pattern__ = r'http://(?:www\.)?boards\.4chan\.org/\w+/res/(\d+)' - __config__ = [("activated", "bool", "Activated", True), + __config__ = [("activated" , "bool", "Activated" , True), ("use_subfolder" , "bool", "Save package to subfolder" , True), ("subfolder_per_pack", "bool", "Create a subfolder for each package", True)] @@ -28,3 +28,6 @@ class FourChanOrg(Crypter): pagehtml = self.load(pyfile.url) images = set(re.findall(r'(images\.4chan\.org/[^/]*/src/[^"<]+)', pagehtml)) self.urls = [urlparse.urljoin("http://", image) for image in images] + + +getInfo = create_getInfo(FourChanOrg) diff --git a/module/plugins/crypter/FreakhareComFolder.py b/module/plugins/crypter/FreakhareComFolder.py index 1f78470e2..7fdb3ad31 100644 --- a/module/plugins/crypter/FreakhareComFolder.py +++ b/module/plugins/crypter/FreakhareComFolder.py @@ -12,7 +12,7 @@ class FreakhareComFolder(SimpleCrypter): __status__ = "testing" __pattern__ = r'http://(?:www\.)?freakshare\.com/folder/.+' - __config__ = [("activated", "bool", "Activated", True), + __config__ = [("activated" , "bool", "Activated" , True), ("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)] diff --git a/module/plugins/crypter/FreetexthostCom.py b/module/plugins/crypter/FreetexthostCom.py index 246d9ede9..cfedc52c3 100644 --- a/module/plugins/crypter/FreetexthostCom.py +++ b/module/plugins/crypter/FreetexthostCom.py @@ -12,7 +12,7 @@ class FreetexthostCom(SimpleCrypter): __status__ = "testing" __pattern__ = r'http://(?:www\.)?freetexthost\.com/\w+' - __config__ = [("activated", "bool", "Activated", True), + __config__ = [("activated" , "bool", "Activated" , True), ("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)] diff --git a/module/plugins/crypter/FshareVnFolder.py b/module/plugins/crypter/FshareVnFolder.py index 3b947a057..1008d65f3 100644 --- a/module/plugins/crypter/FshareVnFolder.py +++ b/module/plugins/crypter/FshareVnFolder.py @@ -10,7 +10,7 @@ class FshareVnFolder(SimpleCrypter): __status__ = "testing" __pattern__ = r'http://(?:www\.)?fshare\.vn/folder/.+' - __config__ = [("activated", "bool", "Activated", True), + __config__ = [("activated" , "bool", "Activated" , True), ("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)] diff --git a/module/plugins/crypter/Go4UpCom.py b/module/plugins/crypter/Go4UpCom.py index 6aed6ffba..04f4e8e22 100755 --- a/module/plugins/crypter/Go4UpCom.py +++ b/module/plugins/crypter/Go4UpCom.py @@ -4,7 +4,7 @@ import re import urlparse from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo -import json +from module.plugins.internal.utils import json class Go4UpCom(SimpleCrypter): @@ -14,7 +14,7 @@ class Go4UpCom(SimpleCrypter): __status__ = "testing" __pattern__ = r'http://go4up\.com/(dl/\w{12}|rd/\w{12}/\d+)' - __config__ = [("activated", "bool", "Activated", True), + __config__ = [("activated" , "bool", "Activated" , True), ("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), diff --git a/module/plugins/crypter/GooGl.py b/module/plugins/crypter/GooGl.py index cbe44a5b3..b52055e07 100644 --- a/module/plugins/crypter/GooGl.py +++ b/module/plugins/crypter/GooGl.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo -from module.common.json_layer import json_loads +from module.plugins.internal.utils import json class GooGl(SimpleCrypter): @@ -27,7 +27,7 @@ class GooGl(SimpleCrypter): def get_links(self): rep = self.load(self.API_URL, get={'shortUrl': self.pyfile.url}) self.log_debug("JSON data: " + rep) - rep = json_loads(rep) + rep = json.loads(rep) return [rep['longUrl']] if "longUrl" in rep else None diff --git a/module/plugins/crypter/GoogledriveComFolder.py b/module/plugins/crypter/GoogledriveComFolder.py index 2a687937e..5c9b6de28 100644 --- a/module/plugins/crypter/GoogledriveComFolder.py +++ b/module/plugins/crypter/GoogledriveComFolder.py @@ -10,7 +10,7 @@ class GoogledriveComFolder(SimpleCrypter): __status__ = "testing" __pattern__ = r'https?://(?:www\.)?drive\.google\.com/folderview\?.*id=\w+' - __config__ = [("activated", "bool", "Activated", True), + __config__ = [("activated" , "bool", "Activated" , True), ("use_subfolder" , "bool", "Save package to subfolder" , True), ("subfolder_per_pack", "bool", "Create a subfolder for each package", True)] diff --git a/module/plugins/crypter/HoerbuchIn.py b/module/plugins/crypter/HoerbuchIn.py index f99b66f40..db3d18fda 100644 --- a/module/plugins/crypter/HoerbuchIn.py +++ b/module/plugins/crypter/HoerbuchIn.py @@ -4,7 +4,7 @@ import re import BeautifulSoup -from module.plugins.internal.Crypter import Crypter +from module.plugins.internal.Crypter import Crypter, create_getInfo class HoerbuchIn(Crypter): @@ -14,7 +14,7 @@ class HoerbuchIn(Crypter): __status__ = "testing" __pattern__ = r'http://(?:www\.)?hoerbuch\.in/(wp/horbucher/\d+/.+/|tp/out\.php\?.+|protection/folder_\d+\.html)' - __config__ = [("activated", "bool", "Activated", True), + __config__ = [("activated" , "bool", "Activated" , True), ("use_subfolder" , "bool", "Save package to subfolder" , True), ("subfolder_per_pack", "bool", "Create a subfolder for each package", True)] @@ -62,3 +62,6 @@ class HoerbuchIn(Crypter): links.append(self.req.lastEffectiveURL) return links + + +getInfo = create_getInfo(HoerbuchIn) diff --git a/module/plugins/crypter/ImgurComAlbum.py b/module/plugins/crypter/ImgurComAlbum.py index 6ae70df79..e6bcacf45 100644 --- a/module/plugins/crypter/ImgurComAlbum.py +++ b/module/plugins/crypter/ImgurComAlbum.py @@ -1,7 +1,7 @@ import re from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo -from module.utils import uniqify +from module.plugins.internal.utils import uniqify class ImgurComAlbum(SimpleCrypter): @@ -11,7 +11,7 @@ class ImgurComAlbum(SimpleCrypter): __status__ = "testing" __pattern__ = r'https?://(?:www\.|m\.)?imgur\.com/(a|gallery|)/?\w{5,7}' - __config__ = [("activated", "bool", "Activated", True), + __config__ = [("activated" , "bool", "Activated" , True), ("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)] diff --git a/module/plugins/crypter/LetitbitNetFolder.py b/module/plugins/crypter/LetitbitNetFolder.py index 82e3a818f..e03daa071 100644 --- a/module/plugins/crypter/LetitbitNetFolder.py +++ b/module/plugins/crypter/LetitbitNetFolder.py @@ -1,17 +1,18 @@ # -*- coding: utf-8 -*- import re -from module.plugins.internal.Crypter import Crypter +from module.plugins.internal.Crypter import Crypter, create_getInfo -class LetitbitNetFolder(Crypter): + +class LinkCryptWs(Crypter): __name__ = "LetitbitNet" __type__ = "crypter" __version__ = "0.12" __status__ = "testing" __pattern__ = r'http://(?:www\.)?letitbit\.net/folder/\w+' - __config__ = [("activated", "bool", "Activated", True), + __config__ = [("activated" , "bool", "Activated" , True), ("use_subfolder" , "bool", "Save package to subfolder" , True), ("subfolder_per_pack", "bool", "Create a subfolder for each package", True)] @@ -33,3 +34,6 @@ class LetitbitNetFolder(Crypter): self.error(_("FOLDER_PATTERN not found")) self.urls.extend(re.findall(self.LINK_PATTERN, folder.group(0))) + + +getInfo = create_getInfo(LinkCryptWs) diff --git a/module/plugins/crypter/LinkCryptWs.py b/module/plugins/crypter/LinkCryptWs.py index 4f3cceebb..3c08cee6a 100644 --- a/module/plugins/crypter/LinkCryptWs.py +++ b/module/plugins/crypter/LinkCryptWs.py @@ -7,8 +7,8 @@ import pycurl from Crypto.Cipher import AES -from module.plugins.internal.Crypter import Crypter -from module.utils import html_unescape +from module.plugins.internal.Crypter import Crypter, create_getInfo +from module.plugins.internal.utils import html_unescape class LinkCryptWs(Crypter): @@ -316,3 +316,6 @@ class LinkCryptWs(Crypter): self.log_debug("Package has %d links" % len(links)) return links + + +getInfo = create_getInfo(LinkCryptWs) diff --git a/module/plugins/crypter/LinkSaveIn.py b/module/plugins/crypter/LinkSaveIn.py index e4701a62a..d95e0feef 100644 --- a/module/plugins/crypter/LinkSaveIn.py +++ b/module/plugins/crypter/LinkSaveIn.py @@ -10,7 +10,7 @@ class LinkSaveIn(SimpleCrypter): __status__ = "testing" __pattern__ = r'https?://(?:www\.)?linksave\.in/\w+' - __config__ = [("activated", "bool", "Activated", True), + __config__ = [("activated" , "bool", "Activated" , True), ("use_subfolder" , "bool", "Save package to subfolder" , True), ("subfolder_per_pack", "bool", "Create a subfolder for each package", True)] diff --git a/module/plugins/crypter/LinkdecrypterCom.py b/module/plugins/crypter/LinkdecrypterCom.py index 999adcc79..917185b85 100644 --- a/module/plugins/crypter/LinkdecrypterCom.py +++ b/module/plugins/crypter/LinkdecrypterCom.py @@ -12,7 +12,7 @@ class LinkdecrypterCom(MultiCrypter): __status__ = "testing" __pattern__ = r'^unmatchable$' - __config__ = [("activated", "bool", "Activated", True), + __config__ = [("activated" , "bool", "Activated" , True), ("use_subfolder" , "bool", "Save package to subfolder" , True), ("subfolder_per_pack", "bool", "Create a subfolder for each package", True)] diff --git a/module/plugins/crypter/LixIn.py b/module/plugins/crypter/LixIn.py index 853240b44..8549017c4 100644 --- a/module/plugins/crypter/LixIn.py +++ b/module/plugins/crypter/LixIn.py @@ -3,7 +3,7 @@ import re import urlparse -from module.plugins.internal.Crypter import Crypter +from module.plugins.internal.Crypter import Crypter, create_getInfo class LixIn(Crypter): @@ -13,7 +13,7 @@ class LixIn(Crypter): __status__ = "testing" __pattern__ = r'http://(?:www\.)?lix\.in/(?P<ID>.+)' - __config__ = [("activated", "bool", "Activated", True), + __config__ = [("activated" , "bool", "Activated" , True), ("use_subfolder" , "bool", "Save package to subfolder" , True), ("subfolder_per_pack", "bool", "Create a subfolder for each package", True)] @@ -60,3 +60,6 @@ class LixIn(Crypter): else: self.urls = [m.group(1)] self.log_debug("Found link %s, adding to package" % self.urls[0]) + + +getInfo = create_getInfo(LixIn) diff --git a/module/plugins/crypter/MediafireComFolder.py b/module/plugins/crypter/MediafireComFolder.py index 4ef330a3f..d9caf743d 100644 --- a/module/plugins/crypter/MediafireComFolder.py +++ b/module/plugins/crypter/MediafireComFolder.py @@ -1,9 +1,10 @@ # -*- coding: utf-8 -*- import re -from module.plugins.internal.Crypter import Crypter + +from module.plugins.internal.Crypter import Crypter, create_getInfo from module.plugins.hoster.MediafireCom import checkHTMLHeader -from module.common.json_layer import json_loads +from module.plugins.internal.utils import json class MediafireComFolder(Crypter): @@ -13,7 +14,7 @@ class MediafireComFolder(Crypter): __status__ = "testing" __pattern__ = r'http://(?:www\.)?mediafire\.com/(folder/|\?sharekey=|\?\w{13}($|[/#]))' - __config__ = [("activated", "bool", "Activated", True), + __config__ = [("activated" , "bool", "Activated" , True), ("use_subfolder" , "bool", "Save package to subfolder" , True), ("subfolder_per_pack", "bool", "Create a subfolder for each package", True)] @@ -44,7 +45,7 @@ class MediafireComFolder(Crypter): folder_key = m.group(1) self.log_debug("FOLDER KEY: %s" % folder_key) - json_resp = json_loads(self.load("http://www.mediafire.com/api/folder/get_info.php", + json_resp = json.loads(self.load("http://www.mediafire.com/api/folder/get_info.php", get={'folder_key' : folder_key, 'response_format': "json", 'version' : 1})) @@ -58,3 +59,6 @@ class MediafireComFolder(Crypter): self.offline() else: self.urls.append(url) + + +getInfo = create_getInfo(MediafireComFolder) diff --git a/module/plugins/crypter/MegaRapidCzFolder.py b/module/plugins/crypter/MegaRapidCzFolder.py index d7e79db34..4af7a0515 100644 --- a/module/plugins/crypter/MegaRapidCzFolder.py +++ b/module/plugins/crypter/MegaRapidCzFolder.py @@ -10,7 +10,7 @@ class MegaRapidCzFolder(SimpleCrypter): __status__ = "testing" __pattern__ = r'http://(?:www\.)?(share|mega)rapid\.cz/slozka/\d+/\w+' - __config__ = [("activated", "bool", "Activated", True), + __config__ = [("activated" , "bool", "Activated" , True), ("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)] diff --git a/module/plugins/crypter/MultiUpOrg.py b/module/plugins/crypter/MultiUpOrg.py index 8c512da28..f56c64f56 100644 --- a/module/plugins/crypter/MultiUpOrg.py +++ b/module/plugins/crypter/MultiUpOrg.py @@ -13,7 +13,7 @@ class MultiUpOrg(SimpleCrypter): __status__ = "testing" __pattern__ = r'http://(?:www\.)?multiup\.org/(en|fr)/(?P<TYPE>project|download|mirror)/\w+(/\w+)?' - __config__ = [("activated", "bool", "Activated", True), + __config__ = [("activated" , "bool", "Activated" , True), ("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)] diff --git a/module/plugins/crypter/MultiloadCz.py b/module/plugins/crypter/MultiloadCz.py index 034fdec0c..4fce68c0e 100644 --- a/module/plugins/crypter/MultiloadCz.py +++ b/module/plugins/crypter/MultiloadCz.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- import re -from module.plugins.internal.Crypter import Crypter + +from module.plugins.internal.Crypter import Crypter, create_getInfo class MultiloadCz(Crypter): @@ -11,7 +12,7 @@ class MultiloadCz(Crypter): __status__ = "testing" __pattern__ = r'http://(?:[^/]*\.)?multiload\.cz/(stahnout|slozka)/.+' - __config__ = [("activated", "bool", "Activated", True), + __config__ = [("activated" , "bool", "Activated" , True), ("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)", "" ), @@ -42,3 +43,6 @@ class MultiloadCz(Crypter): if not self.urls: ignored_set = set(self.get_config('ignoredHoster').split('|')) self.urls.extend(x[1] for x in m if x[0] not in ignored_set) + + +getInfo = create_getInfo(MultiloadCz) diff --git a/module/plugins/crypter/NCryptIn.py b/module/plugins/crypter/NCryptIn.py index fe26aec52..977ab7ba0 100644 --- a/module/plugins/crypter/NCryptIn.py +++ b/module/plugins/crypter/NCryptIn.py @@ -5,7 +5,7 @@ import re from Crypto.Cipher import AES -from module.plugins.internal.Crypter import Crypter +from module.plugins.internal.Crypter import Crypter, create_getInfo from module.plugins.captcha.ReCaptcha import ReCaptcha @@ -16,7 +16,7 @@ class NCryptIn(Crypter): __status__ = "testing" __pattern__ = r'http://(?:www\.)?ncrypt\.in/(?P<TYPE>folder|link|frame)-([^/\?]+)' - __config__ = [("activated", "bool", "Activated", True), + __config__ = [("activated" , "bool", "Activated" , True), ("use_subfolder" , "bool", "Save package to subfolder" , True), ("subfolder_per_pack", "bool", "Create a subfolder for each package", True)] @@ -166,7 +166,7 @@ class NCryptIn(Crypter): self.log_debug("CircleCaptcha protected") captcha_img_url = "http://ncrypt.in/classes/captcha/circlecaptcha.php" coords = self.captcha.decrypt(captcha_img_url, input_type="png", output_type='positional', ocr="CircleCaptcha") - self.log_debug("Captcha resolved, coords [%s]" % str(coords)) + self.log_debug("Captcha resolved, coords %s" % coords) postData['circle.x'] = coords[0] postData['circle.y'] = coords[1] @@ -310,3 +310,6 @@ class NCryptIn(Crypter): #: Log and return self.log_debug("Block has %d links" % len(links)) return links + + +getInfo = create_getInfo(NCryptIn) diff --git a/module/plugins/crypter/NitroflareComFolder.py b/module/plugins/crypter/NitroflareComFolder.py index d6bdd6b98..b0b7fa48f 100644 --- a/module/plugins/crypter/NitroflareComFolder.py +++ b/module/plugins/crypter/NitroflareComFolder.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -from module.common.json_layer import json_loads +from module.plugins.internal.utils import json from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo @@ -11,7 +11,7 @@ class NitroflareComFolder(SimpleCrypter): __status__ = "testing" __pattern__ = r'https?://(?:www\.)?nitroflare\.com/folder/(?P<USER>\d+)/(?P<ID>[\w=]+)' - __config__ = [("activated", "bool", "Activated", True), + __config__ = [("activated" , "bool", "Activated" , True), ("use_subfolder" , "bool", "Save package to subfolder" , True), ("subfolder_per_pack", "bool", "Create a subfolder for each package", True)] @@ -21,7 +21,7 @@ class NitroflareComFolder(SimpleCrypter): def get_links(self): - res = json_loads(self.load("http://nitroflare.com/ajax/folder.php", + res = json.loads(self.load("http://nitroflare.com/ajax/folder.php", post={'userId' : self.info['pattern']['USER'], 'folder' : self.info['pattern']['ID'], 'page' : 1, diff --git a/module/plugins/crypter/NosvideoCom.py b/module/plugins/crypter/NosvideoCom.py index d186dd635..48fa90423 100644 --- a/module/plugins/crypter/NosvideoCom.py +++ b/module/plugins/crypter/NosvideoCom.py @@ -10,7 +10,7 @@ class NosvideoCom(SimpleCrypter): __status__ = "testing" __pattern__ = r'http://(?:www\.)?nosvideo\.com/\?v=\w+' - __config__ = [("activated", "bool", "Activated", True), + __config__ = [("activated" , "bool", "Activated" , True), ("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)] diff --git a/module/plugins/crypter/PastebinCom.py b/module/plugins/crypter/PastebinCom.py index ed52a49cc..1a30cc3be 100644 --- a/module/plugins/crypter/PastebinCom.py +++ b/module/plugins/crypter/PastebinCom.py @@ -10,7 +10,7 @@ class PastebinCom(SimpleCrypter): __status__ = "testing" __pattern__ = r'https://(?:www\.)?pastebin\.com/(.+i=)?(?P<ID>\w{8})' - __config__ = [("activated", "bool", "Activated", True), + __config__ = [("activated" , "bool", "Activated" , True), ("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)] diff --git a/module/plugins/crypter/PastedCo.py b/module/plugins/crypter/PastedCo.py index c57d4e6c5..b1b1ae451 100644 --- a/module/plugins/crypter/PastedCo.py +++ b/module/plugins/crypter/PastedCo.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.Crypter import Crypter +from module.plugins.internal.Crypter import Crypter, create_getInfo import re @@ -43,3 +43,6 @@ class PastedCo(Crypter): urls = urls[urls.find(PastedCo.FS_URL_PREFIX) + len(PastedCo.FS_URL_PREFIX):] urls = urls[:urls.find(PastedCo.FS_URL_SUFFIX)].splitlines() self.packages.append((package_name, urls, package_folder)) + + +getInfo = create_getInfo(PastedCo) diff --git a/module/plugins/crypter/QuickshareCzFolder.py b/module/plugins/crypter/QuickshareCzFolder.py index cb51392f2..0a65738ab 100644 --- a/module/plugins/crypter/QuickshareCzFolder.py +++ b/module/plugins/crypter/QuickshareCzFolder.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- import re -from module.plugins.internal.Crypter import Crypter + +from module.plugins.internal.Crypter import Crypter, create_getInfo class QuickshareCzFolder(Crypter): @@ -11,7 +12,7 @@ class QuickshareCzFolder(Crypter): __status__ = "testing" __pattern__ = r'http://(?:www\.)?quickshare\.cz/slozka-\d+' - __config__ = [("activated", "bool", "Activated", True), + __config__ = [("activated" , "bool", "Activated" , True), ("use_subfolder" , "bool", "Save package to subfolder" , True), ("subfolder_per_pack", "bool", "Create a subfolder for each package", True)] @@ -31,3 +32,6 @@ class QuickshareCzFolder(Crypter): if m is None: self.error(_("FOLDER_PATTERN not found")) self.urls.extend(re.findall(self.LINK_PATTERN, m.group(1))) + + +getInfo = create_getInfo(QuickshareCzFolder) diff --git a/module/plugins/crypter/RelinkUs.py b/module/plugins/crypter/RelinkUs.py index ea0ce6072..c15ecd8d6 100644 --- a/module/plugins/crypter/RelinkUs.py +++ b/module/plugins/crypter/RelinkUs.py @@ -3,12 +3,13 @@ from __future__ import with_statement import binascii -import re import os +import re from Crypto.Cipher import AES -from module.plugins.internal.Crypter import Crypter -from module.utils import save_join as fs_join + +from module.plugins.internal.Crypter import Crypter, create_getInfo +from module.plugins.internal.utils import fs_join class RelinkUs(Crypter): @@ -18,7 +19,7 @@ class RelinkUs(Crypter): __status__ = "testing" __pattern__ = r'http://(?:www\.)?relink\.us/(f/|((view|go)\.php\?id=))(?P<ID>.+)' - __config__ = [("activated", "bool", "Activated", True), + __config__ = [("activated" , "bool", "Activated" , True), ("use_subfolder" , "bool", "Save package to subfolder" , True), ("subfolder_per_pack", "bool", "Create a subfolder for each package", True)] @@ -144,7 +145,7 @@ class RelinkUs(Crypter): self.log_debug("Request user positional captcha resolving") captcha_img_url = self.CAPTCHA_IMG_URL + "?id=%s" % self.fileid coords = self.captcha.decrypt(captcha_img_url, input_type="png", output_type='positional', ocr="CircleCaptcha") - self.log_debug("Captcha resolved, coords [%s]" % str(coords)) + self.log_debug("Captcha resolved, coords %s" % coords) captcha_post_url = self.CAPTCHA_SUBMIT_URL + "?id=%s" % self.fileid captcha_post_data = {'button.x': coords[0], 'button.y': coords[1], 'captcha': 'submit'} self.html = self.load(captcha_post_url, post=captcha_post_data) @@ -291,3 +292,6 @@ class RelinkUs(Crypter): #: Log and return self.log_debug("Package has %d links" % len(links)) return links + + +getInfo = create_getInfo(RelinkUs) diff --git a/module/plugins/crypter/SafelinkingNet.py b/module/plugins/crypter/SafelinkingNet.py index 734f62e6d..f8f343ffc 100644 --- a/module/plugins/crypter/SafelinkingNet.py +++ b/module/plugins/crypter/SafelinkingNet.py @@ -4,8 +4,8 @@ import re import BeautifulSoup -from module.common.json_layer import json_loads -from module.plugins.internal.Crypter import Crypter +from module.plugins.internal.utils import json +from module.plugins.internal.Crypter import Crypter, create_getInfo from module.plugins.captcha.SolveMedia import SolveMedia @@ -16,7 +16,7 @@ class SafelinkingNet(Crypter): __status__ = "testing" __pattern__ = r'https?://(?:www\.)?safelinking\.net/([pd])/\w+' - __config__ = [("activated", "bool", "Activated", True), + __config__ = [("activated" , "bool", "Activated" , True), ("use_subfolder" , "bool", "Save package to subfolder" , True), ("subfolder_per_pack", "bool", "Create a subfolder for each package", True)] @@ -76,9 +76,12 @@ class SafelinkingNet(Crypter): break m = re.search('d_links":(\[.*?\])', s.text) if m is not None: - linkDict = json_loads(m.group(1)) + linkDict = json.loads(m.group(1)) for link in linkDict: if not "http://" in link['full']: self.urls.append("https://safelinking.net/d/" + link['full']) else: self.urls.append(link['full']) + + +getInfo = create_getInfo(SafelinkingNet) diff --git a/module/plugins/crypter/SexuriaCom.py b/module/plugins/crypter/SexuriaCom.py index 42a322dd3..6022b7ad7 100644 --- a/module/plugins/crypter/SexuriaCom.py +++ b/module/plugins/crypter/SexuriaCom.py @@ -1,7 +1,9 @@ # -*- coding: utf-8 -*- import re -from module.plugins.internal.Crypter import Crypter + +from module.plugins.internal.Crypter import Crypter, create_getInfo + class SexuriaCom(Crypter): __name__ = "SexuriaCom" @@ -10,7 +12,7 @@ class SexuriaCom(Crypter): __status__ = "testing" __pattern__ = r'http://(?:www\.)?sexuria\.com/(v1/)?(Pornos_Kostenlos_.+?_(\d+)\.html|dl_links_\d+_\d+\.html|id=\d+\&part=\d+\&link=\d+)' - __config__ = [("activated", "bool", "Activated", True), + __config__ = [("activated" , "bool", "Activated" , True), ("use_subfolder" , "bool", "Save package to subfolder" , True), ("subfolder_per_package", "bool", "Create a subfolder for each package", True)] @@ -105,3 +107,6 @@ class SexuriaCom(Crypter): #: All done, return to caller return name, linklist, folder, password + + +getInfo = create_getInfo(SexuriaCom) diff --git a/module/plugins/crypter/ShSt.py b/module/plugins/crypter/ShSt.py index 99c2f0db1..232729e25 100644 --- a/module/plugins/crypter/ShSt.py +++ b/module/plugins/crypter/ShSt.py @@ -1,9 +1,10 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.Crypter import Crypter +import re import pycurl -import re + +from module.plugins.internal.Crypter import Crypter, create_getInfo class ShSt(Crypter): @@ -30,3 +31,6 @@ class ShSt(Crypter): header = self.load(self.pyfile.url, just_header = True, decode = False) target_url = header.get('location') self.urls.append(target_url) + + +getInfo = create_getInfo(ShSt) diff --git a/module/plugins/crypter/ShareLinksBiz.py b/module/plugins/crypter/ShareLinksBiz.py index 124a3a5b4..eae51d35d 100644 --- a/module/plugins/crypter/ShareLinksBiz.py +++ b/module/plugins/crypter/ShareLinksBiz.py @@ -4,7 +4,8 @@ import binascii import re from Crypto.Cipher import AES -from module.plugins.internal.Crypter import Crypter + +from module.plugins.internal.Crypter import Crypter, create_getInfo class ShareLinksBiz(Crypter): @@ -14,7 +15,7 @@ class ShareLinksBiz(Crypter): __status__ = "testing" __pattern__ = r'http://(?:www\.)?(share-links|s2l)\.biz/(?P<ID>_?\w+)' - __config__ = [("activated", "bool", "Activated", True), + __config__ = [("activated" , "bool", "Activated" , True), ("use_subfolder" , "bool", "Save package to subfolder" , True), ("subfolder_per_pack", "bool", "Create a subfolder for each package", True)] @@ -132,7 +133,7 @@ class ShareLinksBiz(Crypter): captchaUrl = self.base_url + '/captcha.gif?d=%s&PHPSESSID=%s' % (m.group(1), m.group(2)) self.log_debug("Waiting user for correct position") coords = self.captcha.decrypt(captchaUrl, input_type="gif", output_type='positional') - self.log_debug("Captcha resolved, coords [%s]" % str(coords)) + self.log_debug("Captcha resolved, coords %s" % coords) #: Resolve captcha href = self._resolve_coords(coords, captchaMap) @@ -294,3 +295,6 @@ class ShareLinksBiz(Crypter): #: Log and return self.log_debug("Block has %d links" % len(links)) return links + + +getInfo = create_getInfo(ShareLinksBiz) diff --git a/module/plugins/crypter/TNTVillageScambioeticoOrg.py b/module/plugins/crypter/TNTVillageScambioeticoOrg.py index 567e7f752..c02c60a6e 100644 --- a/module/plugins/crypter/TNTVillageScambioeticoOrg.py +++ b/module/plugins/crypter/TNTVillageScambioeticoOrg.py @@ -10,7 +10,7 @@ class TNTVillageScambioeticoOrg(SimpleCrypter): __status__ = "testing" __pattern__ = r'http://(?:www\.)?forum\.tntvillage\.scambioetico\.org/index\.php\?.*showtopic=\d+' - __config__ = [("activated", "bool", "Activated", True), + __config__ = [("activated" , "bool", "Activated" , True), ("use_subfolder" , "bool", "Save package to subfolder" , True), ("subfolder_per_pack", "bool", "Create a subfolder for each package", True)] diff --git a/module/plugins/crypter/TnyCz.py b/module/plugins/crypter/TnyCz.py index 07cfeb728..73035d69e 100644 --- a/module/plugins/crypter/TnyCz.py +++ b/module/plugins/crypter/TnyCz.py @@ -12,7 +12,7 @@ class TnyCz(SimpleCrypter): __status__ = "testing" __pattern__ = r'http://(?:www\.)?tny\.cz/\w+' - __config__ = [("activated", "bool", "Activated", True), + __config__ = [("activated" , "bool", "Activated" , True), ("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)] diff --git a/module/plugins/crypter/TusfilesNetFolder.py b/module/plugins/crypter/TusfilesNetFolder.py index 640b4bdfb..7066d51ed 100644 --- a/module/plugins/crypter/TusfilesNetFolder.py +++ b/module/plugins/crypter/TusfilesNetFolder.py @@ -14,7 +14,7 @@ class TusfilesNetFolder(XFSCrypter): __status__ = "testing" __pattern__ = r'https?://(?:www\.)?tusfiles\.net/go/(?P<ID>\w+)' - __config__ = [("activated", "bool", "Activated", True), + __config__ = [("activated" , "bool", "Activated" , True), ("use_subfolder" , "bool", "Save package to subfolder" , True), ("subfolder_per_pack", "bool", "Create a subfolder for each package", True)] @@ -35,6 +35,7 @@ class TusfilesNetFolder(XFSCrypter): def handle_pages(self, pyfile): pages = re.search(self.PAGES_PATTERN, self.html) + if pages: pages = int(math.ceil(int(pages.group('pages')) / 25.0)) else: @@ -42,7 +43,7 @@ class TusfilesNetFolder(XFSCrypter): for p in xrange(2, pages + 1): self.html = self.load_page(p) - self.links += self.get_links() + self.urls.append(self.get_links()) getInfo = create_getInfo(TusfilesNetFolder) diff --git a/module/plugins/crypter/UlozToFolder.py b/module/plugins/crypter/UlozToFolder.py index b78838cea..07ed13f4e 100644 --- a/module/plugins/crypter/UlozToFolder.py +++ b/module/plugins/crypter/UlozToFolder.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- import re -from module.plugins.internal.Crypter import Crypter + +from module.plugins.internal.Crypter import Crypter, create_getInfo class UlozToFolder(Crypter): @@ -11,7 +12,7 @@ class UlozToFolder(Crypter): __status__ = "testing" __pattern__ = r'http://(?:www\.)?(uloz\.to|ulozto\.(cz|sk|net)|bagruj\.cz|zachowajto\.pl)/(m|soubory)/.+' - __config__ = [("activated", "bool", "Activated", True), + __config__ = [("activated" , "bool", "Activated" , True), ("use_subfolder" , "bool", "Save package to subfolder" , True), ("subfolder_per_pack", "bool", "Create a subfolder for each package", True)] @@ -46,3 +47,6 @@ class UlozToFolder(Crypter): if new_links: self.urls = [map(lambda s: "http://ulozto.net/%s" % s, new_links)] + + +getInfo = create_getInfo(UlozToFolder) diff --git a/module/plugins/crypter/UploadableChFolder.py b/module/plugins/crypter/UploadableChFolder.py index 0809b0f37..40736fa04 100644 --- a/module/plugins/crypter/UploadableChFolder.py +++ b/module/plugins/crypter/UploadableChFolder.py @@ -10,7 +10,7 @@ class UploadableChFolder(SimpleCrypter): __status__ = "testing" __pattern__ = r'http://(?:www\.)?uploadable\.ch/list/\w+' - __config__ = [("activated", "bool", "Activated", True), + __config__ = [("activated" , "bool", "Activated" , True), ("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)] diff --git a/module/plugins/crypter/UploadedToFolder.py b/module/plugins/crypter/UploadedToFolder.py index 0d4e621b2..638d172d5 100644 --- a/module/plugins/crypter/UploadedToFolder.py +++ b/module/plugins/crypter/UploadedToFolder.py @@ -12,7 +12,7 @@ class UploadedToFolder(SimpleCrypter): __status__ = "testing" __pattern__ = r'https?://(?:www\.)?(uploaded|ul)\.(to|net)/(f|folder|list)/\w+' - __config__ = [("activated", "bool", "Activated", True), + __config__ = [("activated" , "bool", "Activated" , True), ("use_subfolder" , "bool", "Save package to subfolder" , True), ("subfolder_per_pack", "bool", "Create a subfolder for each package", True)] diff --git a/module/plugins/crypter/XupPl.py b/module/plugins/crypter/XupPl.py index 41abc861e..b041ee4fc 100644 --- a/module/plugins/crypter/XupPl.py +++ b/module/plugins/crypter/XupPl.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.Crypter import Crypter +from module.plugins.internal.Crypter import Crypter, create_getInfo class XupPl(Crypter): @@ -10,7 +10,7 @@ class XupPl(Crypter): __status__ = "testing" __pattern__ = r'https?://(?:[^/]*\.)?xup\.pl/.+' - __config__ = [("activated", "bool", "Activated", True), + __config__ = [("activated" , "bool", "Activated" , True), ("use_subfolder" , "bool", "Save package to subfolder" , True), ("subfolder_per_pack", "bool", "Create a subfolder for each package", True)] @@ -25,3 +25,6 @@ class XupPl(Crypter): self.urls = [header.get('location')] else: self.fail(_("Unable to find link")) + + +getInfo = create_getInfo(XupPl) diff --git a/module/plugins/crypter/YoutubeComFolder.py b/module/plugins/crypter/YoutubeComFolder.py index 3c794e956..4a5c688aa 100644 --- a/module/plugins/crypter/YoutubeComFolder.py +++ b/module/plugins/crypter/YoutubeComFolder.py @@ -3,9 +3,8 @@ import re import urlparse -from module.common.json_layer import json_loads -from module.plugins.internal.Crypter import Crypter -from module.utils import save_join as fs_join +from module.plugins.internal.Crypter import Crypter, create_getInfo +from module.plugins.internal.utils import fs_join, json class YoutubeComFolder(Crypter): @@ -15,7 +14,7 @@ class YoutubeComFolder(Crypter): __status__ = "testing" __pattern__ = r'https?://(?:www\.|m\.)?youtube\.com/(?P<TYPE>user|playlist|view_play_list)(/|.*?[?&](?:list|p)=)(?P<ID>[\w\-]+)' - __config__ = [("activated", "bool", "Activated", True), + __config__ = [("activated" , "bool", "Activated" , True), ("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), @@ -34,7 +33,7 @@ class YoutubeComFolder(Crypter): req.update({'key': self.API_KEY}) url = urlparse.urljoin("https://www.googleapis.com/youtube/v3/", ref) html = self.load(url, get=req) - return json_loads(html) + return json.loads(html) def get_channel(self, user): @@ -147,3 +146,6 @@ class YoutubeComFolder(Crypter): self.packages.append((p_name, p_urls, p_folder)) #: Folder is NOT recognized by pyload 0.4.9! addedvideos.extend(p_videos) + + +getInfo = create_getInfo(YoutubeComFolder) |