logo

youtube-dl

[mirror] Download/Watch videos from video hostersgit clone https://hacktivis.me/git/mirror/youtube-dl.git
commit: 6d4932f02347bb1d0228b20798435930022bf316
parent 92d73ef3936ed6de9770f613fddf2260731becc9
Author: df <fieldhouse@gmx.net>
Date:   Sun, 18 Apr 2021 01:46:40 +0100

Try for timestamp, description from window.__INITIAL_DATA__ pages

Diffstat:

Myoutube_dl/extractor/bbc.py5++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/youtube_dl/extractor/bbc.py b/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'))