summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Stefano <l.stickell@yahoo.it> 2014-03-04 21:33:30 +0100
committerGravatar Stefano <l.stickell@yahoo.it> 2014-04-21 16:57:49 +0200
commit1861b96995a41d1fe179dd02ab5f367dba8a2852 (patch)
tree0da83af9074c34b3abd22717bf181be7d121fb0c
parentMerge pull request #511 from vuolter/s/hoster/RyushareCom (diff)
downloadpyload-1861b96995a41d1fe179dd02ab5f367dba8a2852.tar.xz
Merge pull request #535 from vuolter/s/mark_dead
Mark dead CyberlockerCh and CloudzerNet (cherry picked from commit bce39ea47fe9ce6c2b964adaebf0be237234978b)
-rw-r--r--pyload/plugins/hoster/CloudzerNet.py79
-rw-r--r--pyload/plugins/hoster/CyberlockerCh.py15
2 files changed, 12 insertions, 82 deletions
diff --git a/pyload/plugins/hoster/CloudzerNet.py b/pyload/plugins/hoster/CloudzerNet.py
index 8253c35b9..d0a19a945 100644
--- a/pyload/plugins/hoster/CloudzerNet.py
+++ b/pyload/plugins/hoster/CloudzerNet.py
@@ -1,85 +1,16 @@
# -*- coding: utf-8 -*-
-import re
-from module.plugins.internal.SimpleHoster import SimpleHoster
-from module.common.json_layer import json_loads
-from module.plugins.internal.CaptchaService import ReCaptcha
-from module.network.RequestFactory import getURL
-from module.utils import parseFileSize
+from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
-def getInfo(urls):
- for url in urls:
- header = getURL(url, just_header=True)
- if 'Location: http://cloudzer.net/404' in header:
- file_info = (url, 0, 1, url)
- else:
- fid = re.search(CloudzerNet.__pattern__, url).group('ID')
- api_data = getURL('http://cloudzer.net/file/%s/status' % fid)
- name, size = api_data.splitlines()
- size = parseFileSize(size)
- file_info = (name, size, 2, url)
- yield file_info
-
-
-class CloudzerNet(SimpleHoster):
+class CloudzerNet(DeadHoster):
__name__ = "CloudzerNet"
__type__ = "hoster"
- __pattern__ = r"http://(www\.)?(cloudzer\.net/file/|clz\.to/(file/)?)(?P<ID>\w+).*"
- __version__ = "0.04"
+ __pattern__ = r"https?://(?:www\.)?(cloudzer\.net/file/|clz\.to/(file/)?)\w+"
+ __version__ = "0.05"
__description__ = """Cloudzer.net hoster plugin"""
__author_name__ = ("gs", "z00nx", "stickell")
__author_mail__ = ("I-_-I-_-I@web.de", "z00nx0@gmail.com", "l.stickell@yahoo.it")
- WAIT_PATTERN = '<meta name="wait" content="(\d+)">'
- CAPTCHA_KEY = '6Lcqz78SAAAAAPgsTYF3UlGf2QFQCNuPMenuyHF3'
-
- def handleFree(self):
- found = re.search(self.WAIT_PATTERN, self.html)
- seconds = int(found.group(1))
- self.logDebug("Found wait", seconds)
- self.setWait(seconds + 1)
- self.wait()
- response = self.load('http://cloudzer.net/io/ticket/slot/%s' % self.file_info['ID'], post=' ', cookies=True)
- self.logDebug("Download slot request response", response)
- response = json_loads(response)
- if response["succ"] is not True:
- self.fail("Unable to get a download slot")
-
- recaptcha = ReCaptcha(self)
- challenge, response = recaptcha.challenge(self.CAPTCHA_KEY)
- post_data = {"recaptcha_challenge_field": challenge, "recaptcha_response_field": response}
- response = json_loads(self.load('http://cloudzer.net/io/ticket/captcha/%s' % self.file_info['ID'],
- post=post_data, cookies=True))
- self.logDebug("Captcha check response", response)
- self.logDebug("First check")
-
- if "err" in response:
- if response["err"] == "captcha":
- self.logDebug("Wrong captcha")
- self.invalidCaptcha()
- self.retry()
- elif "Sie haben die max" in response["err"] or "You have reached the max" in response["err"]:
- self.logDebug("Download limit reached, waiting an hour")
- self.setWait(3600, True)
- self.wait()
- if "type" in response:
- if response["type"] == "download":
- url = response["url"]
- self.logDebug("Download link", url)
- self.download(url, disposition=True)
-
- def getFileInfo(self):
- self.logDebug("URL: %s" % self.pyfile.url)
-
- header = getURL(self.pyfile.url, just_header=True)
-
- if 'Location: http://cloudzer.net/404' in header:
- self.offline()
- else:
- self.fid = re.search(self.__pattern__, self.pyfile.url).group('ID')
- api_data = getURL('http://cloudzer.net/file/%s/status' % self.fid)
- self.pyfile.name, size = api_data.splitlines()
- self.pyfile.size = parseFileSize(size)
- self.logDebug("FILE NAME: %s FILE SIZE: %s" % (self.pyfile.name, self.pyfile.size))
+getInfo = create_getInfo(CloudzerNet)
diff --git a/pyload/plugins/hoster/CyberlockerCh.py b/pyload/plugins/hoster/CyberlockerCh.py
index 19a4473b3..a08bf8518 100644
--- a/pyload/plugins/hoster/CyberlockerCh.py
+++ b/pyload/plugins/hoster/CyberlockerCh.py
@@ -1,17 +1,16 @@
# -*- coding: utf-8 -*-
-from module.plugins.hoster.XFileSharingPro import XFileSharingPro, create_getInfo
+from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
-class CyberlockerCh(XFileSharingPro):
+
+class CyberlockerCh(DeadHoster):
__name__ = "CyberlockerCh"
__type__ = "hoster"
- __pattern__ = r"http://(www\.)?cyberlocker\.ch/\w{12}"
- __version__ = "0.01"
+ __pattern__ = r'http://(?:www\.)?cyberlocker\.ch/\w+'
+ __version__ = "0.02"
__description__ = """Cyberlocker.ch hoster plugin"""
- __author_name__ = ("stickell")
- __author_mail__ = ("l.stickell@yahoo.it")
-
- HOSTER_NAME = "cyberlocker.ch"
+ __author_name__ = "stickell"
+ __author_mail__ = "l.stickell@yahoo.it"
getInfo = create_getInfo(CyberlockerCh)