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
147ad504
Unverified
Commit
147ad504
authored
Oct 24, 2019
by
Noémi Ványi
Committed by
GitHub
Oct 24, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1729 from MarcAbonce/fix_tracker_remover
Fix out of range error in tracker remover plugin
parents
12f42d15
dede46a2
Changes
1
Hide 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 @
147ad504
...
...
@@ -39,16 +39,14 @@ def on_result(request, search, result):
return
True
parsed_query
=
parse_qsl
(
query
)
change
d
=
False
change
s
=
0
for
i
,
(
param_name
,
_
)
in
enumerate
(
list
(
parsed_query
)):
for
reg
in
regexes
:
if
reg
.
match
(
param_name
):
parsed_query
.
pop
(
i
)
changed
=
True
parsed_query
.
pop
(
i
-
changes
)
changes
+=
1
result
[
'parsed_url'
]
=
result
[
'parsed_url'
]
.
_replace
(
query
=
urlencode
(
parsed_query
))
result
[
'url'
]
=
urlunparse
(
result
[
'parsed_url'
])
break
if
changed
:
result
[
'parsed_url'
]
=
result
[
'parsed_url'
]
.
_replace
(
query
=
urlencode
(
parsed_query
))
result
[
'url'
]
=
urlunparse
(
result
[
'parsed_url'
])
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