summaryrefslogtreecommitdiffstats
path: root/module/plugins/crypter/ChipDe.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2014-04-11 11:59:32 +0200
committerGravatar Stefano <l.stickell@yahoo.it> 2014-04-11 12:04:28 +0200
commit4061e76e218b82503a41af1d165e5feb7baeb283 (patch)
treec91c26df9ee48431507b365246fb69beeabcbcf5 /module/plugins/crypter/ChipDe.py
parentReplace range with xrange (diff)
downloadpyload-4061e76e218b82503a41af1d165e5feb7baeb283.tar.xz
Fix __type__ for crypters
Merges vuolter/pyload@48af9ab
Diffstat (limited to 'module/plugins/crypter/ChipDe.py')
-rw-r--r--module/plugins/crypter/ChipDe.py25
1 files changed, 25 insertions, 0 deletions
diff --git a/module/plugins/crypter/ChipDe.py b/module/plugins/crypter/ChipDe.py
new file mode 100644
index 000000000..89ef1705d
--- /dev/null
+++ b/module/plugins/crypter/ChipDe.py
@@ -0,0 +1,25 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+import re
+from module.plugins.Crypter import Crypter
+
+
+class ChipDe(Crypter):
+ __name__ = "ChipDe"
+ __type__ = "crypter"
+ __pattern__ = r"http://(?:www\.)?chip.de/video/.*\.html"
+ __version__ = "0.1"
+ __description__ = """Chip.de decrypter plugin"""
+ __author_name__ = "4Christopher"
+ __author_mail__ = "4Christopher@gmx.de"
+
+ def decrypt(self, pyfile):
+ self.html = self.load(pyfile.url)
+ try:
+ url = re.search(r'"(http://video.chip.de/\d+?/.*)"', self.html).group(1)
+ self.logDebug('The file URL is %s' % url)
+ except:
+ self.fail('Failed to find the URL')
+
+ self.packages.append((self.pyfile.package().name, [url], self.pyfile.package().folder))