summaryrefslogtreecommitdiffstats
path: root/module/plugins/hooks/MultishareCz.py
diff options
context:
space:
mode:
Diffstat (limited to 'module/plugins/hooks/MultishareCz.py')
-rw-r--r--module/plugins/hooks/MultishareCz.py16
1 files changed, 2 insertions, 14 deletions
diff --git a/module/plugins/hooks/MultishareCz.py b/module/plugins/hooks/MultishareCz.py
index a00c6cb2b..f8fa9290a 100644
--- a/module/plugins/hooks/MultishareCz.py
+++ b/module/plugins/hooks/MultishareCz.py
@@ -11,7 +11,7 @@ def getConfigSet(option):
class MultishareCz(MultiHoster):
__name__ = "MultishareCz"
- __version__ = "0.03"
+ __version__ = "0.04"
__type__ = "hook"
__config__ = [("activated", "bool", "Activated", "False"),
("hosterListMode", "all;listed;unlisted", "Use for hosters (if supported)", "all"),
@@ -20,21 +20,9 @@ class MultishareCz(MultiHoster):
__author_name__ = ("zoidberg")
__author_mail__ = ("zoidberg@mujmail.cz")
- replacements = [("share-rapid.cz", "sharerapid.com")]
HOSTER_PATTERN = r'<img class="logo-shareserveru"[^>]*?alt="([^"]+)"></td>\s*<td class="stav">[^>]*?alt="OK"'
def getHoster(self):
page = getURL("http://www.multishare.cz/monitoring/")
- hosters = set(h.lower().strip() for h in re.findall(self.HOSTER_PATTERN, page))
-
- configMode = self.getConfig('hosterListMode')
- if configMode in ("listed", "unlisted"):
- configList = set(self.getConfig('hosterList').strip().lower().replace('|',',').replace(';',',').split(','))
- configList.discard(u'')
- if configMode == "listed":
- hosters &= configList
- elif configMode == "unlisted":
- hosters -= configList
-
- return list(hosters) \ No newline at end of file
+ return re.findall(self.HOSTER_PATTERN, page) \ No newline at end of file