diff options
author | zoidberg10 <zoidberg@mujmail.cz> | 2012-11-13 21:57:57 +0100 |
---|---|---|
committer | zoidberg10 <zoidberg@mujmail.cz> | 2012-11-13 21:57:57 +0100 |
commit | 94966b3c2a093a79858dd9672ae2380bdc3ccf6e (patch) | |
tree | cf634304915a98d122d92916e4fff55749fc8a59 /module/plugins/hooks/LinkdecrypterCom.py | |
parent | update XFileSharingPro & add billionuploads,sendmyway,sharebees plugins (diff) | |
download | pyload-94966b3c2a093a79858dd9672ae2380bdc3ccf6e.tar.xz |
netload.in - fix some urls, linkdecrypter - fix crypter list
Diffstat (limited to 'module/plugins/hooks/LinkdecrypterCom.py')
-rw-r--r-- | module/plugins/hooks/LinkdecrypterCom.py | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/module/plugins/hooks/LinkdecrypterCom.py b/module/plugins/hooks/LinkdecrypterCom.py index ac939afd9..a554e05eb 100644 --- a/module/plugins/hooks/LinkdecrypterCom.py +++ b/module/plugins/hooks/LinkdecrypterCom.py @@ -24,28 +24,33 @@ from module.utils import remove_chars class LinkdecrypterCom(Hook): __name__ = "LinkdecrypterCom" - __version__ = "0.14" + __version__ = "0.15" __description__ = """linkdecrypter.com - regexp loader""" __config__ = [ ("activated", "bool", "Activated" , "True") ] __author_name__ = ("zoidberg") - + def coreReady(self): page = getURL("http://linkdecrypter.com/") m = re.search(r'<b>Supported</b>: <i>([^+<]*)', page) if not m: self.logError(_("Crypter list not found")) return - - online = m.group(1).split(', ') + builtin = [ name.lower() for name in self.core.pluginManager.crypterPlugins.keys() ] builtin.extend([ "downloadserienjunkiesorg" ]) - - online = [ crypter.replace(".", "\\.") for crypter in online if remove_chars(crypter, "-.") not in builtin ] + + crypter_pattern = re.compile("(\w[\w.-]+)") + online = [] + for crypter in m.group(1).split(', '): + m = re.match(crypter_pattern, crypter) + if m and remove_chars(m.group(1), "-.") not in builtin: + online.append(m.group(1).replace(".", "\\.")) + if not online: self.logError(_("Crypter list is empty")) return - regexp = r"https?://([^.]+\.)*?(%s)/.*" % "|".join(online) + regexp = r"http://([^.]+\.)*?(%s)/.*" % "|".join(online) dict = self.core.pluginManager.crypterPlugins[self.__name__] dict["pattern"] = regexp |