mirror of
https://github.com/searxng/searxng.git
synced 2025-08-03 02:22:22 +02:00
fetch_firefox_version.py : compatible with Python 3 and minor fixes.
This commit is contained in:
parent
066bd916bf
commit
50c836864a
3 changed files with 24 additions and 21 deletions
|
@ -1,15 +1,14 @@
|
|||
{
|
||||
"os": [
|
||||
"Windows NT 10; WOW64",
|
||||
"X11; Linux x86_64"
|
||||
],
|
||||
"ua": "Mozilla/5.0 ({os}; rv:{version}) Gecko/20100101 Firefox/{version}",
|
||||
"ua": "Mozilla/5.0 ({os}; rv:{version}) Gecko/20100101 Firefox/{version}",
|
||||
"versions": [
|
||||
"59.0.2",
|
||||
"59.0.1",
|
||||
"59.0",
|
||||
"58.0.2",
|
||||
"58.0.1",
|
||||
"58.0"
|
||||
"61.0.1",
|
||||
"61.0",
|
||||
"60.0.2",
|
||||
"60.0.1",
|
||||
"60.0"
|
||||
],
|
||||
"os": [
|
||||
"Windows NT 10; WOW64",
|
||||
"X11; Linux x86_64"
|
||||
]
|
||||
}
|
|
@ -54,8 +54,8 @@ def searx_useragent():
|
|||
suffix=settings['outgoing'].get('useragent_suffix', ''))
|
||||
|
||||
|
||||
def gen_useragent():
|
||||
return str(useragents['ua'].format(os=choice(useragents['os']), version=choice(useragents['versions'])))
|
||||
def gen_useragent(os=None):
|
||||
return str(useragents['ua'].format(os=os or choice(useragents['os']), version=choice(useragents['versions'])))
|
||||
|
||||
|
||||
def highlight_content(content, query):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue