summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster/EasyShareCom.py
diff options
context:
space:
mode:
authorGravatar zoidberg10 <zoidberg@mujmail.cz> 2011-11-23 12:20:54 +0100
committerGravatar zoidberg10 <zoidberg@mujmail.cz> 2011-11-23 12:20:54 +0100
commitca42a34b0803ca58a68b79ae58fddc0905c5d73a (patch)
tree63f3cb6c695acf51a6972d1337345757489bb339 /module/plugins/hoster/EasyShareCom.py
parentadd 2shared.com (diff)
downloadpyload-ca42a34b0803ca58a68b79ae58fddc0905c5d73a.tar.xz
fix 4shared, replace easy-share with crocko
Diffstat (limited to 'module/plugins/hoster/EasyShareCom.py')
-rw-r--r--module/plugins/hoster/EasyShareCom.py72
1 files changed, 0 insertions, 72 deletions
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:</span>\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'<form\s+method="post"\s+action="(http://[\w\d\.]*?easy-share.com/file_contents/.*?)">', 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} )
-