[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.
archive/recovered-github-prs
Will Beaufoy 4 years ago
parent 38db9a405a
commit a38b8a609b

@ -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(

Loading…
Cancel
Save