From a335131bd0056885a410f29df946e3e4050a7f31 Mon Sep 17 00:00:00 2001 From: GammaC0de Date: Mon, 1 Jun 2015 23:57:41 +0300 Subject: Update Dereferer.py --- module/plugins/crypter/Dereferer.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/module/plugins/crypter/Dereferer.py b/module/plugins/crypter/Dereferer.py index 985c97f3d..85b84a242 100644 --- a/module/plugins/crypter/Dereferer.py +++ b/module/plugins/crypter/Dereferer.py @@ -1,12 +1,14 @@ # -*- coding: utf-8 -*- +import re + from module.plugins.internal.SimpleCrypter import SimpleCrypter class Dereferer(SimpleCrypter): __name__ = "Dereferer" __type__ = "crypter" - __version__ = "0.13" + __version__ = "0.14" __pattern__ = r'https?://(?:www\.)?(?:\w+\.)*?(?P(?:[\d.]+|[\w\-]{3,}(?:\.[a-zA-Z]{2,}){1,2})(?:\:\d+)?)/.*?(?P(?:ht|f)tps?://.+)' __config__ = [("use_subfolder" , "bool", "Save package to subfolder" , True), @@ -37,4 +39,4 @@ class Dereferer(SimpleCrypter): def getLinks(self): - return [re.match(self.__pattern__, pyfile.url).group('LINK').strip()] + return [re.match(self.__pattern__, self.pyfile.url).group('LINK').strip()] -- cgit v1.2.3 From 109b33f5c6648563943e8461be64111d06196f94 Mon Sep 17 00:00:00 2001 From: GammaC0de Date: Tue, 2 Jun 2015 00:00:21 +0300 Subject: Update SimpleCrypter.py --- module/plugins/internal/SimpleCrypter.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/module/plugins/internal/SimpleCrypter.py b/module/plugins/internal/SimpleCrypter.py index 2d4d52f3c..8a37839b5 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.47" + __version__ = "0.48" __pattern__ = r'^unmatchable$' __config__ = [("use_subfolder" , "bool", "Save package to subfolder" , True), #: Overrides core.config['general']['folder_per_package'] @@ -101,7 +101,7 @@ class SimpleCrypter(Crypter, SimpleHoster): def handleDirect(self, pyfile): while True: - header = self.load(self.link or pyfile.url, just_header=True, decode=True) + header = self.load(self.link if hasattr(self, 'link') and self.link else pyfile.url, just_header=True, decode=True) if 'location' in header and header['location']: self.link = header['location'] else: @@ -114,7 +114,7 @@ class SimpleCrypter(Crypter, SimpleHoster): self.logDebug("Looking for link redirect...") self.handleDirect(pyfile) - if self.link: + if hasattr(self, 'link') and self.link: self.urls = [self.link] else: -- cgit v1.2.3