summaryrefslogtreecommitdiffstats
path: root/module/plugins/internal/SimpleCrypter.py
diff options
context:
space:
mode:
Diffstat (limited to 'module/plugins/internal/SimpleCrypter.py')
-rw-r--r--module/plugins/internal/SimpleCrypter.py16
1 files changed, 9 insertions, 7 deletions
diff --git a/module/plugins/internal/SimpleCrypter.py b/module/plugins/internal/SimpleCrypter.py
index 3c783bcab..2873a7fa7 100644
--- a/module/plugins/internal/SimpleCrypter.py
+++ b/module/plugins/internal/SimpleCrypter.py
@@ -10,7 +10,7 @@ from module.utils import html_unescape
class SimpleCrypter(Crypter):
__name__ = "SimpleCrypter"
__type__ = "crypter"
- __version__ = "0.11"
+ __version__ = "0.12"
__pattern__ = None
@@ -58,18 +58,20 @@ class SimpleCrypter(Crypter):
LOGIN_PREMIUM = False
- def setup(self):
- if isinstance(self.COOKIES, list):
- set_cookies(self.req.cj, self.COOKIES)
-
-
- def decrypt(self, pyfile):
+ def prepare(self):
if self.LOGIN_ACCOUNT and not self.account:
self.fail('Required account not found!')
if self.LOGIN_PREMIUM and not self.premium:
self.fail('Required premium account not found!')
+ if isinstance(self.COOKIES, list):
+ set_cookies(self.req.cj, self.COOKIES)
+
+
+ def decrypt(self, pyfile):
+ self.prepare()
+
pyfile.url = replace_patterns(pyfile.url, self.URL_REPLACEMENTS)
self.html = self.load(pyfile.url, decode=not self.TEXT_ENCODING)