summaryrefslogtreecommitdiffstats
path: root/module/plugins/crypter/Movie2kTo.py
diff options
context:
space:
mode:
authorGravatar Christopher <4Christopher@gmx.de> 2013-03-12 11:18:57 +0100
committerGravatar Christopher <4Christopher@gmx.de> 2013-03-12 11:18:57 +0100
commit728e322eea109d4245199179d9dfbeb98966dba2 (patch)
tree73a1f3bbd14b6f289e93714481a3c5155c7460ac /module/plugins/crypter/Movie2kTo.py
parentMerge branch 'stable' of git://github.com/pyload/pyload into stable (diff)
downloadpyload-728e322eea109d4245199179d9dfbeb98966dba2.tar.xz
Movie2kTo: fixed regex to be more reliable
Diffstat (limited to 'module/plugins/crypter/Movie2kTo.py')
-rw-r--r--module/plugins/crypter/Movie2kTo.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/module/plugins/crypter/Movie2kTo.py b/module/plugins/crypter/Movie2kTo.py
index d1c711f17..c32f6f930 100644
--- a/module/plugins/crypter/Movie2kTo.py
+++ b/module/plugins/crypter/Movie2kTo.py
@@ -87,15 +87,19 @@ class Movie2kTo(Crypter):
links = []
## h_id: hoster_id of a possible hoster
re_hoster_id_js = re.compile(r'links\[(\d+?)\].+&nbsp;(.+?)</a>')
- re_hoster_id_html = re.compile(r'<a href=".*?(\d{7}).*?".+?&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)
if hoster in accepted_hosters:
+ # self.logDebug('Accepted %s' % hoster)
count[hoster] += 1
if count[hoster] <= firstN:
if h_id != self.id: