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
dede46a2
Commit
dede46a2
authored
Oct 23, 2019
by
Marc Abonce Seguin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix out of range error in tracker remover plugin
parent
12f42d15
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
7 deletions
+5
-7
tracker_url_remover.py
searx/plugins/tracker_url_remover.py
+5
-7
No files found.
searx/plugins/tracker_url_remover.py
View file @
dede46a2
...
@@ -39,16 +39,14 @@ def on_result(request, search, result):
...
@@ -39,16 +39,14 @@ def on_result(request, search, result):
return
True
return
True
parsed_query
=
parse_qsl
(
query
)
parsed_query
=
parse_qsl
(
query
)
change
d
=
False
change
s
=
0
for
i
,
(
param_name
,
_
)
in
enumerate
(
list
(
parsed_query
)):
for
i
,
(
param_name
,
_
)
in
enumerate
(
list
(
parsed_query
)):
for
reg
in
regexes
:
for
reg
in
regexes
:
if
reg
.
match
(
param_name
):
if
reg
.
match
(
param_name
):
parsed_query
.
pop
(
i
)
parsed_query
.
pop
(
i
-
changes
)
changed
=
True
changes
+=
1
break
if
changed
:
result
[
'parsed_url'
]
=
result
[
'parsed_url'
]
.
_replace
(
query
=
urlencode
(
parsed_query
))
result
[
'parsed_url'
]
=
result
[
'parsed_url'
]
.
_replace
(
query
=
urlencode
(
parsed_query
))
result
[
'url'
]
=
urlunparse
(
result
[
'parsed_url'
])
result
[
'url'
]
=
urlunparse
(
result
[
'parsed_url'
])
break
return
True
return
True
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