diff options
author | Walter Purcaro <vuolter@gmail.com> | 2014-12-01 23:53:07 +0100 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2014-12-01 23:53:07 +0100 |
commit | 004a80bfaad38f9400e8aebcb8f980353a232295 (patch) | |
tree | 1e786d2d14a3040767aac237982544b74a9567cb /pyload/plugins/hoster/NetloadIn.py | |
parent | Fix previous merge (diff) | |
download | pyload-004a80bfaad38f9400e8aebcb8f980353a232295.tar.xz |
PEP-8, Python Zen, refactor and reduce code (thx FedeG)
Diffstat (limited to 'pyload/plugins/hoster/NetloadIn.py')
-rw-r--r-- | pyload/plugins/hoster/NetloadIn.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/pyload/plugins/hoster/NetloadIn.py b/pyload/plugins/hoster/NetloadIn.py index b517fe455..07aeb48ca 100644 --- a/pyload/plugins/hoster/NetloadIn.py +++ b/pyload/plugins/hoster/NetloadIn.py @@ -40,10 +40,10 @@ def getInfo(urls): tmp = r.split(";") try: size = int(tmp[2]) - except: + except Exception: size = 0 result.append((tmp[1], size, 2 if tmp[3] == "online" else 1, chunk[i])) - except: + except Exception: self.logDebug("Error while processing response: %s" % r) yield result @@ -201,14 +201,14 @@ class NetloadIn(Hoster): try: url_captcha_html = "http://netload.in/" + re.search('(index.php\?id=10&.*&captcha=1)', page).group(1).replace("amp;", "") - except: + except Exception: page = None continue try: page = self.load(url_captcha_html, cookies=True) captcha_url = "http://netload.in/" + re.search('(share/includes/captcha.php\?t=\d*)', page).group(1) - except: + except Exception: self.logDebug("Could not find captcha, try again from beginning") captchawaited = False continue @@ -243,7 +243,7 @@ class NetloadIn(Hoster): file_url_pattern = r'<a href="(.+)" class="Orange_Link">Click here' attempt = re.search(file_url_pattern, page) return "http://netload.in/" + attempt.group(1) - except: + except Exception: self.logDebug("Getting final link failed") return None |