mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-11-25 11:41:52 +00:00
[cbsinteractive] fix data extraction(closes #15451)
This commit is contained in:
parent
b9d52fb2ca
commit
d2a422f548
1 changed files with 2 additions and 2 deletions
|
@ -75,10 +75,10 @@ class CBSInteractiveIE(CBSIE):
|
||||||
webpage = self._download_webpage(url, display_id)
|
webpage = self._download_webpage(url, display_id)
|
||||||
|
|
||||||
data_json = self._html_search_regex(
|
data_json = self._html_search_regex(
|
||||||
r"data-(?:cnet|zdnet)-video(?:-uvp(?:js)?)?-options='([^']+)'",
|
r"data(?:-(?:cnet|zdnet))?-video(?:-(?:uvp(?:js)?|player))?-options='([^']+)'",
|
||||||
webpage, 'data json')
|
webpage, 'data json')
|
||||||
data = self._parse_json(data_json, display_id)
|
data = self._parse_json(data_json, display_id)
|
||||||
vdata = data.get('video') or data['videos'][0]
|
vdata = data.get('video') or (data.get('videos') or data.get('playlist'))[0]
|
||||||
|
|
||||||
video_id = vdata['mpxRefId']
|
video_id = vdata['mpxRefId']
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue