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/CzshareComFolder.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'module/plugins/crypter/CzshareComFolder.py') diff --git a/module/plugins/crypter/CzshareComFolder.py b/module/plugins/crypter/CzshareComFolder.py index c60d5a87d..e0c311ba8 100644 --- a/module/plugins/crypter/CzshareComFolder.py +++ b/module/plugins/crypter/CzshareComFolder.py @@ -17,19 +17,15 @@ class CzshareComFolder(Crypter): FOLDER_PATTERN = r'\s*\s*(.*?)
' LINK_PATTERN = r'info' - #NEXT_PAGE_PATTERN = r'' def decrypt(self, pyfile): html = self.load(pyfile.url) - new_links = [] found = re.search(self.FOLDER_PATTERN, html, re.DOTALL) if not found: self.fail("Parse error (FOLDER)") - new_links.extend(re.findall(self.LINK_PATTERN, found.group(1))) - if new_links: - self.core.files.addLinks(new_links, pyfile.package().id) - else: + self.urls.extend(re.findall(self.LINK_PATTERN, found.group(1))) + if not self.urls: self.fail('Could not extract any links') -- cgit v1.2.3