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.py13
1 files changed, 6 insertions, 7 deletions
diff --git a/module/plugins/internal/SimpleCrypter.py b/module/plugins/internal/SimpleCrypter.py
index 6279be1bd..00b872b69 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.50"
+ __version__ = "0.51"
__pattern__ = r'^unmatchable$'
__config__ = [("use_subfolder" , "bool", "Save package to subfolder" , True), #: Overrides core.config['general']['folder_per_package']
@@ -74,8 +74,8 @@ 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
+ self.link = "" #@TODO: Move to Hoster in 0.4.10
+ self.links = [] #@TODO: Move to Hoster in 0.4.10
if self.LOGIN_PREMIUM and not self.premium:
self.fail(_("Required premium account not found"))
@@ -121,6 +121,7 @@ class SimpleCrypter(Crypter, SimpleHoster):
self.logDebug("Package has %d links" % len(self.links))
if self.links:
+ self.links = [html_unescape(l.decode('unicode-escape').strip()) for l in links] #@TODO: Move to Crypter in 0.4.10
self.packages = [(self.info['name'], self.links, self.info['folder'])]
elif not self.urls and not self.packages: #@TODO: Remove in 0.4.10
@@ -160,10 +161,8 @@ class SimpleCrypter(Crypter, SimpleHoster):
url_p = urlparse.urlparse(self.pyfile.url)
baseurl = "%s://%s" % (url_p.scheme, url_p.netloc)
- links = [urlparse.urljoin(baseurl, link) if not urlparse.urlparse(link).scheme else link \
- for link in re.findall(self.LINK_PATTERN, self.html)]
-
- return [html_unescape(l.decode('unicode-escape').strip()) for l in links]
+ return [urlparse.urljoin(baseurl, link) if not urlparse.urlparse(link).scheme else link \
+ for link in re.findall(self.LINK_PATTERN, self.html)]
def handlePages(self, pyfile):