From 0e1ef9bc01579328e17e79416fa3c1c7b77adcc8 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Mon, 8 Jun 2015 06:08:01 +0200 Subject: Update everything --- module/plugins/hoster/FilesMailRu.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'module/plugins/hoster/FilesMailRu.py') diff --git a/module/plugins/hoster/FilesMailRu.py b/module/plugins/hoster/FilesMailRu.py index 7bd099282..b24db62b0 100644 --- a/module/plugins/hoster/FilesMailRu.py +++ b/module/plugins/hoster/FilesMailRu.py @@ -3,8 +3,8 @@ import re from module.network.RequestFactory import getURL -from module.plugins.Hoster import Hoster -from module.plugins.Plugin import chunks +from module.plugins.internal.Hoster import Hoster +from module.plugins.internal.Plugin import chunks def getInfo(urls): @@ -32,7 +32,7 @@ def getInfo(urls): class FilesMailRu(Hoster): __name__ = "FilesMailRu" __type__ = "hoster" - __version__ = "0.32" + __version__ = "0.33" __pattern__ = r'http://(?:www\.)?files\.mail\.ru/.+' -- cgit v1.2.3 From 164512b6a74c94a731fcee7435dce1ccfa2f71e7 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Wed, 17 Jun 2015 18:29:50 +0200 Subject: Spare code cosmetics --- module/plugins/hoster/FilesMailRu.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'module/plugins/hoster/FilesMailRu.py') diff --git a/module/plugins/hoster/FilesMailRu.py b/module/plugins/hoster/FilesMailRu.py index b24db62b0..66f715962 100644 --- a/module/plugins/hoster/FilesMailRu.py +++ b/module/plugins/hoster/FilesMailRu.py @@ -70,19 +70,25 @@ class FilesMailRu(Hoster): def prepare(self): - """You have to wait some seconds. Otherwise you will get a 40Byte HTML Page instead of the file you expected""" + """ + 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""" + """ + 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('')[1].split('')[0] -- cgit v1.2.3 From 20b6a2ec022202b0efb6cb69415239fb8f4d1445 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Wed, 17 Jun 2015 18:59:20 +0200 Subject: Spare code cosmetics (2) --- module/plugins/hoster/FilesMailRu.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'module/plugins/hoster/FilesMailRu.py') diff --git a/module/plugins/hoster/FilesMailRu.py b/module/plugins/hoster/FilesMailRu.py index 66f715962..f93281702 100644 --- a/module/plugins/hoster/FilesMailRu.py +++ b/module/plugins/hoster/FilesMailRu.py @@ -24,8 +24,8 @@ def getInfo(urls): except Exception: pass - # status 1=OFFLINE, 2=OK, 3=UNKNOWN - # result.append((#name,#size,#status,#url)) + #: status 1=OFFLINE, 2=OK, 3=UNKNOWN + #: result.append((#name,#size,#status,#url)) yield result @@ -93,16 +93,16 @@ class FilesMailRu(Hoster): 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" - # then the download will be restarted. It's only bad for these - # who want download a HTML-File (it's one in a million ;-) ) + #: 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" + #: then the download will be restarted. It's only bad for these + #: who want download a HTML-File (it's one in a million ;-) ) # - # The maximum UploadSize allowed on files.mail.ru at the moment is 100MB - # so i set it to check every download because sometimes there are downloads - # that contain the HTML-Text and 60MB ZEROs after that in a xyzfile.part1.rar file - # (Loading 100MB in to ram is not an option) + #: The maximum UploadSize allowed on files.mail.ru at the moment is 100MB + #: so i set it to check every download because sometimes there are downloads + #: that contain the HTML-Text and 60MB ZEROs after that in a xyzfile.part1.rar file + #: (Loading 100MB in to ram is not an option) check = self.checkDownload({"html": " Date: Tue, 7 Jul 2015 01:23:55 +0200 Subject: No camelCase style anymore --- module/plugins/hoster/FilesMailRu.py | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'module/plugins/hoster/FilesMailRu.py') diff --git a/module/plugins/hoster/FilesMailRu.py b/module/plugins/hoster/FilesMailRu.py index f93281702..71ef231b1 100644 --- a/module/plugins/hoster/FilesMailRu.py +++ b/module/plugins/hoster/FilesMailRu.py @@ -7,7 +7,7 @@ from module.plugins.internal.Hoster import Hoster from module.plugins.internal.Plugin import chunks -def getInfo(urls): +def get_info(urls): result = [] for chunk in chunks(urls, 10): for url in chunk: @@ -32,7 +32,7 @@ def getInfo(urls): class FilesMailRu(Hoster): __name__ = "FilesMailRu" __type__ = "hoster" - __version__ = "0.33" + __version__ = "0.34" __pattern__ = r'http://(?:www\.)?files\.mail\.ru/.+' @@ -42,57 +42,57 @@ class FilesMailRu(Hoster): def setup(self): - self.multiDL = bool(self.account) + self.multi_dl = bool(self.account) def process(self, pyfile): self.html = self.load(pyfile.url) self.url_pattern = '(.+?)' - #marks the file as "offline" when the pattern was found on the html-page''' + # marks the file as "offline" when the pattern was found on the html-page''' if r'
' in self.html: self.offline() elif r'Page cannot be displayed' in self.html: self.offline() - #the filename that will be showed in the list (e.g. test.part1.rar)''' - pyfile.name = self.getFileName() + # the filename that will be showed in the list (e.g. test.part1.rar)''' + pyfile.name = self.get_file_name() - #prepare and download''' + # prepare and download''' if not self.account: self.prepare() - self.download(self.getFileUrl()) - self.myPostProcess() + self.download(self.get_file_url()) + self.my_post_process() else: - self.download(self.getFileUrl()) - self.myPostProcess() + self.download(self.get_file_url()) + self.my_post_process() 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.set_wait(10) self.wait() return True - def getFileUrl(self): + def get_file_url(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('')[1].split('')[0] - def myPostProcess(self): + def my_post_process(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" @@ -103,9 +103,9 @@ class FilesMailRu(Hoster): #: so i set it to check every download because sometimes there are downloads #: that contain the HTML-Text and 60MB ZEROs after that in a xyzfile.part1.rar file #: (Loading 100MB in to ram is not an option) - check = self.checkDownload({"html": " Date: Sat, 18 Jul 2015 20:04:36 +0200 Subject: Code cosmetics --- module/plugins/hoster/FilesMailRu.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'module/plugins/hoster/FilesMailRu.py') diff --git a/module/plugins/hoster/FilesMailRu.py b/module/plugins/hoster/FilesMailRu.py index 71ef231b1..df6b8a2ad 100644 --- a/module/plugins/hoster/FilesMailRu.py +++ b/module/plugins/hoster/FilesMailRu.py @@ -2,7 +2,7 @@ import re -from module.network.RequestFactory import getURL +from module.network.RequestFactory import getURL as get_url from module.plugins.internal.Hoster import Hoster from module.plugins.internal.Plugin import chunks @@ -11,7 +11,7 @@ def get_info(urls): result = [] for chunk in chunks(urls, 10): for url in chunk: - html = getURL(url) + html = get_url(url) if r'
' in html: result.append((url, 0, 1, url)) elif r'Page cannot be displayed' in html: @@ -73,8 +73,7 @@ class FilesMailRu(Hoster): """ You have to wait some seconds. Otherwise you will get a 40Byte HTML Page instead of the file you expected """ - self.set_wait(10) - self.wait() + self.wait(10) return True -- cgit v1.2.3 From dad722ac7255640e7e0541c4094a4d2e4de79cd3 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 19 Jul 2015 00:05:58 +0200 Subject: Code cosmetics (2) --- module/plugins/hoster/FilesMailRu.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'module/plugins/hoster/FilesMailRu.py') diff --git a/module/plugins/hoster/FilesMailRu.py b/module/plugins/hoster/FilesMailRu.py index df6b8a2ad..dfd4372a5 100644 --- a/module/plugins/hoster/FilesMailRu.py +++ b/module/plugins/hoster/FilesMailRu.py @@ -49,17 +49,17 @@ class FilesMailRu(Hoster): self.html = self.load(pyfile.url) self.url_pattern = '(.+?)' - # marks the file as "offline" when the pattern was found on the html-page''' + #: Marks the file as "offline" when the pattern was found on the html-page''' if r'
' in self.html: self.offline() elif r'Page cannot be displayed' in self.html: self.offline() - # the filename that will be showed in the list (e.g. test.part1.rar)''' + #: The filename that will be showed in the list (e.g. test.part1.rar)''' pyfile.name = self.get_file_name() - # prepare and download''' + #: Prepare and download''' if not self.account: self.prepare() self.download(self.get_file_url()) @@ -92,7 +92,7 @@ class FilesMailRu(Hoster): def my_post_process(self): - #: searches the file for HTMl-Code. Sometimes the Redirect + #: 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" #: then the download will be restarted. It's only bad for these -- cgit v1.2.3 From ff9383bfe06d14d23bc0ed6af79aa8967965d078 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 19 Jul 2015 10:59:52 +0200 Subject: Code cosmetics (3) --- module/plugins/hoster/FilesMailRu.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hoster/FilesMailRu.py') diff --git a/module/plugins/hoster/FilesMailRu.py b/module/plugins/hoster/FilesMailRu.py index dfd4372a5..76462d321 100644 --- a/module/plugins/hoster/FilesMailRu.py +++ b/module/plugins/hoster/FilesMailRu.py @@ -102,7 +102,7 @@ class FilesMailRu(Hoster): #: so i set it to check every download because sometimes there are downloads #: that contain the HTML-Text and 60MB ZEROs after that in a xyzfile.part1.rar file #: (Loading 100MB in to ram is not an option) - check = self.check_download({"html": " Date: Sun, 19 Jul 2015 14:43:42 +0200 Subject: New __status__ magic key --- module/plugins/hoster/FilesMailRu.py | 1 + 1 file changed, 1 insertion(+) (limited to 'module/plugins/hoster/FilesMailRu.py') diff --git a/module/plugins/hoster/FilesMailRu.py b/module/plugins/hoster/FilesMailRu.py index 76462d321..4a5e5f017 100644 --- a/module/plugins/hoster/FilesMailRu.py +++ b/module/plugins/hoster/FilesMailRu.py @@ -33,6 +33,7 @@ class FilesMailRu(Hoster): __name__ = "FilesMailRu" __type__ = "hoster" __version__ = "0.34" + __status__ = "stable" __pattern__ = r'http://(?:www\.)?files\.mail\.ru/.+' -- cgit v1.2.3 From 94d017cd2a5c1f194960827a8c7e46afc3682008 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 24 Jul 2015 06:55:49 +0200 Subject: Hotfixes (2) --- module/plugins/hoster/FilesMailRu.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/hoster/FilesMailRu.py') diff --git a/module/plugins/hoster/FilesMailRu.py b/module/plugins/hoster/FilesMailRu.py index 4a5e5f017..b3dbcbeb4 100644 --- a/module/plugins/hoster/FilesMailRu.py +++ b/module/plugins/hoster/FilesMailRu.py @@ -33,7 +33,7 @@ class FilesMailRu(Hoster): __name__ = "FilesMailRu" __type__ = "hoster" __version__ = "0.34" - __status__ = "stable" + __status__ = "testing" __pattern__ = r'http://(?:www\.)?files\.mail\.ru/.+' @@ -43,7 +43,7 @@ class FilesMailRu(Hoster): def setup(self): - self.multi_dl = bool(self.account) + self.multiDL = bool(self.account) def process(self, pyfile): -- cgit v1.2.3 From 761ca5c66e07559925ebbdbc6531f9ca658b12ce Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 24 Jul 2015 16:11:58 +0200 Subject: Code cosmetics --- module/plugins/hoster/FilesMailRu.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hoster/FilesMailRu.py') diff --git a/module/plugins/hoster/FilesMailRu.py b/module/plugins/hoster/FilesMailRu.py index b3dbcbeb4..a6dd56152 100644 --- a/module/plugins/hoster/FilesMailRu.py +++ b/module/plugins/hoster/FilesMailRu.py @@ -99,7 +99,7 @@ class FilesMailRu(Hoster): #: then the download will be restarted. It's only bad for these #: who want download a HTML-File (it's one in a million ;-) ) # - #: The maximum UploadSize allowed on files.mail.ru at the moment is 100MB + #: The maximum UploadSize allowed on files.mail.ru at the moment == 100MB #: so i set it to check every download because sometimes there are downloads #: that contain the HTML-Text and 60MB ZEROs after that in a xyzfile.part1.rar file #: (Loading 100MB in to ram is not an option) -- cgit v1.2.3