summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster/SpeedLoadOrg.py
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2013-02-17 20:48:13 +0100
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2013-02-17 20:48:13 +0100
commit1f7cf25b688dac9b02238e9bff9a6ac823359787 (patch)
treebc5f958a334fc98a37f9ee7979926bff5d11791d /module/plugins/hoster/SpeedLoadOrg.py
parentMerge pull request #5 from gonzalosr/patch-2 (diff)
parentMore download check rules for SpeedLoadOrg (diff)
downloadpyload-1f7cf25b688dac9b02238e9bff9a6ac823359787.tar.xz
Merge pull request #7 from stickell/patch-1
More download check rules for SpeedLoadOrg
Diffstat (limited to 'module/plugins/hoster/SpeedLoadOrg.py')
-rw-r--r--module/plugins/hoster/SpeedLoadOrg.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/module/plugins/hoster/SpeedLoadOrg.py b/module/plugins/hoster/SpeedLoadOrg.py
index d5e89b93f..92abbb04e 100644
--- a/module/plugins/hoster/SpeedLoadOrg.py
+++ b/module/plugins/hoster/SpeedLoadOrg.py
@@ -19,7 +19,7 @@ class SpeedLoadOrg(SimpleHoster):
__name__ = "SpeedLoadOrg"
__type__ = "hoster"
__pattern__ = r"http://(www\.)?speedload\.org/(?P<ID>\w+).*"
- __version__ = "0.01"
+ __version__ = "0.02"
__description__ = """Speedload.org hoster plugin"""
__author_name__ = ("z00nx")
__author_mail__ = ("z00nx0@gmail.com")
@@ -34,8 +34,16 @@ class SpeedLoadOrg(SimpleHoster):
challenge, response = recaptcha.challenge(self.RECAPTCHA_KEY)
post_data = {'recaptcha_challenge_field': challenge, 'recaptcha_response_field': response, 'submit': 'continue', 'submitted': '1', 'd': '1'}
self.download(self.pyfile.url, post=post_data)
- check = self.checkDownload({"html": re.compile("\A<!DOCTYPE html PUBLIC")})
+ check = self.checkDownload({
+ "html": re.compile("\A<!DOCTYPE html PUBLIC"),
+ "busy": "You are already downloading a file. Please upgrade to premium.",
+ "socket": "Could not open socket"})
if check == "html":
self.logDebug("Wrong captcha entered")
self.invalidCaptcha()
self.retry()
+ elif check == "busy":
+ self.retry(10, 300, "Already downloading")
+ elif check == "socket":
+ self.fail("Server error: Could not open socket")
+