diff options
Diffstat (limited to 'pyload/plugins/hoster')
-rw-r--r-- | pyload/plugins/hoster/DepositfilesCom.py | 2 | ||||
-rw-r--r-- | pyload/plugins/hoster/DlFreeFr.py | 2 | ||||
-rw-r--r-- | pyload/plugins/hoster/FilesMailRu.py | 2 | ||||
-rw-r--r-- | pyload/plugins/hoster/FourSharedCom.py | 2 | ||||
-rw-r--r-- | pyload/plugins/hoster/Ftp.py | 2 | ||||
-rw-r--r-- | pyload/plugins/hoster/MediafireCom.py | 2 | ||||
-rw-r--r-- | pyload/plugins/hoster/NetloadIn.py | 10 | ||||
-rw-r--r-- | pyload/plugins/hoster/PremiumTo.py | 2 | ||||
-rw-r--r-- | pyload/plugins/hoster/ShareonlineBiz.py | 2 | ||||
-rw-r--r-- | pyload/plugins/hoster/VimeoCom.py | 2 | ||||
-rw-r--r-- | pyload/plugins/hoster/YibaishiwuCom.py | 2 | ||||
-rw-r--r-- | pyload/plugins/hoster/ZippyshareCom.py | 2 |
12 files changed, 16 insertions, 16 deletions
diff --git a/pyload/plugins/hoster/DepositfilesCom.py b/pyload/plugins/hoster/DepositfilesCom.py index ca26ebc47..001fee199 100644 --- a/pyload/plugins/hoster/DepositfilesCom.py +++ b/pyload/plugins/hoster/DepositfilesCom.py @@ -97,7 +97,7 @@ class DepositfilesCom(SimpleHoster): try: self.download(link, disposition=True) - except: + except Exception: self.retry(wait_time=60) diff --git a/pyload/plugins/hoster/DlFreeFr.py b/pyload/plugins/hoster/DlFreeFr.py index b06609298..2bfd88c22 100644 --- a/pyload/plugins/hoster/DlFreeFr.py +++ b/pyload/plugins/hoster/DlFreeFr.py @@ -33,7 +33,7 @@ class CustomBrowser(Browser): return Browser.load(self, *args, **kwargs) -class AdYouLike: +class AdYouLike(object): """ Class to support adyoulike captcha service """ diff --git a/pyload/plugins/hoster/FilesMailRu.py b/pyload/plugins/hoster/FilesMailRu.py index 1c7c8059e..4a5118fda 100644 --- a/pyload/plugins/hoster/FilesMailRu.py +++ b/pyload/plugins/hoster/FilesMailRu.py @@ -21,7 +21,7 @@ def getInfo(urls): url_pattern = '<a href="(.+?)" onclick="return Act\(this\, \'dlink\'\, event\)">(.+?)</a>' file_name = re.search(url_pattern, html).group(0).split(', event)">')[1].split('</a>')[0] result.append((file_name, 0, 2, url)) - except: + except Exception: pass # status 1=OFFLINE, 2=OK, 3=UNKNOWN diff --git a/pyload/plugins/hoster/FourSharedCom.py b/pyload/plugins/hoster/FourSharedCom.py index 03500654e..79e99aee4 100644 --- a/pyload/plugins/hoster/FourSharedCom.py +++ b/pyload/plugins/hoster/FourSharedCom.py @@ -51,7 +51,7 @@ class FourSharedCom(SimpleHoster): m = re.search(self.FID_PATTERN, self.html) res = self.load('http://www.4shared.com/web/d2/getFreeDownloadLimitInfo?fileId=%s' % m.group(1)) self.logDebug(res) - except: + except Exception: pass self.wait(20) diff --git a/pyload/plugins/hoster/Ftp.py b/pyload/plugins/hoster/Ftp.py index 2baec064b..c130cc395 100644 --- a/pyload/plugins/hoster/Ftp.py +++ b/pyload/plugins/hoster/Ftp.py @@ -35,7 +35,7 @@ class Ftp(Hoster): pyfile.name = parsed_url.path.rpartition('/')[2] try: pyfile.name = unquote(str(pyfile.name)).decode('utf8') - except: + except Exception: pass if not "@" in netloc: diff --git a/pyload/plugins/hoster/MediafireCom.py b/pyload/plugins/hoster/MediafireCom.py index 10d25ab9d..246a5c87e 100644 --- a/pyload/plugins/hoster/MediafireCom.py +++ b/pyload/plugins/hoster/MediafireCom.py @@ -28,7 +28,7 @@ def checkHTMLHeader(url): return url, 2 else: break - except: + except Exception: return url, 3 return url, 0 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 diff --git a/pyload/plugins/hoster/PremiumTo.py b/pyload/plugins/hoster/PremiumTo.py index 305b6d1d1..03ac37599 100644 --- a/pyload/plugins/hoster/PremiumTo.py +++ b/pyload/plugins/hoster/PremiumTo.py @@ -72,6 +72,6 @@ class PremiumTo(Hoster): api_r = self.load("http://premium.to/api/straffic.php", get={'username': self.account.username, 'password': self.account.password}) traffic = sum(map(int, api_r.split(';'))) - except: + except Exception: traffic = 0 return traffic diff --git a/pyload/plugins/hoster/ShareonlineBiz.py b/pyload/plugins/hoster/ShareonlineBiz.py index 0769cfe17..59204eb2e 100644 --- a/pyload/plugins/hoster/ShareonlineBiz.py +++ b/pyload/plugins/hoster/ShareonlineBiz.py @@ -177,7 +177,7 @@ class ShareonlineBiz(Hoster): err = m.group(1) try: self.logError(err, re.search(self.ERROR_INFO_PATTERN, self.html).group(1)) - except: + except Exception: self.logError(err, "Unknown error occurred") if err == "invalid": diff --git a/pyload/plugins/hoster/VimeoCom.py b/pyload/plugins/hoster/VimeoCom.py index bfa2cbb79..a24eedee2 100644 --- a/pyload/plugins/hoster/VimeoCom.py +++ b/pyload/plugins/hoster/VimeoCom.py @@ -44,7 +44,7 @@ class VimeoCom(SimpleHoster): html = self.load("https://player.vimeo.com/video/" + id, get={'password': password}) pattern = r'"(?P<QL>\w+)":{"profile".*?"(?P<URL>http://pdl\.vimeocdn\.com.+?)"' - link = dict([(l.group('QL').lower(), l.group('URL')) for l in re.finditer(pattern, html)]) + link = dict((l.group('QL').lower(), l.group('URL')) for l in re.finditer(pattern, html)) if self.getConfig("original"): if "original" in link: diff --git a/pyload/plugins/hoster/YibaishiwuCom.py b/pyload/plugins/hoster/YibaishiwuCom.py index 883dfa947..82ba9e8dc 100644 --- a/pyload/plugins/hoster/YibaishiwuCom.py +++ b/pyload/plugins/hoster/YibaishiwuCom.py @@ -46,7 +46,7 @@ class YibaishiwuCom(SimpleHoster): self.logDebug("Trying URL: " + url) self.download(url) break - except: + except Exception: continue else: self.fail(_("No working link found")) diff --git a/pyload/plugins/hoster/ZippyshareCom.py b/pyload/plugins/hoster/ZippyshareCom.py index 8f9062cfc..53b93d928 100644 --- a/pyload/plugins/hoster/ZippyshareCom.py +++ b/pyload/plugins/hoster/ZippyshareCom.py @@ -56,7 +56,7 @@ class ZippyshareCom(SimpleHoster): c1, c2 = map(int, re.search(r'\(\'downloadB\'\).omg\) \* \((\d+)%(\d+)', self.html).groups()) b = (a1 % a2) * (c1 % c2) - except: + except Exception: self.error(_("Unable to calculate checksum")) else: return b + 18 |