diff options
| author | 2013-03-12 11:18:57 +0100 | |
|---|---|---|
| committer | 2013-03-12 11:18:57 +0100 | |
| commit | 728e322eea109d4245199179d9dfbeb98966dba2 (patch) | |
| tree | 73a1f3bbd14b6f289e93714481a3c5155c7460ac | |
| parent | Merge branch 'stable' of git://github.com/pyload/pyload into stable (diff) | |
| download | pyload-728e322eea109d4245199179d9dfbeb98966dba2.tar.xz | |
Movie2kTo: fixed regex to be more reliable
| -rw-r--r-- | module/plugins/crypter/Movie2kTo.py | 6 | 
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+?)\].+ (.+?)</a>') -		re_hoster_id_html = re.compile(r'<a href=".*?(\d{7}).*?".+? (.+?)</a>') +		re_hoster_id_html = re.compile(r'</td><td.*?<a href=".*?(\d{7}).*?".+? (.+?)</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: | 
