diff options
Diffstat (limited to 'module/plugins')
| -rw-r--r-- | module/plugins/crypter/Movie2kTo.py | 24 | 
1 files changed, 10 insertions, 14 deletions
| diff --git a/module/plugins/crypter/Movie2kTo.py b/module/plugins/crypter/Movie2kTo.py index 81f700e8c..097cb702e 100644 --- a/module/plugins/crypter/Movie2kTo.py +++ b/module/plugins/crypter/Movie2kTo.py @@ -132,23 +132,19 @@ class Movie2kTo(Crypter):  						self.html = self.load('%s/tvshows-%s-%s.html' % (self.BASE_URL, h_id, self.name))  					else:  						self.logDebug('This is already the right ID') -					try: -						url = re.search(r'<a target="_blank" href="(http://[^"]*?)"', self.html).group(1) -						self.logDebug('id: %s, %s: %s' % (h_id, hoster, url)) -						links.append(url) -					except: -						self.logDebug('Failed to find the URL (possibility 1)') +					# The iframe tag must continue with a width. There where +					# two iframes in the site and I try to make sure that it +					# matches the right one. This is not (yet) nessesary +					# because the right iframe happens to be the first iframe. +					for pattern in (r'<a target="_blank" href="(http://[^"]*?)"', r'<iframe src="(http://[^"]*?)" width'):  						try: -							url = re.search(r'<iframe src="(http://[^"]*?)" width', self.html).group(1) -							# The iframe tag must continue with a width. There -							# where two iframes in the site and I try to make sure -							# that it matches the right one. This is not (yet) -							# nessesary because the right iframe happens to be the -							# first iframe. +							url = re.search(pattern, self.html).group(1) +						except: +							self.logDebug('Failed to find the URL (pattern %s)' % pattern) +						else:  							self.logDebug('id: %s, %s: %s' % (h_id, hoster, url))  							links.append(url) -						except: -							self.logDebug('Failed to find the URL (possibility 2)') +							break  			else:  				self.logDebug('Not accepted: %s, ID: %s%s' % (hoster, h_id, q_s))  		# self.logDebug(links) | 
