summaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
authorGravatar Stefano <l.stickell@yahoo.it> 2013-04-12 15:27:21 +0200
committerGravatar Stefano <l.stickell@yahoo.it> 2013-04-12 15:27:21 +0200
commitf68b64367ea0bca12318fcf96208879872cd91a7 (patch)
tree15f11d5ee4f4fde3db72522e04b2606b8b02fafb /module
parentEgoFilesCom: fixed FILE_INFO_PATTERN (diff)
downloadpyload-f68b64367ea0bca12318fcf96208879872cd91a7.tar.xz
New crypter: MBLinkInfo
Diffstat (limited to 'module')
-rw-r--r--module/plugins/crypter/MBLinkInfo.py27
1 files changed, 27 insertions, 0 deletions
diff --git a/module/plugins/crypter/MBLinkInfo.py b/module/plugins/crypter/MBLinkInfo.py
new file mode 100644
index 000000000..0c0359ed9
--- /dev/null
+++ b/module/plugins/crypter/MBLinkInfo.py
@@ -0,0 +1,27 @@
+# -*- coding: utf-8 -*-
+
+import re
+
+from module.plugins.Crypter import Crypter
+
+
+class MBLinkInfo(Crypter):
+ __name__ = "MBLinkInfo"
+ __type__ = "container"
+ __pattern__ = r"http://(?:www\.)?mblink\.info/\?id=(\d+)"
+ __version__ = "0.01"
+ __description__ = """MBLink.Info Container Plugin"""
+ __author_name__ = ("Gummibaer", "stickell")
+ __author_mail__ = ("Gummibaer@wiki-bierkiste.de", "l.stickell@yahoo.it")
+
+ URL_PATTERN = r'<meta[^;]+; URL=(.*)["\']>'
+
+ def decrypt(self, pyfile):
+ src = self.load(pyfile.url)
+ found = re.search(self.URL_PATTERN, src)
+ if found:
+ link = found.group(1)
+ self.logDebug("Redirected to " + link)
+ self.core.files.addLinks([link], self.pyfile.package().id)
+ else:
+ self.fail('Unable to detect valid link')