1
0
Fork 0
mirror of https://github.com/ytdl-org/youtube-dl.git synced 2024-11-25 19:52:11 +00:00

Use traverse_obj in another place as well

This commit is contained in:
Bart Broere 2024-09-21 20:08:53 +00:00
parent bf91db4846
commit 6de650f51f

View file

@ -5,7 +5,7 @@ import json
import re
from .common import InfoExtractor
from ..utils import ExtractorError, join_nonempty
from ..utils import ExtractorError, join_nonempty, traverse_obj
class NPOIE(InfoExtractor):
@ -140,9 +140,9 @@ class BNNVaraIE(NPOIE):
return {
'id': product_id,
'title': media.get('data', {}).get('player', {}).get('title'),
'title': traverse_obj(media, ('data', 'player', 'title')),
'formats': formats,
'thumbnail': media.get('data', {}).get('player', {}).get('image').get('url'),
'thumbnail': traverse_obj(media, ('data', 'player', 'image', 'url')),
}