[tf1] proper multipattern and relaxed regex
This commit is contained in:
parent
77d6e33ac6
commit
ae4df7d346
@ -64,13 +64,8 @@ class TF1IE(InfoExtractor):
|
|||||||
def _real_extract(self, url):
|
def _real_extract(self, url):
|
||||||
video_id = self._match_id(url)
|
video_id = self._match_id(url)
|
||||||
webpage = self._download_webpage(url, video_id)
|
webpage = self._download_webpage(url, video_id)
|
||||||
try:
|
|
||||||
wat_id = self._html_search_regex(
|
wat_id = self._html_search_regex(
|
||||||
# the old pattern. Should no longer work as of 2019-06-12
|
[r'(["\'])(?:https?:)?//www\.wat\.tv/embedframe/.*?(?P<id>\d{8})\1',
|
||||||
r'(["\'])(?:https?:)?//www\.wat\.tv/embedframe/.*?(?P<id>\d{8})\1',
|
r'(["\']?)streamId\1\s*:\s*["\']?(?P<id>\d+)'],
|
||||||
webpage, 'wat id', group='id')
|
|
||||||
except RegexNotFoundError:
|
|
||||||
wat_id = self._html_search_regex(
|
|
||||||
r'\bstreamId\W+(?P<id>\d+)',
|
|
||||||
webpage, 'wat id', group='id')
|
webpage, 'wat id', group='id')
|
||||||
return self.url_result('wat:%s' % wat_id, 'Wat')
|
return self.url_result('wat:%s' % wat_id, 'Wat')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user