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
832ea60e
Commit
832ea60e
authored
Feb 08, 2015
by
Thomas Pointhuber
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[fix] pep8, tests
parent
e7de9674
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
5 additions
and
5 deletions
+5
-5
bing_images.py
searx/engines/bing_images.py
+1
-0
blekko_images.py
searx/engines/blekko_images.py
+1
-0
test_bing_images.py
searx/tests/engines/test_bing_images.py
+1
-0
test_blekko_images.py
searx/tests/engines/test_blekko_images.py
+1
-0
webapp.py
searx/webapp.py
+1
-5
No files found.
searx/engines/bing_images.py
View file @
832ea60e
...
...
@@ -33,6 +33,7 @@ safesearch_types = {2: 'STRICT',
1
:
'DEMOTE'
,
0
:
'OFF'
}
# do search-request
def
request
(
query
,
params
):
offset
=
(
params
[
'pageno'
]
-
1
)
*
10
+
1
...
...
searx/engines/blekko_images.py
View file @
832ea60e
...
...
@@ -25,6 +25,7 @@ safesearch_types = {2: '1',
1
:
''
,
0
:
'0'
}
# do search-request
def
request
(
query
,
params
):
c
=
(
params
[
'pageno'
]
-
1
)
*
48
...
...
searx/tests/engines/test_bing_images.py
View file @
832ea60e
...
...
@@ -12,6 +12,7 @@ class TestBingImagesEngine(SearxTestCase):
dicto
=
defaultdict
(
dict
)
dicto
[
'pageno'
]
=
1
dicto
[
'language'
]
=
'fr_FR'
dicto
[
'safesearch'
]
=
1
params
=
bing_images
.
request
(
query
,
dicto
)
self
.
assertTrue
(
'url'
in
params
)
self
.
assertTrue
(
query
in
params
[
'url'
])
...
...
searx/tests/engines/test_blekko_images.py
View file @
832ea60e
...
...
@@ -10,6 +10,7 @@ class TestBlekkoImagesEngine(SearxTestCase):
query
=
'test_query'
dicto
=
defaultdict
(
dict
)
dicto
[
'pageno'
]
=
0
dicto
[
'safesearch'
]
=
1
params
=
blekko_images
.
request
(
query
,
dicto
)
self
.
assertTrue
(
'url'
in
params
)
self
.
assertTrue
(
query
in
params
[
'url'
])
...
...
searx/webapp.py
View file @
832ea60e
...
...
@@ -457,10 +457,6 @@ def preferences():
Settings that are going to be saved as cookies."""
lang
=
None
image_proxy
=
request
.
cookies
.
get
(
'image_proxy'
,
settings
[
'server'
]
.
get
(
'image_proxy'
))
try
:
savesearch
=
int
(
request
.
cookies
.
get
(
'savesearch'
,
1
))
except
ValueError
:
savesearch
=
1
if
request
.
cookies
.
get
(
'language'
)
\
and
request
.
cookies
[
'language'
]
in
(
x
[
0
]
for
x
in
language_codes
):
...
...
@@ -539,7 +535,7 @@ def preferences():
)
resp
.
set_cookie
(
'method'
,
method
,
max_age
=
cookie_max_age
)
resp
.
set_cookie
(
'safesearch'
,
safesearch
,
max_age
=
cookie_max_age
)
resp
.
set_cookie
(
'image_proxy'
,
image_proxy
,
max_age
=
cookie_max_age
)
...
...
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