mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-12-22 07:56:49 +00:00
Use traverse_obj in another place as well
This commit is contained in:
parent
bf91db4846
commit
6de650f51f
@ -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')),
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user