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/ChipDe.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'module/plugins/crypter/ChipDe.py') diff --git a/module/plugins/crypter/ChipDe.py b/module/plugins/crypter/ChipDe.py index 529ec6918..8e48b1085 100644 --- a/module/plugins/crypter/ChipDe.py +++ b/module/plugins/crypter/ChipDe.py @@ -6,13 +6,16 @@ from module.plugins.Crypter import Crypter class ChipDe(Crypter): __name__ = "ChipDe" + __version__ = "0.1" __type__ = "crypter" + __pattern__ = r'http://(?:www\.)?chip.de/video/.*\.html' - __version__ = "0.1" + __description__ = """Chip.de decrypter plugin""" __author_name__ = "4Christopher" __author_mail__ = "4Christopher@gmx.de" + def decrypt(self, pyfile): self.html = self.load(pyfile.url) try: -- 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/ChipDe.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'module/plugins/crypter/ChipDe.py') diff --git a/module/plugins/crypter/ChipDe.py b/module/plugins/crypter/ChipDe.py index 8e48b1085..f59903170 100644 --- a/module/plugins/crypter/ChipDe.py +++ b/module/plugins/crypter/ChipDe.py @@ -19,9 +19,9 @@ class ChipDe(Crypter): def decrypt(self, pyfile): self.html = self.load(pyfile.url) try: - url = re.search(r'"(http://video.chip.de/\d+?/.*)"', self.html).group(1) - self.logDebug('The file URL is %s' % url) + f = re.search(r'"(http://video.chip.de/\d+?/.*)"', self.html) except: self.fail('Failed to find the URL') - - self.packages.append((pyfile.package().name, [url], pyfile.package().folder)) + else: + self.urls = [f.group(1)] + self.logDebug('The file URL is %s' % self.urls[0]) -- 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/ChipDe.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/crypter/ChipDe.py') diff --git a/module/plugins/crypter/ChipDe.py b/module/plugins/crypter/ChipDe.py index f59903170..a75cc5e0e 100644 --- a/module/plugins/crypter/ChipDe.py +++ b/module/plugins/crypter/ChipDe.py @@ -6,8 +6,8 @@ from module.plugins.Crypter import Crypter class ChipDe(Crypter): __name__ = "ChipDe" - __version__ = "0.1" __type__ = "crypter" + __version__ = "0.1" __pattern__ = r'http://(?:www\.)?chip.de/video/.*\.html' -- cgit v1.2.3