From 5060e4c6374a5116d0d8b02528f910f8c5f8bcf9 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 15 Jul 2014 16:25:41 +0200 Subject: Fix code indentation, some bad whitespaces and missing authors + use 'not' instead 'is None' + replace __pattern__'s r" with r' + other minor cosmetics --- module/plugins/hoster/RedtubeCom.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'module/plugins/hoster/RedtubeCom.py') diff --git a/module/plugins/hoster/RedtubeCom.py b/module/plugins/hoster/RedtubeCom.py index a2bbf3883..465803a1c 100644 --- a/module/plugins/hoster/RedtubeCom.py +++ b/module/plugins/hoster/RedtubeCom.py @@ -29,7 +29,7 @@ class RedtubeCom(Hoster): def get_file_url(self): """ returns the absolute downloadable filepath """ - if self.html is None: + if not self.html: self.download_html() file_url = unescape(re.search(r'hashlink=(http.*?)"', self.html).group(1)) @@ -37,7 +37,7 @@ class RedtubeCom(Hoster): return file_url def get_file_name(self): - if self.html is None: + if not self.html: self.download_html() name = re.search('(.*?)- RedTube - Free Porn Videos', self.html).group(1).strip() + ".flv" @@ -46,7 +46,7 @@ class RedtubeCom(Hoster): def file_exists(self): """ returns True or False """ - if self.html is None: + if not self.html: self.download_html() if re.search(r'This video has been removed.', self.html) is not None: -- cgit v1.2.3 From 05d258d98dd8c2faf0b769840fa1e3c4acccdce8 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 20 Jul 2014 03:25:14 +0200 Subject: Fix and improve 5060e4c6374a5116d0d8b02528f910f8c5f8bcf9 --- module/plugins/hoster/RedtubeCom.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'module/plugins/hoster/RedtubeCom.py') diff --git a/module/plugins/hoster/RedtubeCom.py b/module/plugins/hoster/RedtubeCom.py index 465803a1c..d9cb6489a 100644 --- a/module/plugins/hoster/RedtubeCom.py +++ b/module/plugins/hoster/RedtubeCom.py @@ -40,8 +40,7 @@ class RedtubeCom(Hoster): if not self.html: self.download_html() - name = re.search('(.*?)- RedTube - Free Porn Videos', self.html).group(1).strip() + ".flv" - return name + return re.search('(.*?)- RedTube - Free Porn Videos', self.html).group(1).strip() + ".flv" def file_exists(self): """ returns True or False -- cgit v1.2.3 From ba916633f2bedb04c7358000b91aed69f52e8e43 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 1 Aug 2014 19:35:59 +0200 Subject: Remove trailing whitespaces + remove license headers + import urllib methods directly + sort and fix key attributes + use save_join instead join + sort some import declarations + other minor code cosmetics --- module/plugins/hoster/RedtubeCom.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'module/plugins/hoster/RedtubeCom.py') diff --git a/module/plugins/hoster/RedtubeCom.py b/module/plugins/hoster/RedtubeCom.py index d9cb6489a..bdb948d6d 100644 --- a/module/plugins/hoster/RedtubeCom.py +++ b/module/plugins/hoster/RedtubeCom.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- import re + from module.plugins.Hoster import Hoster from module.unescape import unescape @@ -8,12 +9,15 @@ from module.unescape import unescape class RedtubeCom(Hoster): __name__ = "RedtubeCom" __type__ = "hoster" - __pattern__ = r'http://(?:www\.)?redtube\.com/\d+' __version__ = "0.2" + + __pattern__ = r'http://(?:www\.)?redtube\.com/\d+' + __description__ = """Redtube.com hoster plugin""" __author_name__ = "jeix" __author_mail__ = "jeix@hasnomail.de" + def process(self, pyfile): self.download_html() if not self.file_exists(): -- cgit v1.2.3 From b0868ae6446078bacf1635dde5e4ab316b4a94cb Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 7 Oct 2014 18:57:59 +0200 Subject: New __authors__ key replaces __author_name__ and __author_mail__ + Whitespaces and EOF fixup --- module/plugins/hoster/RedtubeCom.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'module/plugins/hoster/RedtubeCom.py') diff --git a/module/plugins/hoster/RedtubeCom.py b/module/plugins/hoster/RedtubeCom.py index bdb948d6d..1e1df902d 100644 --- a/module/plugins/hoster/RedtubeCom.py +++ b/module/plugins/hoster/RedtubeCom.py @@ -14,8 +14,7 @@ class RedtubeCom(Hoster): __pattern__ = r'http://(?:www\.)?redtube\.com/\d+' __description__ = """Redtube.com hoster plugin""" - __author_name__ = "jeix" - __author_mail__ = "jeix@hasnomail.de" + __authors__ = [("jeix", "jeix@hasnomail.de")] def process(self, pyfile): -- cgit v1.2.3 From ae7a7e66981456e5bbe2b54006d79b6f907be7a4 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Wed, 8 Oct 2014 20:18:13 +0200 Subject: Add __license__ key attribute to plugins --- module/plugins/hoster/RedtubeCom.py | 1 + 1 file changed, 1 insertion(+) (limited to 'module/plugins/hoster/RedtubeCom.py') diff --git a/module/plugins/hoster/RedtubeCom.py b/module/plugins/hoster/RedtubeCom.py index 1e1df902d..f8ac81693 100644 --- a/module/plugins/hoster/RedtubeCom.py +++ b/module/plugins/hoster/RedtubeCom.py @@ -14,6 +14,7 @@ class RedtubeCom(Hoster): __pattern__ = r'http://(?:www\.)?redtube\.com/\d+' __description__ = """Redtube.com hoster plugin""" + __license__ = "GPLv3" __authors__ = [("jeix", "jeix@hasnomail.de")] -- cgit v1.2.3 From 0eb6e7ec4a1144dcca824d8add049787d3da1762 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Wed, 22 Oct 2014 19:44:59 +0200 Subject: Two space before function declaration --- module/plugins/hoster/RedtubeCom.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'module/plugins/hoster/RedtubeCom.py') diff --git a/module/plugins/hoster/RedtubeCom.py b/module/plugins/hoster/RedtubeCom.py index f8ac81693..d136d145b 100644 --- a/module/plugins/hoster/RedtubeCom.py +++ b/module/plugins/hoster/RedtubeCom.py @@ -26,10 +26,12 @@ class RedtubeCom(Hoster): pyfile.name = self.get_file_name() self.download(self.get_file_url()) + def download_html(self): url = self.pyfile.url self.html = self.load(url) + def get_file_url(self): """ returns the absolute downloadable filepath """ @@ -40,12 +42,14 @@ class RedtubeCom(Hoster): return file_url + def get_file_name(self): if not self.html: self.download_html() return re.search('(.*?)- RedTube - Free Porn Videos', self.html).group(1).strip() + ".flv" + def file_exists(self): """ returns True or False """ -- cgit v1.2.3 From 34984dae733c3f3d47b41a0acfba3724d53c65a1 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 28 Oct 2014 16:52:10 +0100 Subject: Code cosmetics: plugin class attributes --- module/plugins/hoster/RedtubeCom.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'module/plugins/hoster/RedtubeCom.py') diff --git a/module/plugins/hoster/RedtubeCom.py b/module/plugins/hoster/RedtubeCom.py index d136d145b..5bf624273 100644 --- a/module/plugins/hoster/RedtubeCom.py +++ b/module/plugins/hoster/RedtubeCom.py @@ -7,15 +7,15 @@ from module.unescape import unescape class RedtubeCom(Hoster): - __name__ = "RedtubeCom" - __type__ = "hoster" + __name__ = "RedtubeCom" + __type__ = "hoster" __version__ = "0.2" __pattern__ = r'http://(?:www\.)?redtube\.com/\d+' __description__ = """Redtube.com hoster plugin""" - __license__ = "GPLv3" - __authors__ = [("jeix", "jeix@hasnomail.de")] + __license__ = "GPLv3" + __authors__ = [("jeix", "jeix@hasnomail.de")] def process(self, pyfile): -- cgit v1.2.3 From 6151e81fa0b325dffda3da4228d5821e73db3ef3 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 9 Dec 2014 01:19:46 +0100 Subject: Fix __version__ format in some plugins --- module/plugins/hoster/RedtubeCom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hoster/RedtubeCom.py') diff --git a/module/plugins/hoster/RedtubeCom.py b/module/plugins/hoster/RedtubeCom.py index 5bf624273..d68fbe262 100644 --- a/module/plugins/hoster/RedtubeCom.py +++ b/module/plugins/hoster/RedtubeCom.py @@ -9,7 +9,7 @@ from module.unescape import unescape class RedtubeCom(Hoster): __name__ = "RedtubeCom" __type__ = "hoster" - __version__ = "0.2" + __version__ = "0.20" __pattern__ = r'http://(?:www\.)?redtube\.com/\d+' -- cgit v1.2.3