summaryrefslogtreecommitdiffstats
path: root/module/plugins/crypter/MultiloadCz.py
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2013-06-09 18:10:22 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2013-06-09 18:10:23 +0200
commit16af85004c84d0d6c626b4f8424ce9647669a0c1 (patch)
tree025d479862d376dbc17e934f4ed20031c8cd97d1 /module/plugins/crypter/MultiloadCz.py
parentadapted to jshint config (diff)
downloadpyload-16af85004c84d0d6c626b4f8424ce9647669a0c1.tar.xz
moved everything from module to pyload
Diffstat (limited to 'module/plugins/crypter/MultiloadCz.py')
-rw-r--r--module/plugins/crypter/MultiloadCz.py41
1 files changed, 0 insertions, 41 deletions
diff --git a/module/plugins/crypter/MultiloadCz.py b/module/plugins/crypter/MultiloadCz.py
deleted file mode 100644
index 2c71b8fea..000000000
--- a/module/plugins/crypter/MultiloadCz.py
+++ /dev/null
@@ -1,41 +0,0 @@
-# -*- coding: utf-8 -*-
-
-import re
-from module.plugins.Crypter import Crypter
-
-class MultiloadCz(Crypter):
- __name__ = "MultiloadCz"
- __type__ = "crypter"
- __pattern__ = r"http://.*multiload.cz/(stahnout|slozka)/.*"
- __version__ = "0.4"
- __description__ = """multiload.cz"""
- __config__ = [("usedHoster", "str", "Prefered hoster list (bar-separated) ", ""),
- ("ignoredHoster", "str", "Ignored hoster list (bar-separated) ", "")]
- __author_name__ = ("zoidberg")
- __author_mail__ = ("zoidberg@mujmail.cz")
-
- FOLDER_PATTERN = r'<form action="" method="get"><textarea[^>]*>([^>]*)</textarea></form>'
- LINK_PATTERN = r'<p class="manager-server"><strong>([^<]+)</strong></p><p class="manager-linky"><a href="([^"]+)">'
-
- def decrypt(self, pyfile):
- self.html = self.load(self.pyfile.url, decode=True)
- new_links = []
-
- if re.search(self.__pattern__, self.pyfile.url).group(1) == "slozka":
- found = re.search(self.FOLDER_PATTERN, self.html)
- if found is not None:
- new_links.extend(found.group(1).split())
- else:
- found = re.findall(self.LINK_PATTERN, self.html)
- if found:
- prefered_set = set(self.getConfig("usedHoster").split('|'))
- new_links.extend([x[1] for x in found if x[0] in prefered_set])
-
- if not new_links:
- ignored_set = set(self.getConfig("ignoredHoster").split('|'))
- new_links.extend([x[1] for x in found if x[0] not in ignored_set])
-
- if new_links:
- self.core.files.addLinks(new_links, self.pyfile.package().id)
- else:
- self.fail('Could not extract any links') \ No newline at end of file