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:
parent
bf91db4846
commit
6de650f51f
1 changed files with 3 additions and 3 deletions
|
@ -5,7 +5,7 @@ import json
|
||||||
import re
|
import re
|
||||||
|
|
||||||
from .common import InfoExtractor
|
from .common import InfoExtractor
|
||||||
from ..utils import ExtractorError, join_nonempty
|
from ..utils import ExtractorError, join_nonempty, traverse_obj
|
||||||
|
|
||||||
|
|
||||||
class NPOIE(InfoExtractor):
|
class NPOIE(InfoExtractor):
|
||||||
|
@ -140,9 +140,9 @@ class BNNVaraIE(NPOIE):
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'id': product_id,
|
'id': product_id,
|
||||||
'title': media.get('data', {}).get('player', {}).get('title'),
|
'title': traverse_obj(media, ('data', 'player', 'title')),
|
||||||
'formats': formats,
|
'formats': formats,
|
||||||
'thumbnail': media.get('data', {}).get('player', {}).get('image').get('url'),
|
'thumbnail': traverse_obj(media, ('data', 'player', 'image', 'url')),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue