diff options
author | pukkandan <pukkandan.ytdlp@gmail.com> | 2022-01-20 03:25:15 +0530 |
---|---|---|
committer | pukkandan <pukkandan.ytdlp@gmail.com> | 2022-01-20 04:38:24 +0530 |
commit | 135dfa2c7ebc9284db940713c0dc6cbc19ca5fa4 (patch) | |
tree | a555a6c1d7d2d053c2c31b19c55eb8c2ef602a04 /yt_dlp/extractor/common.py | |
parent | e0585e6562bc467a17c9fef7b48b83c6f0f83652 (diff) | |
download | hypervideo-pre-135dfa2c7ebc9284db940713c0dc6cbc19ca5fa4.tar.lz hypervideo-pre-135dfa2c7ebc9284db940713c0dc6cbc19ca5fa4.tar.xz hypervideo-pre-135dfa2c7ebc9284db940713c0dc6cbc19ca5fa4.zip |
[extractor,cleanup] Use `_search_nextjs_data`
Diffstat (limited to 'yt_dlp/extractor/common.py')
-rw-r--r-- | yt_dlp/extractor/common.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/yt_dlp/extractor/common.py b/yt_dlp/extractor/common.py index a23840e41..1436724dd 100644 --- a/yt_dlp/extractor/common.py +++ b/yt_dlp/extractor/common.py @@ -1544,12 +1544,12 @@ class InfoExtractor(object): return dict((k, v) for k, v in info.items() if v is not None) - def _search_nextjs_data(self, webpage, video_id, **kw): + def _search_nextjs_data(self, webpage, video_id, *, transform_source=None, fatal=True, **kw): return self._parse_json( self._search_regex( r'(?s)<script[^>]+id=[\'"]__NEXT_DATA__[\'"][^>]*>([^<]+)</script>', - webpage, 'next.js data', **kw), - video_id, **kw) + webpage, 'next.js data', fatal=fatal, **kw), + video_id, transform_source=transform_source, fatal=fatal) def _search_nuxt_data(self, webpage, video_id, context_name='__NUXT__'): ''' Parses Nuxt.js metadata. This works as long as the function __NUXT__ invokes is a pure function. ''' |