diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2010-09-19 23:56:13 +0200 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2010-09-19 23:56:13 +0200 |
commit | 14d3b88fc4bae2e25db8b418a790ef8dd1a76444 (patch) | |
tree | e02b043dec77d9195294312a28ce22ef5cb0fbb2 | |
parent | fileserv, freakshare fix (diff) | |
download | pyload-14d3b88fc4bae2e25db8b418a790ef8dd1a76444.tar.xz |
netfolder, hotfile folder
-rw-r--r-- | module/FileDatabase.py | 3 | ||||
-rw-r--r-- | module/PluginManager.py | 2 | ||||
-rw-r--r-- | module/plugins/crypter/HotfileFolderCom.py | 25 | ||||
-rw-r--r-- | module/plugins/crypter/NetfolderIn.py | 25 | ||||
-rw-r--r-- | module/plugins/hoster/FileserveCom.py | 3 |
5 files changed, 55 insertions, 3 deletions
diff --git a/module/FileDatabase.py b/module/FileDatabase.py index 2d3e0aa86..012dd8383 100644 --- a/module/FileDatabase.py +++ b/module/FileDatabase.py @@ -371,6 +371,9 @@ class FileHandler: self.restartFile(pyfile.id) self.db.restartPackage(id) + + if self.packageCache.has_key(id): + self.packageCache[id].setFinished = False e = UpdateEvent("pack", id, "collector" if not self.getPackage(id).queue else "queue") self.core.pullManager.addEvent(e) diff --git a/module/PluginManager.py b/module/PluginManager.py index afd527e40..ab7245db2 100644 --- a/module/PluginManager.py +++ b/module/PluginManager.py @@ -195,7 +195,7 @@ class PluginManager(): res = [] # tupels of (url, plugin) for url in urls: - + if type(url) not in (str, unicode, buffer): continue found = False if last and last[1]["re"].match(url): diff --git a/module/plugins/crypter/HotfileFolderCom.py b/module/plugins/crypter/HotfileFolderCom.py new file mode 100644 index 000000000..00771e2a3 --- /dev/null +++ b/module/plugins/crypter/HotfileFolderCom.py @@ -0,0 +1,25 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +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.1" + __description__ = """HotfileFolder Download Plugin""" + __author_name__ = ("RaNaN") + __author_mail__ = ("RaNaN@pyload.org") + + def decrypt(self, pyfile): + html = self.load(pyfile.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 = [x[0] for x in new_links] + + self.packages.append((name, new_links, name))
\ No newline at end of file diff --git a/module/plugins/crypter/NetfolderIn.py b/module/plugins/crypter/NetfolderIn.py new file mode 100644 index 000000000..86777c61c --- /dev/null +++ b/module/plugins/crypter/NetfolderIn.py @@ -0,0 +1,25 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +import re + +from module.plugins.Crypter import Crypter + +class NetfolderIn(Crypter): + __name__ = "NetfolderIn" + __type__ = "crypter" + __pattern__ = r"http://(?:www\.)?netfolder.in/(\w+/\w+|folder.php)" + __version__ = "0.1" + __description__ = """NetFolder Download Plugin""" + __author_name__ = ("RaNaN") + __author_mail__ = ("RaNaN@pyload.org") + + def decrypt(self, pyfile): + html = self.load(pyfile.url) + + name = re.findall(r'<span style="color: #ff9000;">([^<]+)', html)[0] + new_links = re.findall(r'href="(http://.{0,3}netload\.in/(datei|index.php?id=10&file_id=)[^"]+)', html) + + new_links = [x[0] for x in new_links] + + self.packages.append((name, new_links, name))
\ No newline at end of file diff --git a/module/plugins/hoster/FileserveCom.py b/module/plugins/hoster/FileserveCom.py index 161c7bd9d..adf62434d 100644 --- a/module/plugins/hoster/FileserveCom.py +++ b/module/plugins/hoster/FileserveCom.py @@ -92,8 +92,7 @@ class FileserveCom(Hoster): self.load(self.pyfile.url, post={"downloadLink":"show"})
- header = self.load(self.pyfile.url, post={"download":"normal"}, just_header=True)
- print header #TODO remove
+ self.load(self.pyfile.url, post={"download":"normal"}, just_header=True)
self.download(self.pyfile.url, post={"download":"normal"})
|