mirror of
https://github.com/searxng/searxng
synced 2024-01-01 19:24:07 +01:00
[mod] ahmia_filter.py: minor changes
- use result['parsed_url'] - load ahmia_blacklist.txt in searx.datae
This commit is contained in:
parent
db703a0283
commit
5e7060053c
2 changed files with 10 additions and 8 deletions
|
|
@ -2,7 +2,7 @@ import json
|
|||
from pathlib import Path
|
||||
|
||||
|
||||
__init__ = ['ENGINES_LANGUGAGES', 'CURRENCIES', 'USER_AGENTS', 'bangs_loader']
|
||||
__init__ = ['ENGINES_LANGUGAGES', 'CURRENCIES', 'USER_AGENTS', 'bangs_loader', 'ahmia_blacklist_loader']
|
||||
data_dir = Path(__file__).parent
|
||||
|
||||
|
||||
|
|
@ -16,6 +16,11 @@ def bangs_loader():
|
|||
return load('bangs.json')
|
||||
|
||||
|
||||
def ahmia_blacklist_loader():
|
||||
with open(str(data_dir / 'ahmia_blacklist.txt'), encoding='utf-8') as fd:
|
||||
return fd.read().split()
|
||||
|
||||
|
||||
ENGINES_LANGUAGES = load('engines_languages.json')
|
||||
CURRENCIES = load('currencies.json')
|
||||
USER_AGENTS = load('useragents.json')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue