summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster/FilesMailRu.py
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-03-10 17:27:42 +0100
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-03-10 17:27:42 +0100
commitba4b5586168a8c1111ca071ca4acca1739bdba84 (patch)
tree08148a62f461099dbd19d81e0b12769d9849e262 /module/plugins/hoster/FilesMailRu.py
parentlittle fix (diff)
downloadpyload-ba4b5586168a8c1111ca071ca4acca1739bdba84.tar.xz
closed #257, files.mail.ru premium
Diffstat (limited to 'module/plugins/hoster/FilesMailRu.py')
-rw-r--r--module/plugins/hoster/FilesMailRu.py21
1 files changed, 12 insertions, 9 deletions
diff --git a/module/plugins/hoster/FilesMailRu.py b/module/plugins/hoster/FilesMailRu.py
index ff6cb76a9..6002ab3dc 100644
--- a/module/plugins/hoster/FilesMailRu.py
+++ b/module/plugins/hoster/FilesMailRu.py
@@ -39,9 +39,9 @@ class FilesMailRu(Hoster):
def setup(self):
- self.multiDL = True
- self.resumeDownload = True
- self.chunkLimit = 1
+ if not self.account:
+ self.multiDL = False
+ self.chunkLimit = 1
def process(self, pyfile):
self.html = self.load(pyfile.url)
@@ -58,10 +58,13 @@ class FilesMailRu(Hoster):
pyfile.name = self.getFileName()
#prepare and download'''
- self.prepare()
- self.download(self.getFileUrl())
- self.myPostProcess(pyfile.name)
-
+ if not self.account:
+ self.prepare()
+ self.download(self.getFileUrl())
+ self.myPostProcess()
+ else:
+ self.download(self.getFileUrl())
+ self.myPostProcess()
def prepare(self):
'''You have to wait some seconds. Otherwise you will get a 40Byte HTML Page instead of the file you expected'''
@@ -80,7 +83,7 @@ class FilesMailRu(Hoster):
file_name = re.search(self.url_pattern, self.html).group(0).split(', event)">')[1].split('</a>')[0]
return file_name
- def myPostProcess(self,filename):
+ def myPostProcess(self):
# searches the file for HTMl-Code. Sometimes the Redirect
# doesn't work (maybe a curl Problem) and you get only a small
# HTML file and the Download is marked as "finished"
@@ -93,5 +96,5 @@ class FilesMailRu(Hoster):
# (Loading 100MB in to ram is not an option)
check = self.checkDownload({"html": "<meta name="}, read_size=50000)
if check == "html":
- self.log.info(_("There was HTML Code in the Downloaded File("+ filename +")...redirect error? The Download will be restarted."))
+ self.log.info(_("There was HTML Code in the Downloaded File("+ pyfile.name +")...redirect error? The Download will be restarted."))
self.retry()