From 4d9d8cec6f7ca18457eec98c4f4894ca4202ae84 Mon Sep 17 00:00:00 2001 From: James Taylor Date: Sat, 4 Apr 2020 22:53:49 -0700 Subject: Fix error when there's a video format with mimetype class of 'text' --- youtube/yt_data_extract/watch_extraction.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'youtube') diff --git a/youtube/yt_data_extract/watch_extraction.py b/youtube/yt_data_extract/watch_extraction.py index 0b30c91..193b84b 100644 --- a/youtube/yt_data_extract/watch_extraction.py +++ b/youtube/yt_data_extract/watch_extraction.py @@ -294,7 +294,7 @@ def _extract_watch_info_desktop(top_level): return info fmt_type_re = re.compile( - r'(audio|video)/([\w0-9]+); codecs="([\w0-9\.]+(?:, [\w0-9\.]+)*)"') + r'(text|audio|video)/([\w0-9]+); codecs="([\w0-9\.]+(?:, [\w0-9\.]+)*)"') def update_format_with_type_info(fmt, yt_fmt): # 'type' for invidious api format mime_type = multi_get(yt_fmt, 'mimeType', 'type') -- cgit v1.2.3