From aba96db5e5864703e834a035f524df7405dbe389 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 6 Jul 2014 19:00:03 +0200 Subject: Remove two dead plugins --- module/plugins/hoster/Vipleech4uCom.py | 82 +++------------------------------- 1 file changed, 7 insertions(+), 75 deletions(-) (limited to 'module/plugins/hoster/Vipleech4uCom.py') diff --git a/module/plugins/hoster/Vipleech4uCom.py b/module/plugins/hoster/Vipleech4uCom.py index 53768a430..5e0613be1 100644 --- a/module/plugins/hoster/Vipleech4uCom.py +++ b/module/plugins/hoster/Vipleech4uCom.py @@ -1,84 +1,16 @@ # -*- coding: utf-8 -*- -import re +from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo -from module.plugins.Hoster import Hoster - -class Vipleech4uCom(Hoster): +class Vipleech4uCom(DeadHoster): __name__ = "Vipleech4uCom" - __version__ = "0.1" + __version__ = "0.2" __type__ = "hoster" - __pattern__ = r"http://vipleech4u.com/manager.php" + __pattern__ = r"http://(?:www\.)?vipleech4u\.com/manager\.php" __description__ = """Vipleech4u.com hoster plugin""" - __author_name__ = ("Kagenoshin") - __author_mail__ = ("kagenoshin@gmx.ch") - - FILENAME_PATTERN = re.compile(r'name\s*?=\s*?["\']filename["\'][^>]*?value\s*?=\s*?["\'](.*?)["\']', re.I) - HOST_PATTERN = re.compile(r'name\s*?=\s*?["\']host["\'][^>]*?value\s*?=\s*?["\'](.*?)["\']', re.I) - PATH_PATTERN = re.compile(r'name\s*?=\s*?["\']path["\'][^>]*?value\s*?=\s*?["\'](.*?)["\']', re.I) - REFERER_PATTERN = re.compile(r'name\s*?=\s*?["\']referer["\'][^>]*?value\s*?=\s*?["\'](.*?)["\']', re.I) - LINK_PATTERN = re.compile(r'name\s*?=\s*?["\']link["\'][^>]*?value\s*?=\s*?["\'](.*?)["\']', re.I) - COOKIE_PATTERN = re.compile(r'name\s*?=\s*?["\']cookie["\'][^>]*?value\s*?=\s*?["\'](.*?)["\']', re.I) - - def setup(self): - self.resumeDownload = self.multiDL = True - self.chunkLimit = 1 - - def process(self, pyfile): - if not self.account: - self.logError(_("Please enter your %s account or deactivate this plugin") % "vipleech4u.com") - self.fail("No vipleech4u.com account provided") - - self.logDebug("Old URL: %s" % pyfile.url) - - new_url = pyfile.url - - if re.match(self.__pattern__, new_url): - self.fail("Can't handle vipleech4u links.") - - #upload the link which has to be loaded - page = self.load('http://vipleech4u.com/generator.php', post={'links': new_url, 'ddl': 'no'}) - - #switch to the manager and see what's happening - page = self.load('http://vipleech4u.com/unrestrict.php', get={'link': new_url, 'premium_acc': 'on'}) - - if re.search(r'You have generated maximum links available to you today', page, re.I): - self.fail('Daily limit reached.') - - filename = self.FILENAME_PATTERN.search(page) - host = self.HOST_PATTERN.search(page) - path = self.PATH_PATTERN.search(page) - referer = self.REFERER_PATTERN.search(page) - link = self.LINK_PATTERN.search(page) - cookie = self.COOKIE_PATTERN.search(page) - - #build the post-dictionary - post_dict = {} - - if filename: - post_dict.update({'filename': filename.group(1)}) - if host: - post_dict.update({'host': host.group(1)}) - if path: - post_dict.update({'path': path.group(1)}) - if referer: - post_dict.update({'referer': referer.group(1)}) - if link: - post_dict.update({'link': link.group(1)}) - if cookie: - post_dict.update({'cookie': cookie.group(1)}) - - if not post_dict: - self.logDebug('Get an empty post_dict. Strange.') - - self.setWait(5) - self.wait() - self.logDebug("Unrestricted URL: " + str(post_dict)) - - self.download('http://vipleech4u.com/unrestrict.php', post=post_dict, disposition=True) + __author_name__ = "Kagenoshin" + __author_mail__ = "kagenoshin@gmx.ch" - check = self.checkDownload({"bad": " 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/Vipleech4uCom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hoster/Vipleech4uCom.py') diff --git a/module/plugins/hoster/Vipleech4uCom.py b/module/plugins/hoster/Vipleech4uCom.py index 5e0613be1..d4ccf997a 100644 --- a/module/plugins/hoster/Vipleech4uCom.py +++ b/module/plugins/hoster/Vipleech4uCom.py @@ -7,7 +7,7 @@ class Vipleech4uCom(DeadHoster): __name__ = "Vipleech4uCom" __version__ = "0.2" __type__ = "hoster" - __pattern__ = r"http://(?:www\.)?vipleech4u\.com/manager\.php" + __pattern__ = r'http://(?:www\.)?vipleech4u\.com/manager\.php' __description__ = """Vipleech4u.com hoster plugin""" __author_name__ = "Kagenoshin" __author_mail__ = "kagenoshin@gmx.ch" -- 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/Vipleech4uCom.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'module/plugins/hoster/Vipleech4uCom.py') diff --git a/module/plugins/hoster/Vipleech4uCom.py b/module/plugins/hoster/Vipleech4uCom.py index d4ccf997a..da7131d39 100644 --- a/module/plugins/hoster/Vipleech4uCom.py +++ b/module/plugins/hoster/Vipleech4uCom.py @@ -5,9 +5,11 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo class Vipleech4uCom(DeadHoster): __name__ = "Vipleech4uCom" - __version__ = "0.2" __type__ = "hoster" + __version__ = "0.2" + __pattern__ = r'http://(?:www\.)?vipleech4u\.com/manager\.php' + __description__ = """Vipleech4u.com hoster plugin""" __author_name__ = "Kagenoshin" __author_mail__ = "kagenoshin@gmx.ch" -- 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/Vipleech4uCom.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'module/plugins/hoster/Vipleech4uCom.py') diff --git a/module/plugins/hoster/Vipleech4uCom.py b/module/plugins/hoster/Vipleech4uCom.py index da7131d39..db025db9b 100644 --- a/module/plugins/hoster/Vipleech4uCom.py +++ b/module/plugins/hoster/Vipleech4uCom.py @@ -11,8 +11,7 @@ class Vipleech4uCom(DeadHoster): __pattern__ = r'http://(?:www\.)?vipleech4u\.com/manager\.php' __description__ = """Vipleech4u.com hoster plugin""" - __author_name__ = "Kagenoshin" - __author_mail__ = "kagenoshin@gmx.ch" + __authors__ = [("Kagenoshin", "kagenoshin@gmx.ch")] getInfo = create_getInfo(Vipleech4uCom) -- 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/Vipleech4uCom.py | 1 + 1 file changed, 1 insertion(+) (limited to 'module/plugins/hoster/Vipleech4uCom.py') diff --git a/module/plugins/hoster/Vipleech4uCom.py b/module/plugins/hoster/Vipleech4uCom.py index db025db9b..18b1fe1f3 100644 --- a/module/plugins/hoster/Vipleech4uCom.py +++ b/module/plugins/hoster/Vipleech4uCom.py @@ -11,6 +11,7 @@ class Vipleech4uCom(DeadHoster): __pattern__ = r'http://(?:www\.)?vipleech4u\.com/manager\.php' __description__ = """Vipleech4u.com hoster plugin""" + __license__ = "GPLv3" __authors__ = [("Kagenoshin", "kagenoshin@gmx.ch")] -- 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/Vipleech4uCom.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'module/plugins/hoster/Vipleech4uCom.py') diff --git a/module/plugins/hoster/Vipleech4uCom.py b/module/plugins/hoster/Vipleech4uCom.py index 18b1fe1f3..7499294ed 100644 --- a/module/plugins/hoster/Vipleech4uCom.py +++ b/module/plugins/hoster/Vipleech4uCom.py @@ -4,15 +4,15 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo class Vipleech4uCom(DeadHoster): - __name__ = "Vipleech4uCom" - __type__ = "hoster" + __name__ = "Vipleech4uCom" + __type__ = "hoster" __version__ = "0.2" __pattern__ = r'http://(?:www\.)?vipleech4u\.com/manager\.php' __description__ = """Vipleech4u.com hoster plugin""" - __license__ = "GPLv3" - __authors__ = [("Kagenoshin", "kagenoshin@gmx.ch")] + __license__ = "GPLv3" + __authors__ = [("Kagenoshin", "kagenoshin@gmx.ch")] getInfo = create_getInfo(Vipleech4uCom) -- 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/Vipleech4uCom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hoster/Vipleech4uCom.py') diff --git a/module/plugins/hoster/Vipleech4uCom.py b/module/plugins/hoster/Vipleech4uCom.py index 7499294ed..340a3feaa 100644 --- a/module/plugins/hoster/Vipleech4uCom.py +++ b/module/plugins/hoster/Vipleech4uCom.py @@ -6,7 +6,7 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo class Vipleech4uCom(DeadHoster): __name__ = "Vipleech4uCom" __type__ = "hoster" - __version__ = "0.2" + __version__ = "0.20" __pattern__ = r'http://(?:www\.)?vipleech4u\.com/manager\.php' -- cgit v1.2.3