From 8e47b0de30a25d0fd5dfb518bfe4e1e7beff93fd Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 15 Jul 2014 16:27:44 +0200 Subject: Key attributes cleanup for account, container and crypter plugins --- module/plugins/crypter/XupPl.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'module/plugins/crypter/XupPl.py') diff --git a/module/plugins/crypter/XupPl.py b/module/plugins/crypter/XupPl.py index c04fc69f8..09c3084ea 100644 --- a/module/plugins/crypter/XupPl.py +++ b/module/plugins/crypter/XupPl.py @@ -5,13 +5,16 @@ from module.plugins.Crypter import Crypter class XupPl(Crypter): __name__ = "XupPl" + __version__ = "0.1" __type__ = "crypter" + __pattern__ = r'https?://(?:[^/]*\.)?xup\.pl/.*' - __version__ = "0.1" + __description__ = """Xup.pl decrypter plugin""" __author_name__ = "z00nx" __author_mail__ = "z00nx0@gmail.com" + def decrypt(self, pyfile): header = self.load(pyfile.url, just_header=True) if 'location' in header: -- cgit v1.2.3 From a1e78f33dc2b0b6777fdcbc415673f3965b25542 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Wed, 16 Jul 2014 00:46:26 +0200 Subject: Prefer self.urls and self.packages for adding links --- module/plugins/crypter/XupPl.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/crypter/XupPl.py') diff --git a/module/plugins/crypter/XupPl.py b/module/plugins/crypter/XupPl.py index 09c3084ea..e89f4ccb0 100644 --- a/module/plugins/crypter/XupPl.py +++ b/module/plugins/crypter/XupPl.py @@ -18,6 +18,6 @@ class XupPl(Crypter): def decrypt(self, pyfile): header = self.load(pyfile.url, just_header=True) if 'location' in header: - self.core.files.addLinks([header['location']], pyfile.package().id) + self.urls = [header['location']] else: self.fail('Unable to find link') -- cgit v1.2.3 From ba916633f2bedb04c7358000b91aed69f52e8e43 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 1 Aug 2014 19:35:59 +0200 Subject: Remove trailing whitespaces + remove license headers + import urllib methods directly + sort and fix key attributes + use save_join instead join + sort some import declarations + other minor code cosmetics --- module/plugins/crypter/XupPl.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/crypter/XupPl.py') diff --git a/module/plugins/crypter/XupPl.py b/module/plugins/crypter/XupPl.py index e89f4ccb0..5e5f511a8 100644 --- a/module/plugins/crypter/XupPl.py +++ b/module/plugins/crypter/XupPl.py @@ -5,8 +5,8 @@ from module.plugins.Crypter import Crypter class XupPl(Crypter): __name__ = "XupPl" - __version__ = "0.1" __type__ = "crypter" + __version__ = "0.1" __pattern__ = r'https?://(?:[^/]*\.)?xup\.pl/.*' -- cgit v1.2.3