diff options
Diffstat (limited to 'pyload/plugin/crypter/Dereferer.py')
-rw-r--r-- | pyload/plugin/crypter/Dereferer.py | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/pyload/plugin/crypter/Dereferer.py b/pyload/plugin/crypter/Dereferer.py new file mode 100644 index 000000000..ec7f48a52 --- /dev/null +++ b/pyload/plugin/crypter/Dereferer.py @@ -0,0 +1,26 @@ +# -*- coding: utf-8 -*- + +import re + +from urllib import unquote + +from pyload.plugin.Crypter import Crypter + + +class Dereferer(Crypter): + __name = "Dereferer" + __type = "crypter" + __version = "0.10" + + __pattern = r'https?://([^/]+)/.*?(?P<url>(ht|f)tps?(://|%3A%2F%2F).*)' + __config = [("use_subfolder", "bool", "Save package to subfolder", True), + ("subfolder_per_package", "bool", "Create a subfolder for each package", True)] + + __description = """Crypter for dereferers""" + __license = "GPLv3" + __authors = [("zoidberg", "zoidberg@mujmail.cz")] + + + def decrypt(self, pyfile): + link = re.match(self.__pattern, pyfile.url).group('url') + self.urls = [unquote(link).rstrip('+')] |