diff options
author | Alexandre Flament <alex@al-f.net> | 2021-07-25 10:30:53 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-25 10:30:53 +0200 |
commit | 48fe83b901dbfefae5a0307de21cd586cd1d5fb6 (patch) | |
tree | e034dabb1e236ae587561cfa6e448b83db82f930 | |
parent | cb4220657c38b2909d16f01a5ff0ae0debcc18a7 (diff) | |
parent | b0a12924a0c644e5eb43b873a332039684216bfd (diff) | |
download | searxng-48fe83b901dbfefae5a0307de21cd586cd1d5fb6.tar.gz searxng-48fe83b901dbfefae5a0307de21cd586cd1d5fb6.zip |
Merge pull request #221 from dalf/fix-peertube_fetch_supported_languages
[fix] peertube: update _fetch_supported_languages
-rw-r--r-- | searx/engines/peertube.py | 2 |
1 files changed, 1 insertions, 1 deletions
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 |