From ca42a34b0803ca58a68b79ae58fddc0905c5d73a Mon Sep 17 00:00:00 2001 From: zoidberg10 Date: Wed, 23 Nov 2011 12:20:54 +0100 Subject: fix 4shared, replace easy-share with crocko --- module/plugins/hoster/EasyShareCom.py | 72 ----------------------------------- 1 file changed, 72 deletions(-) delete mode 100644 module/plugins/hoster/EasyShareCom.py (limited to 'module/plugins/hoster/EasyShareCom.py') diff --git a/module/plugins/hoster/EasyShareCom.py b/module/plugins/hoster/EasyShareCom.py deleted file mode 100644 index 542b4367f..000000000 --- a/module/plugins/hoster/EasyShareCom.py +++ /dev/null @@ -1,72 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- - -import re -from module.plugins.Hoster import Hoster -from module.plugins.ReCaptcha import ReCaptcha - -class EasyShareCom(Hoster): - __name__ = "EasyShareCom" - __type__ = "hoster" - __pattern__ = r"http://[\w\d\.]*?easy-share\.com/(\d{6}).*" - __version__ = "0.1" - __description__ = """easy-share.com One-Klick Hoster""" - __author_name__ = ("jeix") - __author_mail__ = ("jeix@hasnomail.de") - - - def setup(self): - self.multiDL = False - self.html = None - - def process(self, pyfile): - self.pyfile = pyfile - - self.html = self.load(self.pyfile.url) - if re.search("Die von ihnen angeforderte Datei wurde gel\xc3\xb6scht.", self.html): - self.offline() - - self.pyfile.name = self.getFileName() - - self.download(self.getFileUrl()) - - - def getFileName(self): - return re.search(r'requesting:\s*(.*?)<', self.html).group(1) - - - def getFileUrl(self): - - if "There is another download in progress from your IP" in self.html: - self.log.info("%s: IP blocked, retry in 5 minutes." % self.__name__) - self.setWait(5 * 60) - self.wait() - self.retry() - - if "You need a premium membership to download this file" in self.html: - self.fail("You need a premium membership to download this file.") - - - wait = re.search(r"w='(\d+)'", self.html) - if wait: - wait = int( wait.group(1).strip() ) - self.log.info("%s: Waiting %d seconds." % (self.__name__, wait)) - self.setWait(wait) - self.wait() - - tempurl = self.pyfile.url - if not tempurl.endswith("/"): - tempurl += "/" - id = re.search(r'http://[\w\d\.]*?easy-share\.com/(\d+)/', tempurl).group(1) - self.html = self.load("http://www.easy-share.com/file_contents/captcha/" + id) - - challenge = re.search(r'Recaptcha\.create\("(.*?)"', self.html).group(1) - re_captcha = ReCaptcha(self) - challenge, result = re_captcha.challenge(challenge) - - link = re.search(r'', self.html).group(1) - id = re.search(r'file/id/(\d+)/', link) - self.download( link, post={"id" : id, - "recaptcha_challenge_field" : challenge, - "recaptcha_response_field": result} ) - -- cgit v1.2.3