From b66a9380e5efba5b7ec44a81eaa8be2cda8ad8f6 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Mon, 25 May 2015 13:49:57 +0200 Subject: New crypter: GoogledriveComFolder --- module/plugins/crypter/GoogledriveComFolder.py | 23 +++++++++++++++++++++++ module/plugins/internal/SimpleCrypter.py | 6 +++--- 2 files changed, 26 insertions(+), 3 deletions(-) create mode 100644 module/plugins/crypter/GoogledriveComFolder.py diff --git a/module/plugins/crypter/GoogledriveComFolder.py b/module/plugins/crypter/GoogledriveComFolder.py new file mode 100644 index 000000000..8e6cdbc51 --- /dev/null +++ b/module/plugins/crypter/GoogledriveComFolder.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -* + +from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo + + +class GoogledriveComFolder(SimpleCrypter): + __name__ = "GoogledriveCom" + __type__ = "crypter" + __version__ = "0.01" + + __pattern__ = r'https?://(?:www\.)?drive\.google\.com/folderview\?.*id=\w+' + + __description__ = """Drive.google.com folder decrypter plugin""" + __license__ = "GPLv3" + __authors__ = [("Walter Purcaro", "vuolter@gmail.com")] + + + NAME_PATTERN = r"folderName: '(?P.+?)'" + LINK_PATTERN = r'\[,"\w+"(?:,,".+?")?,"(.+?)"' + OFFLINE_PATTERN = r'' + + +getInfo = create_getInfo(GoogledriveComFolder) diff --git a/module/plugins/internal/SimpleCrypter.py b/module/plugins/internal/SimpleCrypter.py index 09805cf1a..bf024576f 100644 --- a/module/plugins/internal/SimpleCrypter.py +++ b/module/plugins/internal/SimpleCrypter.py @@ -5,13 +5,13 @@ import urlparse from module.plugins.Crypter import Crypter from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo, replace_patterns, set_cookies -from module.utils import fixup +from module.utils import fixup, html_unescape class SimpleCrypter(Crypter, SimpleHoster): __name__ = "SimpleCrypter" __type__ = "crypter" - __version__ = "0.43" + __version__ = "0.44" __pattern__ = r'^unmatchable$' __config__ = [("use_subfolder" , "bool", "Save package to subfolder" , True), #: Overrides core.config['general']['folder_per_package'] @@ -152,7 +152,7 @@ class SimpleCrypter(Crypter, SimpleHoster): url_p = urlparse.urlparse(self.pyfile.url) baseurl = "%s://%s" % (url_p.scheme, url_p.netloc) - return [urlparse.urljoin(baseurl, link) if not urlparse.urlparse(link).scheme else link \ + return [html_unescape(urlparse.urljoin(baseurl, link) if not urlparse.urlparse(link).scheme else link) \ for link in re.findall(self.LINK_PATTERN, self.html)] -- cgit v1.2.3