From ff581d9a4a1637b4e06bcbe77d67591f9279fe1b Mon Sep 17 00:00:00 2001 From: Stefano Date: Sun, 21 Jul 2013 15:03:21 +0200 Subject: Fixed PEP 8 violations in Crypters (cherry-picked from 4b61d36bf18931df0a9720047b3619ce245f8a1b) --- pyload/plugins/crypter/HotfileFolderCom.py | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) (limited to 'pyload/plugins/crypter/HotfileFolderCom.py') diff --git a/pyload/plugins/crypter/HotfileFolderCom.py b/pyload/plugins/crypter/HotfileFolderCom.py index ea7311e3c..79691ad01 100644 --- a/pyload/plugins/crypter/HotfileFolderCom.py +++ b/pyload/plugins/crypter/HotfileFolderCom.py @@ -5,25 +5,24 @@ import re from module.plugins.Crypter import Crypter + class HotfileFolderCom(Crypter): __name__ = "HotfileFolderCom" __type__ = "crypter" __pattern__ = r"http://(?:www\.)?hotfile.com/list/\w+/\w+" - __version__ = "0.2" + __version__ = "0.1" __description__ = """HotfileFolder Download Plugin""" __author_name__ = ("RaNaN") __author_mail__ = ("RaNaN@pyload.org") - def decryptURL(self, url): - html = self.load(url) + def decrypt(self, pyfile): + html = self.load(pyfile.url) - new_links = [] - for link in re.findall(r'href="(http://(www.)?hotfile\.com/dl/\d+/[0-9a-zA-Z]+[^"]+)', html): - new_links.append(link[0]) + name = re.findall( + r'([^<]+)', html, + re.MULTILINE)[0].replace("/", "") + new_links = re.findall(r'href="(http://(www.)?hotfile\.com/dl/\d+/[0-9a-zA-Z]+[^"]+)', html) - if new_links: - self.logDebug("Found %d new links" % len(new_links)) - return new_links - else: - self.fail('Could not extract any links') + new_links = [x[0] for x in new_links] + self.packages.append((name, new_links, name)) -- cgit v1.2.3