diff --git a/youtube_dl/extractor/npo.py b/youtube_dl/extractor/npo.py index 70e297e19d9..e130f2dbdab 100644 --- a/youtube_dl/extractor/npo.py +++ b/youtube_dl/extractor/npo.py @@ -5,7 +5,7 @@ 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 @@ def _real_extract(self, url): 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')), }