Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
e
infra
spot
Commits
18f6bbd2
Commit
18f6bbd2
authored
Apr 20, 2022
by
Nivesh Krishna
Browse files
Merge branch 'fix-errors' into 'master'
fix erros reported on gitlab Closes #89, #87, and #86 See merge request
!133
parents
9e5edcb6
caeafff4
Changes
2
Hide whitespace changes
Inline
Side-by-side
searx/engines/youtube_noapi.py
View file @
18f6bbd2
...
...
@@ -47,6 +47,7 @@ def request(query, params):
try
:
lang
,
region
=
params
[
'language'
].
split
(
'-'
)
except
:
lang
=
'en'
region
=
'us'
if
not
params
[
'engine_data'
].
get
(
'next_page_token'
):
params
[
'url'
]
=
search_url
.
format
(
query
=
quote_plus
(
query
),
page
=
params
[
'pageno'
],
region
=
region
,
lang
=
lang
)
...
...
searx/webapp.py
View file @
18f6bbd2
...
...
@@ -368,6 +368,9 @@ def proxify(url):
def
image_proxify
(
url
):
if
not
isinstance
(
url
,
str
):
return
None
if
url
.
startswith
(
'//'
):
url
=
'https:'
+
url
...
...
@@ -1008,6 +1011,8 @@ def image_proxy():
max_redirects
=
20
)
resp
=
next
(
stream
)
if
resp
is
None
:
return
''
,
400
content_length
=
resp
.
headers
.
get
(
'Content-Length'
)
if
content_length
and
content_length
.
isdigit
()
and
int
(
content_length
)
>
maximum_size
:
return
'Max size'
,
400
...
...
Write
Preview
Supports
Markdown
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