diff options
author | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-12-14 16:47:49 +0100 |
---|---|---|
committer | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-12-27 21:22:11 +0100 |
commit | 8fe2fa85605c091369c8e69b36d1cded2cd9bbe0 (patch) | |
tree | a0d5745b1168fe887568fc6af1004c19ce44f4b6 /module/plugins/hoster/OboomCom.py | |
parent | [ExternalScripts] Update and fix (diff) | |
download | pyload-8fe2fa85605c091369c8e69b36d1cded2cd9bbe0.tar.xz |
Update hosters (1)
Diffstat (limited to 'module/plugins/hoster/OboomCom.py')
-rw-r--r-- | module/plugins/hoster/OboomCom.py | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/module/plugins/hoster/OboomCom.py b/module/plugins/hoster/OboomCom.py index 23340e2ce..340ca170d 100644 --- a/module/plugins/hoster/OboomCom.py +++ b/module/plugins/hoster/OboomCom.py @@ -5,7 +5,7 @@ import re -from module.plugins.internal.utils import json +from module.plugins.internal.misc import json from module.plugins.internal.Hoster import Hoster from module.plugins.captcha.ReCaptcha import ReCaptcha @@ -13,7 +13,7 @@ from module.plugins.captcha.ReCaptcha import ReCaptcha class OboomCom(Hoster): __name__ = "OboomCom" __type__ = "hoster" - __version__ = "0.41" + __version__ = "0.42" __status__ = "testing" __pattern__ = r'https?://(?:www\.)?oboom\.com/(?:#(?:id=|/)?)?(?P<ID>\w{8})' @@ -67,14 +67,14 @@ class OboomCom(Hoster): else: apiUrl = "http://www.oboom.com/1.0/guestsession" result = self.load_url(apiUrl) - if result[0] == 200: + if result[0] is 200: self.session_token = result[1] else: self.fail(_("Could not retrieve token for guest session. Error code: %s") % result[0]) def solve_captcha(self): - recaptcha = ReCaptcha(self) + recaptcha = ReCaptcha(self.pyfile) response, challenge = recaptcha.challenge(self.RECAPTCHA_KEY) apiUrl = "http://www.oboom.com/1.0/download/ticket" @@ -85,14 +85,14 @@ class OboomCom(Hoster): result = self.load_url(apiUrl, params) - if result[0] == 200: + if result[0] is 200: self.download_token = result[1] self.download_auth = result[2] self.captcha.correct() self.wait(30) else: - if result[0] == 403: + if result[0] is 403: if result[1] == -1: #: Another download is running self.set_wait(15 * 60) else: @@ -102,7 +102,7 @@ class OboomCom(Hoster): self.wait() self.retry(5) - elif result[0] == 400 and result[1] == "forbidden": + elif result[0] is 400 and result[1] == "forbidden": self.retry(5, 15 * 60, _("Service unavailable")) self.retry_captcha() @@ -113,7 +113,7 @@ class OboomCom(Hoster): params = {'token': token, 'items': fileId, 'http_errors': 0} result = self.load_url(apiUrl, params) - if result[0] == 200: + if result[0] is 200: item = result[1][0] if item['state'] == "online": self.file_size = item['size'] @@ -134,10 +134,10 @@ class OboomCom(Hoster): params['auth'] = self.download_auth result = self.load_url(apiUrl, params) - if result[0] == 200: + if result[0] is 200: self.download_domain = result[1] self.download_ticket = result[2] - elif result[0] == 421: + elif result[0] is 421: self.retry(wait=result[2] + 60, msg=_("Connection limit exceeded")) else: self.fail(_("Could not retrieve download ticket. Error code: %s") % result[0]) |