summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster/TurbobitNet.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2014-10-19 14:52:42 +0200
committerGravatar Walter Purcaro <vuolter@gmail.com> 2014-10-19 14:52:42 +0200
commit2ae91b81a2f12a1c9b1f78524df78a2b3f1ef494 (patch)
treec33c610c953a7833adfe8e357417e73b1d5231d4 /module/plugins/hoster/TurbobitNet.py
parentparseError -> error now calls Fail instead Exception (diff)
downloadpyload-2ae91b81a2f12a1c9b1f78524df78a2b3f1ef494.tar.xz
Update hosters to self.error
Diffstat (limited to 'module/plugins/hoster/TurbobitNet.py')
-rw-r--r--module/plugins/hoster/TurbobitNet.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/module/plugins/hoster/TurbobitNet.py b/module/plugins/hoster/TurbobitNet.py
index 2d3c4e14a..8557e0ce7 100644
--- a/module/plugins/hoster/TurbobitNet.py
+++ b/module/plugins/hoster/TurbobitNet.py
@@ -17,7 +17,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo, t
class TurbobitNet(SimpleHoster):
__name__ = "TurbobitNet"
__type__ = "hoster"
- __version__ = "0.12"
+ __version__ = "0.13"
__pattern__ = r'http://(?:www\.)?turbobit\.net/(?:download/free/)?(?P<ID>\w+)'
@@ -67,20 +67,20 @@ class TurbobitNet(SimpleHoster):
action, inputs = self.parseHtmlForm("action='#'")
if not inputs:
- self.parseError("captcha form")
+ self.error("captcha form")
self.logDebug(inputs)
if inputs['captcha_type'] == 'recaptcha':
recaptcha = ReCaptcha(self)
captcha_key = recaptcha.detect_key()
if captcha_key is None:
- self.parseError("ReCaptcha captcha key not found")
+ self.error("ReCaptcha captcha key not found")
inputs['recaptcha_challenge_field'], inputs['recaptcha_response_field'] = recaptcha.challenge(captcha_key)
else:
m = re.search(self.CAPTCHA_URL_PATTERN, self.html)
if m is None:
- self.parseError('captcha')
+ self.error('captcha')
captcha_url = m.group(1)
inputs['captcha_response'] = self.decryptCaptcha(captcha_url)
@@ -172,7 +172,7 @@ class TurbobitNet(SimpleHoster):
def downloadFile(self):
m = re.search(self.LINK_PATTERN, self.html)
if m is None:
- self.parseError("Download link not found")
+ self.error("Download link not found")
self.url = "http://turbobit.net" + m.group('url')
self.download(self.url)