diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2010-09-20 17:27:26 +0200 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2010-09-20 17:27:26 +0200 |
commit | 9808c90314ded2d8bdaab636eb5ea750b4fa6aa9 (patch) | |
tree | b2fbbcefc1453f24090f1b18d813472baee10edb /module/plugins/hoster/FileserveCom.py | |
parent | new tmp folder for unrar (diff) | |
download | pyload-9808c90314ded2d8bdaab636eb5ea750b4fa6aa9.tar.xz |
little fixes
Diffstat (limited to 'module/plugins/hoster/FileserveCom.py')
-rw-r--r-- | module/plugins/hoster/FileserveCom.py | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/module/plugins/hoster/FileserveCom.py b/module/plugins/hoster/FileserveCom.py index adf62434d..c2deb3751 100644 --- a/module/plugins/hoster/FileserveCom.py +++ b/module/plugins/hoster/FileserveCom.py @@ -2,6 +2,7 @@ import re
+from os import stat
from os.path import join
from module.plugins.Hoster import Hoster
@@ -93,7 +94,21 @@ class FileserveCom(Hoster): self.load(self.pyfile.url, post={"downloadLink":"show"})
self.load(self.pyfile.url, post={"download":"normal"}, just_header=True)
- self.download(self.pyfile.url, post={"download":"normal"})
+ dl = self.download(self.pyfile.url, post={"download":"normal"})
+
+ size = stat(dl)
+ size = size.st_size
+
+ if size < 40000:
+ f = open(dl, "rb")
+ content = f.read()
+ m = re.search(r'<html>', content)
+ if m is not None:
+ self.setWait(720)
+ self.wantReconnect = True
+ self.wait()
+ self.handleFree()
+ return
#TODO: validate download it could be html file with errors
|