Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
searx-engine
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gargantext
searx-engine
Commits
6fdb6640
Commit
6fdb6640
authored
Nov 22, 2017
by
Adam Tauber
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[fix] revert language changes to prevent CAPTCHAs
parent
c1cfe978
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
google.py
searx/engines/google.py
+4
-4
No files found.
searx/engines/google.py
View file @
6fdb6640
...
...
@@ -89,7 +89,7 @@ url_map = 'https://www.openstreetmap.org/'\
search_path
=
'/search'
search_url
=
(
'https://{hostname}'
+
search_path
+
'?{query}&start={offset}&gws_rd=cr&gbv=1&
hl
={lang}&ei=x'
)
'?{query}&start={offset}&gws_rd=cr&gbv=1&
lr
={lang}&ei=x'
)
time_range_search
=
"&tbs=qdr:{range}"
time_range_dict
=
{
'day'
:
'd'
,
...
...
@@ -167,11 +167,11 @@ def request(query, params):
if
params
[
'language'
]
==
'all'
:
language
=
'en'
country
=
'US'
url_lang
=
'en'
url_lang
=
'
lang_
en'
elif
params
[
'language'
][:
2
]
==
'jv'
:
language
=
'jw'
country
=
'ID'
url_lang
=
'jw'
url_lang
=
'
lang_
jw'
else
:
language_array
=
params
[
'language'
]
.
lower
()
.
split
(
'-'
)
if
len
(
language_array
)
==
2
:
...
...
@@ -179,7 +179,7 @@ def request(query, params):
else
:
country
=
'US'
language
=
language_array
[
0
]
+
','
+
language_array
[
0
]
+
'-'
+
country
url_lang
=
language_array
[
0
]
url_lang
=
'lang_'
+
language_array
[
0
]
if
use_locale_domain
:
google_hostname
=
country_to_hostname
.
get
(
country
.
upper
(),
default_hostname
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment