diff options
author | Stefano <l.stickell@yahoo.it> | 2014-07-02 15:23:46 +0200 |
---|---|---|
committer | Stefano <l.stickell@yahoo.it> | 2014-07-02 15:23:46 +0200 |
commit | 9c9cc6d4871b9847dada36c63ae1cbadfacef999 (patch) | |
tree | aef7c3b3788d5cda7c8c5f4b225ab195daf36af7 /module/plugins/internal/SimpleCrypter.py | |
parent | [Filefactory] Improved offline pattern (diff) | |
download | pyload-9c9cc6d4871b9847dada36c63ae1cbadfacef999.tar.xz |
[SimpleCrypter] ability to set cookies
Diffstat (limited to 'module/plugins/internal/SimpleCrypter.py')
-rw-r--r-- | module/plugins/internal/SimpleCrypter.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/module/plugins/internal/SimpleCrypter.py b/module/plugins/internal/SimpleCrypter.py index b1a18f5e0..268efee86 100644 --- a/module/plugins/internal/SimpleCrypter.py +++ b/module/plugins/internal/SimpleCrypter.py @@ -21,12 +21,12 @@ import re from module.plugins.Crypter import Crypter from module.utils import html_unescape -from module.plugins.internal.SimpleHoster import replace_patterns +from module.plugins.internal.SimpleHoster import replace_patterns, set_cookies class SimpleCrypter(Crypter): __name__ = "SimpleCrypter" - __version__ = "0.07" + __version__ = "0.08" __pattern__ = None __type__ = "crypter" __description__ = """Simple decrypter plugin""" @@ -55,6 +55,12 @@ class SimpleCrypter(Crypter): FILE_URL_REPLACEMENTS = [] + SH_COOKIES = True # or False or list of tuples [(domain, name, value)] + + def setup(self): + if isinstance(self.SH_COOKIES, list): + set_cookies(self.req.cj, self.SH_COOKIES) + def decrypt(self, pyfile): pyfile.url = replace_patterns(pyfile.url, self.FILE_URL_REPLACEMENTS) |