summaryrefslogtreecommitdiffstats
path: root/module/plugins/crypter/HotfileFolderCom.py
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2012-09-18 17:59:50 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2012-09-18 17:59:50 +0200
commit6130a2377ca6754fee88773097ce220abef1aa47 (patch)
tree76bea0d76393100fcf393c164c96d34f286aba7a /module/plugins/crypter/HotfileFolderCom.py
parentAdded DuckcryptInfo decrypter, smaller fixes (diff)
parentdropdowns in navbar (diff)
downloadpyload-6130a2377ca6754fee88773097ce220abef1aa47.tar.xz
merged stable into default
Diffstat (limited to 'module/plugins/crypter/HotfileFolderCom.py')
-rw-r--r--module/plugins/crypter/HotfileFolderCom.py18
1 files changed, 11 insertions, 7 deletions
diff --git a/module/plugins/crypter/HotfileFolderCom.py b/module/plugins/crypter/HotfileFolderCom.py
index 00771e2a3..ea7311e3c 100644
--- a/module/plugins/crypter/HotfileFolderCom.py
+++ b/module/plugins/crypter/HotfileFolderCom.py
@@ -9,17 +9,21 @@ class HotfileFolderCom(Crypter):
__name__ = "HotfileFolderCom"
__type__ = "crypter"
__pattern__ = r"http://(?:www\.)?hotfile.com/list/\w+/\w+"
- __version__ = "0.1"
+ __version__ = "0.2"
__description__ = """HotfileFolder Download Plugin"""
__author_name__ = ("RaNaN")
__author_mail__ = ("RaNaN@pyload.org")
- def decrypt(self, pyfile):
- html = self.load(pyfile.url)
+ def decryptURL(self, url):
+ html = self.load(url)
- 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)
+ 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])
- new_links = [x[0] for x in new_links]
+ if new_links:
+ self.logDebug("Found %d new links" % len(new_links))
+ return new_links
+ else:
+ self.fail('Could not extract any links')
- self.packages.append((name, new_links, name)) \ No newline at end of file