summaryrefslogtreecommitdiff
path: root/searx/plugins/hostname_replace.py
diff options
context:
space:
mode:
Diffstat (limited to 'searx/plugins/hostname_replace.py')
-rw-r--r--searx/plugins/hostname_replace.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/searx/plugins/hostname_replace.py b/searx/plugins/hostname_replace.py
index e22b2dca0..acbc6304c 100644
--- a/searx/plugins/hostname_replace.py
+++ b/searx/plugins/hostname_replace.py
@@ -33,5 +33,10 @@ def on_result(request, search, result):
if pattern.search(parsed_data_src.netloc):
parsed_data_src = parsed_data_src._replace(netloc=pattern.sub(replacement, parsed_data_src.netloc))
result['data_src'] = urlunparse(parsed_data_src)
+ if result.get('audio_src', False):
+ parsed_audio_src = urlparse(result['audio_src'])
+ if pattern.search(parsed_audio_src.netloc):
+ parsed_audio_src = parsed_audio_src._replace(netloc=pattern.sub(replacement, parsed_audio_src.netloc))
+ result['audio_src'] = urlunparse(parsed_audio_src)
return True