[cbsnews] Handle iframes with src (closes #24790)

Currently only iframes with a data-src attribute are recognised by the
extractor, meaning no video is found for the URL in the linked bug
(extraction fails with RegexNotFoundError).

This fix removes "data-" from the regex pattern, meaning both data-src
and src will be matched. Technically something like xyzsrc would be
matched as well, but I do not think this is a problem.
This commit is contained in:
Will Beaufoy 2020-04-25 19:17:29 +01:00
parent 38db9a405a
commit a38b8a609b
1 changed files with 2 additions and 1 deletions

View File

@ -95,7 +95,8 @@ class CBSNewsIE(CBSIE):
webpage = self._download_webpage(url, display_id)
entries = []
for embed_url in re.findall(r'<iframe[^>]+data-src="(https?://(?:www\.)?cbsnews\.com/embed/video/[^#]*#[^"]+)"', webpage):
# This regex is intended to match attributes src and data-src
for embed_url in re.findall(r'<iframe[^>]+src="(https?://(?:www\.)?cbsnews\.com/embed/video/[^#]*#[^"]+)"', webpage):
entries.append(self.url_result(embed_url, CBSNewsEmbedIE.ie_key()))
if entries:
return self.playlist_result(