summaryrefslogtreecommitdiffstats
path: root/module/plugins/crypter
diff options
context:
space:
mode:
Diffstat (limited to 'module/plugins/crypter')
-rw-r--r--module/plugins/crypter/ChipDe.py24
-rw-r--r--module/plugins/crypter/Movie2kTo.py15
2 files changed, 6 insertions, 33 deletions
diff --git a/module/plugins/crypter/ChipDe.py b/module/plugins/crypter/ChipDe.py
deleted file mode 100644
index fcb84a300..000000000
--- a/module/plugins/crypter/ChipDe.py
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: utf-8 -*-
-
-import re
-from module.plugins.Crypter import Crypter
-
-class ChipDe(Crypter):
- __name__ = "ChipDe"
- __type__ = "container"
- __pattern__ = r"http://(?:www\.)?chip.de/video/.*\.html"
- __version__ = "0.1"
- __description__ = """Chip.de Container 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))
diff --git a/module/plugins/crypter/Movie2kTo.py b/module/plugins/crypter/Movie2kTo.py
index c32f6f930..3be3be73c 100644
--- a/module/plugins/crypter/Movie2kTo.py
+++ b/module/plugins/crypter/Movie2kTo.py
@@ -89,17 +89,12 @@ class Movie2kTo(Crypter):
re_hoster_id_js = re.compile(r'links\[(\d+?)\].+&nbsp;(.+?)</a>')
re_hoster_id_html = re.compile(r'</td><td.*?<a href=".*?(\d{7}).*?".+?&nbsp;(.+?)</a>')
## I assume that the ID is 7 digits longs
- if re_hoster_id_js.search(self.html):
- re_hoster_id = re_hoster_id_js
- self.logDebug('Assuming that the ID can be found in a JavaScript section.')
- elif re_hoster_id_html.search(self.html):
- re_hoster_id = re_hoster_id_html
- self.logDebug('Assuming that the ID can be found in a HTML section.')
count = defaultdict(int)
- for h_id, hoster in re_hoster_id.findall(self.html):
- # self.logDebug('Hoster %s' % hoster)
+ matches = re_hoster_id_js.findall(self.html)
+ matches += re_hoster_id_html.findall(self.html)
+ for h_id, hoster in matches:
if hoster in accepted_hosters:
- # self.logDebug('Accepted %s' % hoster)
+ self.logDebug('Accepted: %s, ID: %s' % (hoster, h_id))
count[hoster] += 1
if count[hoster] <= firstN:
if h_id != self.id:
@@ -112,6 +107,8 @@ class Movie2kTo(Crypter):
links.append(url)
except:
self.logDebug('Failed to find the URL')
+ else:
+ self.logDebug('Not accepted: %s, ID: %s' % (hoster, h_id))
self.logDebug(links)
return links