Add more keys to filter

- `heatmap`: is a huge list of tiny "chapters" used to display popularity of sections of the video
- `requested_subtitles`: also has a URL that expires
This commit is contained in:
tcely authored and GitHub committed 2025-02-07 14:58:43 -05:00
1 parent 53e7cc2c87
commit 7f64226369
1 file changed
+7 -1
+7 -1
View File
@@ -282,13 +282,19 @@ def filter_response(arg_dict, copy_arg=False):
) )
) )
for key in frozenset(('subtitles', 'automatic_captions',)): for key in frozenset(('subtitles', 'requested_subtitles', 'automatic_captions',)):
if key in response_dict.keys(): if key in response_dict.keys():
key_dict = response_dict[key] key_dict = response_dict[key]
for lang_code in key_dict: for lang_code in key_dict:
_drop_url_keys(key_dict, lang_code, drop_subtitles_url) _drop_url_keys(key_dict, lang_code, drop_subtitles_url)
# end of subtitles cleanup }}} # end of subtitles cleanup }}}
# beginning of heatmap cleanup {{{
for key in frozenset(('heatmap',)):
if key in response_dict.keys():
del response_dict[key]
# end of heatmap cleanup }}}
return response_dict return response_dict