mirror of
https://github.com/searxng/searxng
synced 2024-01-01 19:24:07 +01:00
[mod] make format.python : prepare python code for black 23.1.0
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
parent
233ee1bb15
commit
b4c80d9ebb
68 changed files with 8 additions and 115 deletions
|
|
@ -21,9 +21,7 @@ _url_fields = ['iframe_src', 'audio_src']
|
|||
|
||||
|
||||
def on_result(request, search, result):
|
||||
|
||||
for (pattern, replacement) in replacements.items():
|
||||
|
||||
for pattern, replacement in replacements.items():
|
||||
if parsed in result:
|
||||
if pattern.search(result[parsed].netloc):
|
||||
# to keep or remove this result from the result list depends
|
||||
|
|
|
|||
|
|
@ -45,12 +45,10 @@ reg = re.compile(r"(?<=ExitAddress )\S+")
|
|||
|
||||
|
||||
def post_search(request, search):
|
||||
|
||||
if search.search_query.pageno > 1:
|
||||
return True
|
||||
|
||||
if search.search_query.query.lower() == "tor-check":
|
||||
|
||||
# Request the list of tor exit nodes.
|
||||
try:
|
||||
resp = get("https://check.torproject.org/exit-addresses")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue