From 1873b51db68b2c936d7b67f23dea4a5e49186568 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Thu, 11 Dec 2014 21:25:47 +0100 Subject: Spare code fixes --- pyload/plugins/captcha/AdYouLike.py | 4 ++-- pyload/plugins/captcha/AdsCaptcha.py | 2 +- pyload/plugins/captcha/ReCaptcha.py | 2 +- pyload/plugins/captcha/SolveMedia.py | 2 +- pyload/plugins/crypter/Go4UpCom.py | 2 +- pyload/plugins/hoster/ShareonlineBiz.py | 2 +- pyload/plugins/internal/SimpleHoster.py | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) (limited to 'pyload/plugins') diff --git a/pyload/plugins/captcha/AdYouLike.py b/pyload/plugins/captcha/AdYouLike.py index 9c74e9348..be688e65d 100644 --- a/pyload/plugins/captcha/AdYouLike.py +++ b/pyload/plugins/captcha/AdYouLike.py @@ -61,7 +61,7 @@ class AdYouLike(Captcha): 'callback': callback}) try: challenge = json_loads(re.search(callback + r'\s*\((.+?)\)', html).group(1)) - except: + except Exception: errmsg = _("AdYouLike challenge pattern not found") self.plugin.error(errmsg) raise ValueError(errmsg) @@ -91,7 +91,7 @@ class AdYouLike(Captcha): try: instructions_visual = challenge['translations'][server['all']['lang']]['instructions_visual'] result = re.search(u'«(.+?)»', instructions_visual).group(1).strip() - except: + except Exception: errmsg = _("AdYouLike result not found") self.plugin.error(errmsg) raise ValueError(errmsg) diff --git a/pyload/plugins/captcha/AdsCaptcha.py b/pyload/plugins/captcha/AdsCaptcha.py index 239d61a19..8655e4f7b 100644 --- a/pyload/plugins/captcha/AdsCaptcha.py +++ b/pyload/plugins/captcha/AdsCaptcha.py @@ -56,7 +56,7 @@ class AdsCaptcha(Captcha): try: challenge = re.search("challenge: '(.+?)',", html).group(1) server = re.search("server: '(.+?)',", html).group(1) - except: + except Exception: errmsg = _("AdsCaptcha challenge pattern not found") self.plugin.error(errmsg) raise ValueError(errmsg) diff --git a/pyload/plugins/captcha/ReCaptcha.py b/pyload/plugins/captcha/ReCaptcha.py index 7a2ba9362..e12aba36d 100644 --- a/pyload/plugins/captcha/ReCaptcha.py +++ b/pyload/plugins/captcha/ReCaptcha.py @@ -51,7 +51,7 @@ class ReCaptcha(Captcha): try: challenge = re.search("challenge : '(.+?)',", html).group(1) server = re.search("server : '(.+?)',", html).group(1) - except: + except Exception: errmsg = _("ReCaptcha challenge pattern not found") self.plugin.error(errmsg) raise ValueError(errmsg) diff --git a/pyload/plugins/captcha/SolveMedia.py b/pyload/plugins/captcha/SolveMedia.py index 63db60627..cc48c801b 100644 --- a/pyload/plugins/captcha/SolveMedia.py +++ b/pyload/plugins/captcha/SolveMedia.py @@ -32,7 +32,7 @@ class SolveMedia(Captcha): challenge = re.search(r'', html).group(1) server = "http://api.solvemedia.com/papi/media" - except: + except Exception: errmsg = _("SolveMedia challenge pattern not found") self.plugin.error(errmsg) raise ValueError(errmsg) diff --git a/pyload/plugins/crypter/Go4UpCom.py b/pyload/plugins/crypter/Go4UpCom.py index cab32eb61..44c25c88a 100644 --- a/pyload/plugins/crypter/Go4UpCom.py +++ b/pyload/plugins/crypter/Go4UpCom.py @@ -40,7 +40,7 @@ class Go4UpCom(SimpleCrypter): for html in pages: try: links.append(re.search(r'