summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster/RapiduNet.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-04-08 14:29:06 +0200
committerGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-04-08 14:29:06 +0200
commit138e514ce4dd9ccce8af5b4dfbecdfcc03b62cbe (patch)
tree375cb998f0e72550f84d881f3dcafc6b2baeb461 /module/plugins/hoster/RapiduNet.py
parent[CatShareNet] https://github.com/pyload/pyload/issues/1325 (diff)
downloadpyload-138e514ce4dd9ccce8af5b4dfbecdfcc03b62cbe.tar.xz
[RapiduNet] https://github.com/pyload/pyload/issues/1326
Diffstat (limited to 'module/plugins/hoster/RapiduNet.py')
-rw-r--r--module/plugins/hoster/RapiduNet.py28
1 files changed, 13 insertions, 15 deletions
diff --git a/module/plugins/hoster/RapiduNet.py b/module/plugins/hoster/RapiduNet.py
index f43eda0cb..8a85bc844 100644
--- a/module/plugins/hoster/RapiduNet.py
+++ b/module/plugins/hoster/RapiduNet.py
@@ -13,7 +13,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class RapiduNet(SimpleHoster):
__name__ = "RapiduNet"
__type__ = "hoster"
- __version__ = "0.07"
+ __version__ = "0.08"
__pattern__ = r'https?://(?:www\.)?rapidu\.net/(?P<ID>\d{10})'
__config__ = [("use_premium", "bool", "Use premium account if available", True)]
@@ -26,7 +26,7 @@ class RapiduNet(SimpleHoster):
COOKIES = [("rapidu.net", "rapidu_lang", "en")]
INFO_PATTERN = r'<h1 title="(?P<N>.*)">.*</h1>\s*<small>(?P<S>\d+(\.\d+)?)\s(?P<U>\w+)</small>'
- OFFLINE_PATTERN = r'404 - File not found'
+ OFFLINE_PATTERN = r'<h1>404'
ERROR_PATTERN = r'<div class="error">'
@@ -58,20 +58,18 @@ class RapiduNet(SimpleHoster):
self.wait(int(jsvars['timeToDownload']) - int(time.time()))
recaptcha = ReCaptcha(self)
+ response, challenge = recaptcha.challenge(self.RECAPTCHA_KEY)
- for _i in xrange(10):
- response, challenge = recaptcha.challenge(self.RECAPTCHA_KEY)
-
- jsvars = self.getJsonResponse("https://rapidu.net/ajax.php",
- get={'a': "getCheckCaptcha"},
- post={'_go' : "",
- 'captcha1': challenge,
- 'captcha2': response,
- 'fileId' : self.info['pattern']['ID']},
- decode=True)
- if jsvars['message'] == 'success':
- self.download(jsvars['url'])
- break
+ jsvars = self.getJsonResponse("https://rapidu.net/ajax.php",
+ get={'a': "getCheckCaptcha"},
+ post={'_go' : "",
+ 'captcha1': challenge,
+ 'captcha2': response,
+ 'fileId' : self.info['pattern']['ID']},
+ decode=True)
+
+ if jsvars['message'] == 'success':
+ self.link = jsvars['url']
def getJsonResponse(self, *args, **kwargs):