diff options
author | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-10-18 18:53:42 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-10-18 18:53:42 +0200 |
commit | cdf8ef0c2e2d6e84bfab7f98f7efd33aa1b84efc (patch) | |
tree | cf81e7c7fd91ad4953056da1b05efed21f4115b5 /module/plugins/container | |
parent | Update captchas (diff) | |
download | pyload-cdf8ef0c2e2d6e84bfab7f98f7efd33aa1b84efc.tar.xz |
Update containers
Diffstat (limited to 'module/plugins/container')
-rw-r--r-- | module/plugins/container/CCF.py | 11 | ||||
-rw-r--r-- | module/plugins/container/DLC.py | 6 | ||||
-rw-r--r-- | module/plugins/container/RSDF.py | 4 | ||||
-rw-r--r-- | module/plugins/container/TXT.py | 4 |
4 files changed, 13 insertions, 12 deletions
diff --git a/module/plugins/container/CCF.py b/module/plugins/container/CCF.py index 7e0e962b3..dea36b7aa 100644 --- a/module/plugins/container/CCF.py +++ b/module/plugins/container/CCF.py @@ -2,12 +2,13 @@ from __future__ import with_statement -import MultipartPostHandler import re import urllib2 +import MultipartPostHandler + from module.plugins.internal.Container import Container -from module.utils import fs_encode, save_join as fs_join +from module.plugins.internal.utils import encode, fs_join class CCF(Container): @@ -26,7 +27,7 @@ class CCF(Container): def decrypt(self, pyfile): - fs_filename = fs_encode(pyfile.url.strip()) + fs_filename = encode(pyfile.url.strip()) opener = urllib2.build_opener(MultipartPostHandler.MultipartPostHandler) dlc_content = opener.open('http://service.jdownloader.net/dlcrypt/getDLC.php', @@ -34,8 +35,8 @@ class CCF(Container): 'filename': "test.ccf", 'upload' : open(fs_filename, "rb")}).read() - download_folder = self.pyload.config.get("general", "download_folder") - dlc_file = fs_join(download_folder, "tmp_%s.dlc" % pyfile.name) + dl_folder = self.pyload.config.get("general", "download_folder") + dlc_file = fs_join(dl_folder, "tmp_%s.dlc" % pyfile.name) try: dlc = re.search(r'<dlc>(.+)</dlc>', dlc_content, re.S).group(1).decode('base64') diff --git a/module/plugins/container/DLC.py b/module/plugins/container/DLC.py index 24300b358..c9d6e2aa8 100644 --- a/module/plugins/container/DLC.py +++ b/module/plugins/container/DLC.py @@ -8,7 +8,7 @@ import xml.dom.minidom from Crypto.Cipher import AES from module.plugins.internal.Container import Container -from module.utils import decode, fs_encode +from module.plugins.internal.utils import decode, encode class DLC(Container): @@ -17,7 +17,7 @@ class DLC(Container): __version__ = "0.26" __status__ = "testing" - __pattern__ = r'(.+\.dlc|[\w+^_]+==[\w+^_/]+==)$' + __pattern__ = r'(.+\.dlc|[\w\+^_]+==[\w\+^_/]+==)$' __config__ = [("activated", "bool", "Activated", True)] __description__ = """DLC container decrypter plugin""" @@ -35,7 +35,7 @@ class DLC(Container): def decrypt(self, pyfile): - fs_filename = fs_encode(pyfile.url.strip()) + fs_filename = encode(pyfile.url.strip()) with open(fs_filename) as dlc: data = dlc.read().strip() diff --git a/module/plugins/container/RSDF.py b/module/plugins/container/RSDF.py index f156cf1eb..85e552d32 100644 --- a/module/plugins/container/RSDF.py +++ b/module/plugins/container/RSDF.py @@ -8,7 +8,7 @@ import re from Crypto.Cipher import AES from module.plugins.internal.Container import Container -from module.utils import fs_encode +from module.plugins.internal.utils import encode class RSDF(Container): @@ -39,7 +39,7 @@ class RSDF(Container): cipher = AES.new(KEY, AES.MODE_CFB, iv) try: - fs_filename = fs_encode(pyfile.url.strip()) + fs_filename = encode(pyfile.url.strip()) with open(fs_filename, 'r') as rsdf: data = rsdf.read() diff --git a/module/plugins/container/TXT.py b/module/plugins/container/TXT.py index 555c13b51..4f9f5dc35 100644 --- a/module/plugins/container/TXT.py +++ b/module/plugins/container/TXT.py @@ -3,7 +3,7 @@ import codecs from module.plugins.internal.Container import Container -from module.utils import fs_encode +from module.plugins.internal.utils import encode class TXT(Container): @@ -30,7 +30,7 @@ class TXT(Container): except Exception: encoding = "utf-8" - fs_filename = fs_encode(pyfile.url.strip()) + fs_filename = encode(pyfile.url.strip()) txt = codecs.open(fs_filename, 'r', encoding) curPack = "Parsed links from %s" % pyfile.name packages = {curPack:[],} |