summaryrefslogtreecommitdiffstats
path: root/module/plugins
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-06-27 19:41:03 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-06-27 19:41:03 +0200
commitcf8fea4179a673ffe2ec50de3a5d948a61f849aa (patch)
treea24f3be129904f22836b8caa7fdca33cf0d7547a /module/plugins
parentDepositFiles lang fix (diff)
downloadpyload-cf8fea4179a673ffe2ec50de3a5d948a61f849aa.tar.xz
Shareonline, zshare fix, testing __slots__ attribute
Diffstat (limited to 'module/plugins')
-rw-r--r--module/plugins/Plugin.py2
-rw-r--r--module/plugins/hooks/CaptchaTrader.py3
-rw-r--r--module/plugins/hoster/ShareonlineBiz.py6
-rw-r--r--module/plugins/hoster/ZShareNet.py8
4 files changed, 11 insertions, 8 deletions
diff --git a/module/plugins/Plugin.py b/module/plugins/Plugin.py
index 68fb6f8be..9caf4d81a 100644
--- a/module/plugins/Plugin.py
+++ b/module/plugins/Plugin.py
@@ -244,7 +244,7 @@ class Plugin(object):
:param wait_time: time to wait in seconds
:param reason: reason for retrying, will be passed to fail if max_tries reached
"""
- if self.retries >= max_tries:
+ if max_tries and self.retries >= max_tries:
if not reason: reason = "Max retries reached"
raise Fail(reason)
diff --git a/module/plugins/hooks/CaptchaTrader.py b/module/plugins/hooks/CaptchaTrader.py
index 00f517751..af6626897 100644
--- a/module/plugins/hooks/CaptchaTrader.py
+++ b/module/plugins/hooks/CaptchaTrader.py
@@ -76,6 +76,7 @@ class CaptchaTrader(Hook):
#if type(captcha) == str and captchaType == "file":
# raise CaptchaTraderException("Invalid Type")
assert captchaType in ("file", "url-jpg", "url-jpeg", "url-png", "url-bmp")
+ #todo more timeout
json = getURL(CaptchaTrader.SUBMIT_URL, post={"api_key": PYLOAD_KEY,
"username": self.getConfig("username"),
"password": self.getConfig("passkey"),
@@ -112,7 +113,7 @@ class CaptchaTrader(Hook):
if self.getCredits() > 10:
task.handler.append(self)
- task.setWaiting(40)
+ task.setWaiting(100)
start_new_thread(self.processCaptcha, (task,))
else:
diff --git a/module/plugins/hoster/ShareonlineBiz.py b/module/plugins/hoster/ShareonlineBiz.py
index 360f0d788..03f24a2c9 100644
--- a/module/plugins/hoster/ShareonlineBiz.py
+++ b/module/plugins/hoster/ShareonlineBiz.py
@@ -38,7 +38,7 @@ class ShareonlineBiz(Hoster):
__name__ = "ShareonlineBiz"
__type__ = "hoster"
__pattern__ = r"http://[\w\.]*?(share\-online\.biz|egoshare\.com)/(download.php\?id\=|dl/)[\w]+"
- __version__ = "0.2"
+ __version__ = "0.21"
__description__ = """Shareonline.biz Download Hoster"""
__author_name__ = ("spoob", "mkaay")
__author_mail__ = ("spoob@pyload.org", "mkaay@mkaay.de")
@@ -89,7 +89,7 @@ class ShareonlineBiz(Hoster):
self.setWait(120)
self.log.info("%s: no free slots, waiting 120 seconds" % self.__name__)
self.wait()
- self.retry()
+ self.retry(max_tries=60)
if "Captcha number error or expired" in self.html:
captcha = self.decryptCaptcha("http://www.share-online.biz/captcha.php", get={"rand":"0.%s" % random.randint(10**15,10**16)})
@@ -149,7 +149,7 @@ class ShareonlineBiz(Hoster):
except:
self.fail("Session issue")
- self.download(download_url, cookies=True)
+ self.download(download_url)
def checksum(self, local_file):
if self.api_data and self.api_data["checksum"]:
diff --git a/module/plugins/hoster/ZShareNet.py b/module/plugins/hoster/ZShareNet.py
index d3453ee5e..6ef456d97 100644
--- a/module/plugins/hoster/ZShareNet.py
+++ b/module/plugins/hoster/ZShareNet.py
@@ -11,9 +11,9 @@ class ZShareNet(Hoster):
__name__ = "ZShareNet"
__type__ = "hoster"
__pattern__ = r"http://[\w\.]*?zshare\.net/(download|video|image|audio|flash)/.*"
- __version__ = "0.1"
+ __version__ = "0.2"
__description__ = """ZShareNet Download Hoster"""
- __author_name__ = ("espes")
+ __author_name__ = ("espes","Cptn Sandwich")
def setup(self):
self.multiDL = False
@@ -22,6 +22,8 @@ class ZShareNet(Hoster):
def process(self, pyfile):
self.pyfile = pyfile
+ self.pyfile.url = re.sub("(video|image|audio|flash)","download",self.pyfile.url)
+
self.html = self.load(pyfile.url)
if "File Not Found" in self.html:
self.offline()
@@ -65,4 +67,4 @@ class ZShareNet(Hoster):
if check == "unav":
self.fail("Plugin defect")
elif check == "404":
- self.offline() \ No newline at end of file
+ self.offline()