diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-09-17 23:07:29 +0200 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-09-17 23:07:29 +0200 |
commit | c881365c4453b354c06020cc218da1c3a0ba063f (patch) | |
tree | bcdbdefb69051c5a6df6403121e6e1e2c49f03aa /module | |
parent | fixes one of last commits (diff) | |
download | pyload-c881365c4453b354c06020cc218da1c3a0ba063f.tar.xz |
detect invalid downloads on fileserv
Diffstat (limited to 'module')
-rw-r--r-- | module/PluginThread.py | 5 | ||||
-rw-r--r-- | module/plugins/hoster/FileserveCom.py | 10 |
2 files changed, 10 insertions, 5 deletions
diff --git a/module/PluginThread.py b/module/PluginThread.py index e732d07fa..269500081 100644 --- a/module/PluginThread.py +++ b/module/PluginThread.py @@ -56,10 +56,9 @@ class PluginThread(Thread): dump = self.getDebugDump(pyfile) try: - dump_name += ".zip" - import zipfile + dump_name += ".zip" zip = zipfile.ZipFile(dump_name, "w") for f in listdir(join("tmp", pyfile.pluginname)): @@ -69,7 +68,7 @@ class PluginThread(Thread): except: pass - zip.writestr(save_join(pyfile.pluginname, "debug_Report.txt"), dump_name) + zip.writestr(save_join(pyfile.pluginname, "debug_Report.txt"), dump) zip.close() diff --git a/module/plugins/hoster/FileserveCom.py b/module/plugins/hoster/FileserveCom.py index 1ee19b00c..50470c3aa 100644 --- a/module/plugins/hoster/FileserveCom.py +++ b/module/plugins/hoster/FileserveCom.py @@ -34,7 +34,7 @@ class FileserveCom(Hoster): __name__ = "FileserveCom"
__type__ = "hoster"
__pattern__ = r"http://(www\.)?fileserve\.com/file/[a-zA-Z0-9]+"
- __version__ = "0.42"
+ __version__ = "0.43"
__description__ = """Fileserve.Com File Download Hoster"""
__author_name__ = ("jeix", "mkaay", "paul king")
__author_mail__ = ("jeix@hasnomail.de", "mkaay@mkaay.de", "")
@@ -80,9 +80,15 @@ class FileserveCom(Hoster): def handlePremium(self):
- # handle login timeouts
+ # TODO: handle login timeouts
self.download(self.pyfile.url)
+ check = self.checkDownload({"login" : '<form action="/login.php" method="POST">'})
+
+ if check == "login":
+ self.retry(reason=_("Not logged in."))
+
+
def handleFree(self):
self.html = self.load(self.pyfile.url)
action = self.load(self.pyfile.url, post={"checkDownload": "check"}, decode=True)
|