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, 4 insertions, 12 deletions
diff --git a/module/plugins/internal/SimpleCrypter.py b/module/plugins/internal/SimpleCrypter.py
index 8a37839b5..81f977e57 100644
--- a/module/plugins/internal/SimpleCrypter.py
+++ b/module/plugins/internal/SimpleCrypter.py
@@ -11,7 +11,7 @@ from module.utils import fixup, html_unescape
class SimpleCrypter(Crypter, SimpleHoster):
__name__ = "SimpleCrypter"
__type__ = "crypter"
- __version__ = "0.48"
+ __version__ = "0.49"
__pattern__ = r'^unmatchable$'
__config__ = [("use_subfolder" , "bool", "Save package to subfolder" , True), #: Overrides core.config['general']['folder_per_package']
@@ -55,15 +55,6 @@ class SimpleCrypter(Crypter, SimpleHoster):
LINK_PATTERN = None
- NAME_REPLACEMENTS = [("&#?\w+;", fixup)]
- URL_REPLACEMENTS = []
-
- TEXT_ENCODING = False #: Set to True or encoding name if encoding in http header is not correct
- COOKIES = True #: or False or list of tuples [(domain, name, value)]
-
- LOGIN_ACCOUNT = False
- LOGIN_PREMIUM = False
-
#@TODO: Remove in 0.4.10
def init(self):
@@ -83,6 +74,7 @@ class SimpleCrypter(Crypter, SimpleHoster):
self.info = {}
self.html = ""
+ self.link = "" #@TODO: Move to hoster class in 0.4.10
self.links = [] #@TODO: Move to hoster class in 0.4.10
if self.LOGIN_PREMIUM and not self.premium:
@@ -101,7 +93,7 @@ class SimpleCrypter(Crypter, SimpleHoster):
def handleDirect(self, pyfile):
while True:
- header = self.load(self.link if hasattr(self, 'link') and self.link else pyfile.url, just_header=True, decode=True)
+ header = self.load(self.link or pyfile.url, just_header=True, decode=True)
if 'location' in header and header['location']:
self.link = header['location']
else:
@@ -114,7 +106,7 @@ class SimpleCrypter(Crypter, SimpleHoster):
self.logDebug("Looking for link redirect...")
self.handleDirect(pyfile)
- if hasattr(self, 'link') and self.link:
+ if self.link:
self.urls = [self.link]
else: