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/WarserverCz.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hoster/WarserverCz.py') diff --git a/module/plugins/hoster/WarserverCz.py b/module/plugins/hoster/WarserverCz.py index a80349b45..1a3a707b7 100644 --- a/module/plugins/hoster/WarserverCz.py +++ b/module/plugins/hoster/WarserverCz.py @@ -36,7 +36,7 @@ class WarserverCz(SimpleHoster): FILE_NAME_PATTERN = r'(?P[^<]+)' FILE_SIZE_PATTERN = r'
  • Velikost: (?P[^<]+)' - FILE_OFFLINE_PATTERN = r'

    Soubor nenalezen

    ' + OFFLINE_PATTERN = r'

    Soubor nenalezen

    ' PREMIUM_URL_PATTERN = r'href="(http://[^/]+/dwn-premium.php.*?)"' DOMAIN = "http://csd01.coolshare.cz" -- cgit v1.2.3 From bd23d1119158b675868bc73eb61666df83b0145b Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Thu, 10 Jul 2014 01:19:31 +0200 Subject: [WarserverCz] Mark as DeadHoster --- module/plugins/hoster/WarserverCz.py | 73 +++--------------------------------- 1 file changed, 6 insertions(+), 67 deletions(-) (limited to 'module/plugins/hoster/WarserverCz.py') diff --git a/module/plugins/hoster/WarserverCz.py b/module/plugins/hoster/WarserverCz.py index 1a3a707b7..73c5b6bc7 100644 --- a/module/plugins/hoster/WarserverCz.py +++ b/module/plugins/hoster/WarserverCz.py @@ -1,77 +1,16 @@ # -*- 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. +from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo - 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 . - - @author: zoidberg -""" - -#similar to coolshare.cz (down) - -import re -from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo -from module.network.HTTPRequest import BadHeader -from module.utils import html_unescape - - -class WarserverCz(SimpleHoster): +class WarserverCz(DeadHoster): __name__ = "WarserverCz" __type__ = "hoster" - __pattern__ = r'http://(?:www\.)?warserver.cz/stahnout/(?P\d+)/.+' - __version__ = "0.12" + __pattern__ = r'http://(?:www\.)?warserver\.cz/stahnout/\d+' + __version__ = "0.13" __description__ = """Warserver.cz hoster plugin""" - __author_name__ = "zoidberg" - __author_mail__ = "zoidberg@mujmail.cz" - - FILE_NAME_PATTERN = r'(?P[^<]+)' - FILE_SIZE_PATTERN = r'
  • Velikost: (?P[^<]+)' - OFFLINE_PATTERN = r'

    Soubor nenalezen

    ' - - PREMIUM_URL_PATTERN = r'href="(http://[^/]+/dwn-premium.php.*?)"' - DOMAIN = "http://csd01.coolshare.cz" - - DOMAIN = "http://s01.warserver.cz" - - def handleFree(self): - try: - self.download("%s/dwn-free.php?fid=%s" % (self.DOMAIN, self.file_info['ID'])) - except BadHeader, e: - self.logError(e) - if e.code == 403: - self.longWait(60, 60) - else: - raise - self.checkDownloadedFile() - - def handlePremium(self): - found = re.search(self.PREMIUM_URL_PATTERN, self.html) - if not found: - self.parseError("Premium URL") - url = html_unescape(found.group(1)) - self.logDebug("Premium URL: " + url) - if not url.startswith("http://"): - self.resetAccount() - self.download(url) - self.checkDownloadedFile() - - def checkDownloadedFile(self): - check = self.checkDownload({ - "offline": ">404 Not Found<" - }) - - if check == "offline": - self.offline() + __author_name__ = "Walter Purcaro" + __author_mail__ = "vuolter@gmail.com" getInfo = create_getInfo(WarserverCz) -- 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/WarserverCz.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'module/plugins/hoster/WarserverCz.py') diff --git a/module/plugins/hoster/WarserverCz.py b/module/plugins/hoster/WarserverCz.py index 73c5b6bc7..8a565d777 100644 --- a/module/plugins/hoster/WarserverCz.py +++ b/module/plugins/hoster/WarserverCz.py @@ -6,8 +6,10 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo class WarserverCz(DeadHoster): __name__ = "WarserverCz" __type__ = "hoster" - __pattern__ = r'http://(?:www\.)?warserver\.cz/stahnout/\d+' __version__ = "0.13" + + __pattern__ = r'http://(?:www\.)?warserver\.cz/stahnout/\d+' + __description__ = """Warserver.cz hoster plugin""" __author_name__ = "Walter Purcaro" __author_mail__ = "vuolter@gmail.com" -- 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/WarserverCz.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'module/plugins/hoster/WarserverCz.py') diff --git a/module/plugins/hoster/WarserverCz.py b/module/plugins/hoster/WarserverCz.py index 8a565d777..2e1e54db3 100644 --- a/module/plugins/hoster/WarserverCz.py +++ b/module/plugins/hoster/WarserverCz.py @@ -11,8 +11,7 @@ class WarserverCz(DeadHoster): __pattern__ = r'http://(?:www\.)?warserver\.cz/stahnout/\d+' __description__ = """Warserver.cz hoster plugin""" - __author_name__ = "Walter Purcaro" - __author_mail__ = "vuolter@gmail.com" + __authors__ = [("Walter Purcaro", "vuolter@gmail.com")] getInfo = create_getInfo(WarserverCz) -- 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/WarserverCz.py | 1 + 1 file changed, 1 insertion(+) (limited to 'module/plugins/hoster/WarserverCz.py') diff --git a/module/plugins/hoster/WarserverCz.py b/module/plugins/hoster/WarserverCz.py index 2e1e54db3..cde40b231 100644 --- a/module/plugins/hoster/WarserverCz.py +++ b/module/plugins/hoster/WarserverCz.py @@ -11,6 +11,7 @@ class WarserverCz(DeadHoster): __pattern__ = r'http://(?:www\.)?warserver\.cz/stahnout/\d+' __description__ = """Warserver.cz hoster plugin""" + __license__ = "GPLv3" __authors__ = [("Walter Purcaro", "vuolter@gmail.com")] -- 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/WarserverCz.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'module/plugins/hoster/WarserverCz.py') diff --git a/module/plugins/hoster/WarserverCz.py b/module/plugins/hoster/WarserverCz.py index cde40b231..c83d5c03e 100644 --- a/module/plugins/hoster/WarserverCz.py +++ b/module/plugins/hoster/WarserverCz.py @@ -4,15 +4,15 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo class WarserverCz(DeadHoster): - __name__ = "WarserverCz" - __type__ = "hoster" + __name__ = "WarserverCz" + __type__ = "hoster" __version__ = "0.13" __pattern__ = r'http://(?:www\.)?warserver\.cz/stahnout/\d+' __description__ = """Warserver.cz hoster plugin""" - __license__ = "GPLv3" - __authors__ = [("Walter Purcaro", "vuolter@gmail.com")] + __license__ = "GPLv3" + __authors__ = [("Walter Purcaro", "vuolter@gmail.com")] getInfo = create_getInfo(WarserverCz) -- cgit v1.2.3