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