summaryrefslogtreecommitdiffstats
path: root/pyload/plugins/crypter/HotfileFolderCom.py
diff options
context:
space:
mode:
authorGravatar Stefano <l.stickell@yahoo.it> 2013-07-21 15:03:21 +0200
committerGravatar Stefano <l.stickell@yahoo.it> 2013-07-21 15:43:18 +0200
commitff581d9a4a1637b4e06bcbe77d67591f9279fe1b (patch)
tree0be4883b505aecc6920bdfccfcc9672636d59691 /pyload/plugins/crypter/HotfileFolderCom.py
parentImproved .gitattributes (diff)
downloadpyload-ff581d9a4a1637b4e06bcbe77d67591f9279fe1b.tar.xz
Fixed PEP 8 violations in Crypters
Diffstat (limited to 'pyload/plugins/crypter/HotfileFolderCom.py')
-rw-r--r--pyload/plugins/crypter/HotfileFolderCom.py21
1 files changed, 10 insertions, 11 deletions
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'<img src="/i/folder.gif" width="23" height="14" style="margin-bottom: -2px;" />([^<]+)', 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))