From e88c477d1ae3913096b92f41274ef578693bc052 Mon Sep 17 00:00:00 2001 From: Stefano Date: Mon, 21 Apr 2014 17:26:28 +0200 Subject: Moving new plugins from module to pyload --- module/plugins/hoster/UpstoreNet.py | 70 ------------------------------------- 1 file changed, 70 deletions(-) delete mode 100644 module/plugins/hoster/UpstoreNet.py (limited to 'module/plugins/hoster/UpstoreNet.py') diff --git a/module/plugins/hoster/UpstoreNet.py b/module/plugins/hoster/UpstoreNet.py deleted file mode 100644 index 9d1c4b3dd..000000000 --- a/module/plugins/hoster/UpstoreNet.py +++ /dev/null @@ -1,70 +0,0 @@ -# -*- coding: utf-8 -*- -import re - -from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo -from module.plugins.internal.CaptchaService import ReCaptcha - - -class UpstoreNet(SimpleHoster): - __name__ = "UpstoreNet" - __type__ = "hoster" - __pattern__ = r"https?://(?:www\.)?upstore\.net/" - __version__ = "0.02" - __description__ = """Upstore.Net File Download Hoster""" - __author_name__ = ("igel") - - FILE_INFO_PATTERN = r'
.*?
\s*\n

(?P.*?)

\s*\n
\s*\n\s*(?P[\d.]+) (?P\w+)' - FILE_OFFLINE_PATTERN = r'File not found' - - WAIT_PATTERN = r"var sec = (\d+)" - CHASH_PATTERN = r'' - DIRECT_LINK_PATTERN = r'' - - def handleFree(self): - # STAGE 1: get link to continue - m = re.search(self.CHASH_PATTERN, self.html) - if not m: - self.parseError("could not detect hash") - chash = m.group(1) - self.logDebug("read hash " + chash) - # continue to stage2 - post_data = {'hash': chash, 'free': 'Slow download'} - self.html = self.load(self.pyfile.url, post=post_data, decode=True) - - # STAGE 2: solv captcha and wait - # first get the infos we need: recaptcha key and wait time - recaptcha = ReCaptcha(self) - if not recaptcha.detect_key(self.html): - self.parseError("could not find recaptcha pattern") - self.logDebug("using captcha key " + recaptcha.recaptcha_key) - # try the captcha 5 times - for i in xrange(5): - m = re.search(self.WAIT_PATTERN, self.html) - if not m: - self.parseError("could not find wait pattern") - wait_time = m.group(1) - - # then, do the waiting - self.wait(wait_time) - - # then, handle the captcha - challenge, code = recaptcha.challenge() - post_data['recaptcha_challenge_field'] = challenge - post_data['recaptcha_response_field'] = code - - self.html = self.load(self.pyfile.url, post=post_data, decode=True) - - # STAGE 3: get direct link - m = re.search(self.DIRECT_LINK_PATTERN, self.html, re.DOTALL) - if m: - break - - if not m: - self.parseError("could not detect direct link") - - direct = m.group(1) - self.logDebug('found direct link: ' + direct) - self.download(direct, disposition=True) - - -getInfo = create_getInfo(UpstoreNet) -- cgit v1.2.3