summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Heiser <markus.heiser@darmarIT.de>2022-11-09 06:50:33 +0100
committerGitHub <noreply@github.com>2022-11-09 06:50:33 +0100
commitee4475ff4b7f1d7d687606664c3b1dd4cafe5a99 (patch)
tree78cd1984673ca372c5ce1b3d05a91ed5294cb46d
parentd3949269a99a62e17d290c42c866661b65fe3119 (diff)
parente473addaff3415e1892dc9e57da13d6378146d6f (diff)
downloadsearxng-ee4475ff4b7f1d7d687606664c3b1dd4cafe5a99.tar.gz
searxng-ee4475ff4b7f1d7d687606664c3b1dd4cafe5a99.zip
Merge pull request #1934 from dalf/fix_user_agent
User agent: don't include the patch number in the Firefox version
-rw-r--r--searx/data/useragents.json5
-rwxr-xr-xsearxng_extra/update/update_firefox_version.py5
2 files changed, 4 insertions, 6 deletions
diff --git a/searx/data/useragents.json b/searx/data/useragents.json
index c1559a149..b89cb1f3f 100644
--- a/searx/data/useragents.json
+++ b/searx/data/useragents.json
@@ -1,11 +1,6 @@
{
"versions": [
- "106.0.2",
- "106.0.1",
"106.0",
- "105.0.3",
- "105.0.2",
- "105.0.1",
"105.0"
],
"os": [
diff --git a/searxng_extra/update/update_firefox_version.py b/searxng_extra/update/update_firefox_version.py
index f70dc20e5..384d0002f 100755
--- a/searxng_extra/update/update_firefox_version.py
+++ b/searxng_extra/update/update_firefox_version.py
@@ -64,8 +64,11 @@ def fetch_firefox_last_versions():
major_list = (major_last, major_last - 1)
for version in versions:
major_current = version.version[0]
+ minor_current = version.version[1]
if major_current in major_list:
- result.append(version.vstring)
+ user_agent_version = f'{major_current}.{minor_current}'
+ if user_agent_version not in result:
+ result.append(user_agent_version)
return result