Skip to content

Commit

Permalink
Use traverse_obj in another place as well
Browse files Browse the repository at this point in the history
  • Loading branch information
bartbroere committed Sep 21, 2024
1 parent bf91db4 commit 6de650f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions youtube_dl/extractor/npo.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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')),
}


Expand Down

0 comments on commit 6de650f

Please sign in to comment.