diff --git a/youtube_dl/extractor/npo.py b/youtube_dl/extractor/npo.py index 502d276ff..7f90aa827 100644 --- a/youtube_dl/extractor/npo.py +++ b/youtube_dl/extractor/npo.py @@ -70,6 +70,8 @@ class NPOIE(InfoExtractor): page = self._download_webpage(url, slug, 'Finding productId using slug: %s' % slug) # TODO find out what proper HTML parsing utilities are available in youtube-dl next_data = page.split('')[0] + # TODO The data in this script tag feels like GraphQL, so there might be an easier way + # to get the product id, maybe using a GraphQL endpoint next_data = json.loads(next_data) product_id, title, description, thumbnail = None, None, None, None for query in next_data['props']['pageProps']['dehydratedState']['queries']: