diff options
Diffstat (limited to 'module/plugins/hoster/FilesMailRu.py')
-rw-r--r-- | module/plugins/hoster/FilesMailRu.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/module/plugins/hoster/FilesMailRu.py b/module/plugins/hoster/FilesMailRu.py index 2889e0565..cd8069efc 100644 --- a/module/plugins/hoster/FilesMailRu.py +++ b/module/plugins/hoster/FilesMailRu.py @@ -45,6 +45,7 @@ class FilesMailRu(Hoster): if not self.account: self.multiDL = False + def process(self, pyfile): self.html = self.load(pyfile.url) self.url_pattern = '<a href="(.+?)" onclick="return Act\(this\, \'dlink\'\, event\)">(.+?)</a>' @@ -68,20 +69,24 @@ class FilesMailRu(Hoster): 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""" self.setWait(10) self.wait() return True + def getFileUrl(self): """gives you the URL to the file. Extracted from the Files.mail.ru HTML-page stored in self.html""" return re.search(self.url_pattern, self.html).group(0).split('<a href="')[1].split('" onclick="return Act')[0] + def getFileName(self): """gives you the Name for each file. Also extracted from the HTML-Page""" return re.search(self.url_pattern, self.html).group(0).split(', event)">')[1].split('</a>')[0] + 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 |