diff options
author | Walter Purcaro <vuolter@gmail.com> | 2014-12-11 21:25:47 +0100 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2014-12-11 21:25:47 +0100 |
commit | 1873b51db68b2c936d7b67f23dea4a5e49186568 (patch) | |
tree | e6c6585e160421686c36265d6d98eac946e92bb9 /pyload/plugins | |
parent | Rename attr NAME to __name (diff) | |
download | pyload-1873b51db68b2c936d7b67f23dea4a5e49186568.tar.xz |
Spare code fixes
Diffstat (limited to 'pyload/plugins')
-rw-r--r-- | pyload/plugins/captcha/AdYouLike.py | 4 | ||||
-rw-r--r-- | pyload/plugins/captcha/AdsCaptcha.py | 2 | ||||
-rw-r--r-- | pyload/plugins/captcha/ReCaptcha.py | 2 | ||||
-rw-r--r-- | pyload/plugins/captcha/SolveMedia.py | 2 | ||||
-rw-r--r-- | pyload/plugins/crypter/Go4UpCom.py | 2 | ||||
-rw-r--r-- | pyload/plugins/hoster/ShareonlineBiz.py | 2 | ||||
-rw-r--r-- | pyload/plugins/internal/SimpleHoster.py | 2 |
7 files changed, 8 insertions, 8 deletions
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'<input type=hidden name="adcopy_challenge" id="adcopy_challenge" value="([^"]+)">', 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'<b><a href="(.+?)"', html).group(1)) - except: + except Exception: continue return links diff --git a/pyload/plugins/hoster/ShareonlineBiz.py b/pyload/plugins/hoster/ShareonlineBiz.py index af20a1761..685d31a2b 100644 --- a/pyload/plugins/hoster/ShareonlineBiz.py +++ b/pyload/plugins/hoster/ShareonlineBiz.py @@ -167,7 +167,7 @@ class ShareonlineBiz(SimpleHoster): try: self.logError(errmsg, re.search(self.ERROR_INFO_PATTERN, self.html).group(1)) - except: + except Exception: self.logError("Unknown error occurred", errmsg) if errmsg is "invalid": diff --git a/pyload/plugins/internal/SimpleHoster.py b/pyload/plugins/internal/SimpleHoster.py index d04044830..031271ad7 100644 --- a/pyload/plugins/internal/SimpleHoster.py +++ b/pyload/plugins/internal/SimpleHoster.py @@ -219,7 +219,7 @@ class SimpleHoster(Hoster): if e.code is 503: info['status'] = 6 raise - except: + except Exception: return info online = False |