Try for timestamp, description from window.__INITIAL_DATA__ pages

pull/30613/head
df 1 year ago committed by dirkf
parent 92d73ef393
commit 6d4932f023
  1. 5
      youtube_dl/extractor/bbc.py

@ -1205,7 +1205,10 @@ class BBCIE(BBCCoUkIE):
if name == 'media-experience':
parse_media(try_get(resp, lambda x: x['data']['initialItem']['mediaItem'], dict))
elif name == 'article':
for block in (try_get(resp, lambda x: x['data']['blocks'], list) or []):
for block in (try_get(resp,
(lambda x: x['data']['blocks'],
lambda x: x['data']['content']['model']['blocks'],),
list) or []):
if block.get('type') != 'media':
continue
parse_media(block.get('model'))

Loading…
Cancel
Save