From 93592862b520a862c01f80c019e5c4bc43746c19 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 5 Jul 2014 16:54:20 +0200 Subject: [SimpleHoster] Better inline docs + changed "FILE_OFFLINE_PATTERN" to "OFFLINE_PATTERN" --- module/plugins/hoster/HellshareCz.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hoster/HellshareCz.py') diff --git a/module/plugins/hoster/HellshareCz.py b/module/plugins/hoster/HellshareCz.py index 91e51e314..c407c21f2 100644 --- a/module/plugins/hoster/HellshareCz.py +++ b/module/plugins/hoster/HellshareCz.py @@ -32,7 +32,7 @@ class HellshareCz(SimpleHoster): FILE_NAME_PATTERN = r'

]*>(?P[^<]+)

' FILE_SIZE_PATTERN = r'(?P[0-9.]*) (?P[kKMG])i?B' - FILE_OFFLINE_PATTERN = r'

File not found.

' + OFFLINE_PATTERN = r'

File not found.

' SHOW_WINDOW_PATTERN = r' Date: Mon, 14 Jul 2014 02:23:37 +0200 Subject: Removed all @author flags + key attributes cleanup for internal & hooks plugins --- module/plugins/hoster/HellshareCz.py | 2 -- 1 file changed, 2 deletions(-) (limited to 'module/plugins/hoster/HellshareCz.py') diff --git a/module/plugins/hoster/HellshareCz.py b/module/plugins/hoster/HellshareCz.py index c407c21f2..17996e33a 100644 --- a/module/plugins/hoster/HellshareCz.py +++ b/module/plugins/hoster/HellshareCz.py @@ -13,8 +13,6 @@ You should have received a copy of the GNU General Public License along with this program; if not, see . - - @author: zoidberg """ import re -- 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/HellshareCz.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hoster/HellshareCz.py') diff --git a/module/plugins/hoster/HellshareCz.py b/module/plugins/hoster/HellshareCz.py index 17996e33a..e4b508930 100644 --- a/module/plugins/hoster/HellshareCz.py +++ b/module/plugins/hoster/HellshareCz.py @@ -47,7 +47,7 @@ class HellshareCz(SimpleHoster): self.fail("Not enough traffic left for user %s." % self.user) found = re.search(self.SHOW_WINDOW_PATTERN, self.html) - if not found: + if found is None: self.parseError('SHOW WINDOW') self.url = "http://www.hellshare.com" + found.group(1) self.logDebug("DOWNLOAD URL: " + self.url) -- cgit v1.2.3 From 9395182da7afed55a29bde1c7cbefe4204e783f0 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 20 Jul 2014 03:02:09 +0200 Subject: Store all re.search/match object as "m" instead "found" --- module/plugins/hoster/HellshareCz.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'module/plugins/hoster/HellshareCz.py') diff --git a/module/plugins/hoster/HellshareCz.py b/module/plugins/hoster/HellshareCz.py index e4b508930..54f931eb2 100644 --- a/module/plugins/hoster/HellshareCz.py +++ b/module/plugins/hoster/HellshareCz.py @@ -46,10 +46,10 @@ class HellshareCz(SimpleHoster): if not self.checkTrafficLeft(): self.fail("Not enough traffic left for user %s." % self.user) - found = re.search(self.SHOW_WINDOW_PATTERN, self.html) - if found is None: + m = re.search(self.SHOW_WINDOW_PATTERN, self.html) + if m is None: self.parseError('SHOW WINDOW') - self.url = "http://www.hellshare.com" + found.group(1) + self.url = "http://www.hellshare.com" + m.group(1) self.logDebug("DOWNLOAD URL: " + self.url) self.download(self.url) -- 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/HellshareCz.py | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) (limited to 'module/plugins/hoster/HellshareCz.py') diff --git a/module/plugins/hoster/HellshareCz.py b/module/plugins/hoster/HellshareCz.py index 54f931eb2..239d90f46 100644 --- a/module/plugins/hoster/HellshareCz.py +++ b/module/plugins/hoster/HellshareCz.py @@ -1,29 +1,17 @@ # -*- coding: utf-8 -*- -""" - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, - or (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, see . -""" - import re + from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class HellshareCz(SimpleHoster): __name__ = "HellshareCz" __type__ = "hoster" - __pattern__ = r'(http://(?:www\.)?hellshare\.(?:cz|com|sk|hu|pl)/[^?]*/\d+).*' __version__ = "0.82" + + __pattern__ = r'(http://(?:www\.)?hellshare\.(?:cz|com|sk|hu|pl)/[^?]*/\d+).*' + __description__ = """Hellshare.cz hoster plugin""" __author_name__ = "zoidberg" __author_mail__ = "zoidberg@mujmail.cz" @@ -33,6 +21,7 @@ class HellshareCz(SimpleHoster): OFFLINE_PATTERN = r'

File not found.

' SHOW_WINDOW_PATTERN = r'
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/HellshareCz.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/hoster/HellshareCz.py') diff --git a/module/plugins/hoster/HellshareCz.py b/module/plugins/hoster/HellshareCz.py index 239d90f46..28df168c2 100644 --- a/module/plugins/hoster/HellshareCz.py +++ b/module/plugins/hoster/HellshareCz.py @@ -13,8 +13,8 @@ class HellshareCz(SimpleHoster): __pattern__ = r'(http://(?:www\.)?hellshare\.(?:cz|com|sk|hu|pl)/[^?]*/\d+).*' __description__ = """Hellshare.cz hoster plugin""" - __author_name__ = "zoidberg" - __author_mail__ = "zoidberg@mujmail.cz" + __authors__ = [("zoidberg", "zoidberg@mujmail.cz")] + FILE_NAME_PATTERN = r'

]*>(?P[^<]+)

' FILE_SIZE_PATTERN = r'(?P[0-9.]*) (?P[kKMG])i?B' -- 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/HellshareCz.py | 1 + 1 file changed, 1 insertion(+) (limited to 'module/plugins/hoster/HellshareCz.py') diff --git a/module/plugins/hoster/HellshareCz.py b/module/plugins/hoster/HellshareCz.py index 28df168c2..0661ea70c 100644 --- a/module/plugins/hoster/HellshareCz.py +++ b/module/plugins/hoster/HellshareCz.py @@ -13,6 +13,7 @@ class HellshareCz(SimpleHoster): __pattern__ = r'(http://(?:www\.)?hellshare\.(?:cz|com|sk|hu|pl)/[^?]*/\d+).*' __description__ = """Hellshare.cz hoster plugin""" + __license__ = "GPLv3" __authors__ = [("zoidberg", "zoidberg@mujmail.cz")] -- cgit v1.2.3 From f76e5c2336718dca9da8033ba22cd83c72c7b3b3 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 11 Oct 2014 15:14:28 +0200 Subject: Pattern update 1 --- module/plugins/hoster/HellshareCz.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hoster/HellshareCz.py') diff --git a/module/plugins/hoster/HellshareCz.py b/module/plugins/hoster/HellshareCz.py index 0661ea70c..a22ed6926 100644 --- a/module/plugins/hoster/HellshareCz.py +++ b/module/plugins/hoster/HellshareCz.py @@ -18,7 +18,7 @@ class HellshareCz(SimpleHoster): FILE_NAME_PATTERN = r'

]*>(?P[^<]+)

' - FILE_SIZE_PATTERN = r'(?P[0-9.]*) (?P[kKMG])i?B' + FILE_SIZE_PATTERN = r'(?P[\d.]*) (?P\w+)' OFFLINE_PATTERN = r'

File not found.

' SHOW_WINDOW_PATTERN = r'
Date: Sat, 11 Oct 2014 15:09:53 +0200 Subject: Pattern update 2 --- module/plugins/hoster/HellshareCz.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hoster/HellshareCz.py') diff --git a/module/plugins/hoster/HellshareCz.py b/module/plugins/hoster/HellshareCz.py index a22ed6926..00fc17fba 100644 --- a/module/plugins/hoster/HellshareCz.py +++ b/module/plugins/hoster/HellshareCz.py @@ -18,7 +18,7 @@ class HellshareCz(SimpleHoster): FILE_NAME_PATTERN = r'

]*>(?P[^<]+)

' - FILE_SIZE_PATTERN = r'(?P[\d.]*) (?P\w+)' + FILE_SIZE_PATTERN = r'(?P[\d.,]+) (?P\w+)' OFFLINE_PATTERN = r'

File not found.

' SHOW_WINDOW_PATTERN = r'
Date: Tue, 14 Oct 2014 13:38:49 +0200 Subject: Improve unit detection in size pattern --- module/plugins/hoster/HellshareCz.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hoster/HellshareCz.py') diff --git a/module/plugins/hoster/HellshareCz.py b/module/plugins/hoster/HellshareCz.py index 00fc17fba..ddb7682b1 100644 --- a/module/plugins/hoster/HellshareCz.py +++ b/module/plugins/hoster/HellshareCz.py @@ -18,7 +18,7 @@ class HellshareCz(SimpleHoster): FILE_NAME_PATTERN = r'

]*>(?P[^<]+)

' - FILE_SIZE_PATTERN = r'(?P[\d.,]+) (?P\w+)' + FILE_SIZE_PATTERN = r'(?P[\d.,]+) (?P[\w^_]+)' OFFLINE_PATTERN = r'

File not found.

' SHOW_WINDOW_PATTERN = r'
Date: Sun, 19 Oct 2014 14:52:42 +0200 Subject: Update hosters to self.error --- module/plugins/hoster/HellshareCz.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/hoster/HellshareCz.py') diff --git a/module/plugins/hoster/HellshareCz.py b/module/plugins/hoster/HellshareCz.py index ddb7682b1..10975829c 100644 --- a/module/plugins/hoster/HellshareCz.py +++ b/module/plugins/hoster/HellshareCz.py @@ -8,7 +8,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class HellshareCz(SimpleHoster): __name__ = "HellshareCz" __type__ = "hoster" - __version__ = "0.82" + __version__ = "0.83" __pattern__ = r'(http://(?:www\.)?hellshare\.(?:cz|com|sk|hu|pl)/[^?]*/\d+).*' @@ -38,7 +38,7 @@ class HellshareCz(SimpleHoster): m = re.search(self.SHOW_WINDOW_PATTERN, self.html) if m is None: - self.parseError('SHOW WINDOW') + self.error('SHOW WINDOW') self.url = "http://www.hellshare.com" + m.group(1) self.logDebug("DOWNLOAD URL: " + self.url) -- 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/HellshareCz.py | 1 + 1 file changed, 1 insertion(+) (limited to 'module/plugins/hoster/HellshareCz.py') diff --git a/module/plugins/hoster/HellshareCz.py b/module/plugins/hoster/HellshareCz.py index 10975829c..7a8579e78 100644 --- a/module/plugins/hoster/HellshareCz.py +++ b/module/plugins/hoster/HellshareCz.py @@ -27,6 +27,7 @@ class HellshareCz(SimpleHoster): self.resumeDownload = self.multiDL = True if self.account else False self.chunkLimit = 1 + def process(self, pyfile): if not self.account: self.fail("User not logged in") -- cgit v1.2.3 From 4da90891eb2544ac15a7d512aba8cb357f68ee5f Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 25 Oct 2014 01:11:29 +0200 Subject: Spare code cosmetics --- module/plugins/hoster/HellshareCz.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'module/plugins/hoster/HellshareCz.py') diff --git a/module/plugins/hoster/HellshareCz.py b/module/plugins/hoster/HellshareCz.py index 7a8579e78..8809da5ef 100644 --- a/module/plugins/hoster/HellshareCz.py +++ b/module/plugins/hoster/HellshareCz.py @@ -40,9 +40,8 @@ class HellshareCz(SimpleHoster): m = re.search(self.SHOW_WINDOW_PATTERN, self.html) if m is None: self.error('SHOW WINDOW') - self.url = "http://www.hellshare.com" + m.group(1) - self.logDebug("DOWNLOAD URL: " + self.url) + self.url = "http://www.hellshare.com" + m.group(1) self.download(self.url) -- cgit v1.2.3 From e3f5280529921100f48bb8a79853bf480c7611e4 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 25 Oct 2014 02:53:05 +0200 Subject: Replace single quotes with doubles in self.error and self.fail msg --- module/plugins/hoster/HellshareCz.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hoster/HellshareCz.py') diff --git a/module/plugins/hoster/HellshareCz.py b/module/plugins/hoster/HellshareCz.py index 8809da5ef..a5cea6b9f 100644 --- a/module/plugins/hoster/HellshareCz.py +++ b/module/plugins/hoster/HellshareCz.py @@ -39,7 +39,7 @@ class HellshareCz(SimpleHoster): m = re.search(self.SHOW_WINDOW_PATTERN, self.html) if m is None: - self.error('SHOW WINDOW') + self.error("SHOW WINDOW") self.url = "http://www.hellshare.com" + m.group(1) self.download(self.url) -- cgit v1.2.3 From 9f2ebe486a3e155fb6a60e07cccb77ab6a772eb2 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 26 Oct 2014 02:31:54 +0200 Subject: Extend translation support in plugins + a lot of code cosmetics and typo fixes --- module/plugins/hoster/HellshareCz.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'module/plugins/hoster/HellshareCz.py') diff --git a/module/plugins/hoster/HellshareCz.py b/module/plugins/hoster/HellshareCz.py index a5cea6b9f..44ca53c8a 100644 --- a/module/plugins/hoster/HellshareCz.py +++ b/module/plugins/hoster/HellshareCz.py @@ -30,16 +30,16 @@ class HellshareCz(SimpleHoster): def process(self, pyfile): if not self.account: - self.fail("User not logged in") + self.fail(_("User not logged in")) pyfile.url = re.match(self.__pattern__, pyfile.url).group(1) self.html = self.load(pyfile.url, decode=True) self.getFileInfo() if not self.checkTrafficLeft(): - self.fail("Not enough traffic left for user %s." % self.user) + self.fail(_("Not enough traffic left for user ") + self.user) m = re.search(self.SHOW_WINDOW_PATTERN, self.html) if m is None: - self.error("SHOW WINDOW") + self.error(_("SHOW_WINDOW_PATTERN not found")) self.url = "http://www.hellshare.com" + m.group(1) self.download(self.url) -- 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/HellshareCz.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'module/plugins/hoster/HellshareCz.py') diff --git a/module/plugins/hoster/HellshareCz.py b/module/plugins/hoster/HellshareCz.py index 44ca53c8a..7b3989e5a 100644 --- a/module/plugins/hoster/HellshareCz.py +++ b/module/plugins/hoster/HellshareCz.py @@ -6,15 +6,15 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class HellshareCz(SimpleHoster): - __name__ = "HellshareCz" - __type__ = "hoster" + __name__ = "HellshareCz" + __type__ = "hoster" __version__ = "0.83" __pattern__ = r'(http://(?:www\.)?hellshare\.(?:cz|com|sk|hu|pl)/[^?]*/\d+).*' __description__ = """Hellshare.cz hoster plugin""" - __license__ = "GPLv3" - __authors__ = [("zoidberg", "zoidberg@mujmail.cz")] + __license__ = "GPLv3" + __authors__ = [("zoidberg", "zoidberg@mujmail.cz")] FILE_NAME_PATTERN = r'

]*>(?P[^<]+)

' -- cgit v1.2.3 From 772e47ef806d18fd209e910be0535bce7c07dc7b Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 2 Nov 2014 22:47:07 +0100 Subject: Update all other plugins --- module/plugins/hoster/HellshareCz.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/hoster/HellshareCz.py') diff --git a/module/plugins/hoster/HellshareCz.py b/module/plugins/hoster/HellshareCz.py index 7b3989e5a..117749f89 100644 --- a/module/plugins/hoster/HellshareCz.py +++ b/module/plugins/hoster/HellshareCz.py @@ -17,8 +17,8 @@ class HellshareCz(SimpleHoster): __authors__ = [("zoidberg", "zoidberg@mujmail.cz")] - FILE_NAME_PATTERN = r'

]*>(?P[^<]+)

' - FILE_SIZE_PATTERN = r'(?P[\d.,]+) (?P[\w^_]+)' + NAME_PATTERN = r'

]*>(?P[^<]+)

' + SIZE_PATTERN = r'(?P[\d.,]+) (?P[\w^_]+)' OFFLINE_PATTERN = r'

File not found.

' SHOW_WINDOW_PATTERN = r'
Date: Sat, 27 Dec 2014 13:52:30 +0100 Subject: Improve a lot of plugin __pattern__ --- module/plugins/hoster/HellshareCz.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hoster/HellshareCz.py') diff --git a/module/plugins/hoster/HellshareCz.py b/module/plugins/hoster/HellshareCz.py index 117749f89..4b44cc335 100644 --- a/module/plugins/hoster/HellshareCz.py +++ b/module/plugins/hoster/HellshareCz.py @@ -10,7 +10,7 @@ class HellshareCz(SimpleHoster): __type__ = "hoster" __version__ = "0.83" - __pattern__ = r'(http://(?:www\.)?hellshare\.(?:cz|com|sk|hu|pl)/[^?]*/\d+).*' + __pattern__ = r'(http://(?:www\.)?hellshare\.(?:cz|com|sk|hu|pl)/[^?]*/\d+)' __description__ = """Hellshare.cz hoster plugin""" __license__ = "GPLv3" -- cgit v1.2.3