summaryrefslogtreecommitdiffstats
path: root/module/plugins/addons/LinkdecrypterCom.py
diff options
context:
space:
mode:
Diffstat (limited to 'module/plugins/addons/LinkdecrypterCom.py')
-rw-r--r--module/plugins/addons/LinkdecrypterCom.py23
1 files changed, 14 insertions, 9 deletions
diff --git a/module/plugins/addons/LinkdecrypterCom.py b/module/plugins/addons/LinkdecrypterCom.py
index ac939afd9..2cb91d120 100644
--- a/module/plugins/addons/LinkdecrypterCom.py
+++ b/module/plugins/addons/LinkdecrypterCom.py
@@ -24,31 +24,36 @@ from module.utils import remove_chars
class LinkdecrypterCom(Hook):
__name__ = "LinkdecrypterCom"
- __version__ = "0.14"
+ __version__ = "0.16"
__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)
+ m = re.search(r'<b>Supported\(\d+\)</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
dict["re"] = re.compile(regexp)
- self.logDebug("REGEXP: " + regexp) \ No newline at end of file
+ self.logDebug("REGEXP: " + regexp)