diff --git a/searx/engines/peertube.py b/searx/engines/peertube.py index 86cd04f2d..058065c03 100644 --- a/searx/engines/peertube.py +++ b/searx/engines/peertube.py @@ -97,6 +97,6 @@ def _fetch_supported_languages(resp): import re # https://docs.python.org/3/howto/regex.html#greedy-versus-non-greedy - videolanguages = re.search(r"videoLanguages \(\) \{(.*?)\]", resp.text, re.DOTALL) + videolanguages = re.search(r"videoLanguages \(\)[^\n]+(.*?)\]", resp.text, re.DOTALL) peertube_languages = [m.group(1) for m in re.finditer(r"\{ id: '([a-z]+)', label:", videolanguages.group(1))] return peertube_languages