diff options
author | Walter Purcaro <vuolter@gmail.com> | 2014-10-07 13:11:04 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2014-10-07 13:11:04 +0200 |
commit | 675dec650ee14137d9e613dcb780776257568654 (patch) | |
tree | ceec049068a7845ef13f37e6aa609583d4dd8424 /module | |
parent | [XFSPAccount] Improve loadAccountInfo (diff) | |
download | pyload-675dec650ee14137d9e613dcb780776257568654.tar.xz |
[XFileSharingPro] Code cosmetics
Diffstat (limited to 'module')
-rw-r--r-- | module/plugins/hooks/XFileSharingPro.py | 24 | ||||
-rw-r--r-- | module/plugins/hoster/XFileSharingPro.py | 2 |
2 files changed, 13 insertions, 13 deletions
diff --git a/module/plugins/hooks/XFileSharingPro.py b/module/plugins/hooks/XFileSharingPro.py index 1042d9498..65edbc72d 100644 --- a/module/plugins/hooks/XFileSharingPro.py +++ b/module/plugins/hooks/XFileSharingPro.py @@ -11,9 +11,9 @@ class XFileSharingPro(Hook): __version__ = "0.12" __config__ = [("activated", "bool", "Activated", True), - ("loadDefault", "bool", "Include default (built-in) hoster list", True), - ("includeList", "str", "Include hosters (comma separated)", ""), - ("excludeList", "str", "Exclude hosters (comma separated)", "")] + ("load_default", "bool", "Include default (built-in) hoster list", True), + ("include_hosters", "str", "Include hosters (comma separated)", ""), + ("exclude_hosters", "str", "Exclude hosters (comma separated)", "")] __description__ = """XFileSharingPro hook plugin""" __author_name__ = "zoidberg" @@ -25,11 +25,11 @@ class XFileSharingPro(Hook): def loadPattern(self): - hosterList = self.getConfigSet('includeList') - excludeList = self.getConfigSet('excludeList') + hoster_list = self.getConfigSet('include_hosters') + exclude_list = self.getConfigSet('exclude_hosters') - if self.getConfig('loadDefault'): - hosterList |= set(( + if self.getConfig('load_default'): + hoster_list |= set(( #WORKING HOSTERS: "aieshare.com", "asixfiles.com", "banashare.com", "cyberlocker.ch", "eyesfile.co", "eyesfile.com", "fileband.com", "filedwon.com", "filedownloads.org", "hipfile.com", "kingsupload.com", "mlfat4arab.com", @@ -54,19 +54,19 @@ class XFileSharingPro(Hook): "ddlanime.com", "fileforth.com", "loombo.com", "goldfile.eu", "putshare.com" )) - hosterList -= (excludeList) - hosterList -= set(('', u'')) + hoster_list -= (exclude_list) + hoster_list -= set(('', u'')) - if not hosterList: + if not hoster_list: self.unload() return - regexp = r"http://(?:[^/]*\.)?(%s)/(?:embed-)?\w{12}" % ("|".join(sorted(hosterList)).replace('.', '\.')) + regexp = r"http://(?:[^/]*\.)?(%s)/(?:embed-)?\w{12}" % ("|".join(sorted(hoster_list)).replace('.', '\.')) dict = self.core.pluginManager.hosterPlugins['XFileSharingPro'] dict['pattern'] = regexp dict['re'] = re.compile(regexp) - self.logDebug("Pattern loaded - handling %d hosters" % len(hosterList)) + self.logDebug("Pattern loaded - handling %d hosters" % len(hoster_list)) def getConfigSet(self, option): diff --git a/module/plugins/hoster/XFileSharingPro.py b/module/plugins/hoster/XFileSharingPro.py index 18e0920fc..6d97cf6ca 100644 --- a/module/plugins/hoster/XFileSharingPro.py +++ b/module/plugins/hoster/XFileSharingPro.py @@ -242,7 +242,7 @@ class XFileSharingPro(SimpleHoster): self.retry(25) elif 'countdown' in self.errmsg or 'Expired' in self.errmsg: self.retry() - elif 'maintenance' in self.errmsg: + elif 'maintenance' in self.errmsg or 'maintainance' in self.errmsg: self.tempOffline() elif 'download files up to' in self.errmsg: self.fail("File too large for free download") |