mirror of
https://github.com/searx/searx
synced 2024-12-11 16:35:20 +01:00
[fix] minor style fixes after picking open street map changes
This commit is contained in:
parent
42db73348a
commit
53c4031f96
@ -22,10 +22,12 @@ from pathlib import Path
|
|||||||
|
|
||||||
data_dir = Path(__file__).parent
|
data_dir = Path(__file__).parent
|
||||||
|
|
||||||
|
|
||||||
def _load(filename):
|
def _load(filename):
|
||||||
with open(data_dir / filename, encoding='utf-8') as f:
|
with open(data_dir / filename, encoding='utf-8') as f:
|
||||||
return json.load(f)
|
return json.load(f)
|
||||||
|
|
||||||
|
|
||||||
def ahmia_blacklist_loader():
|
def ahmia_blacklist_loader():
|
||||||
"""Load data from `ahmia_blacklist.txt` and return a list of MD5 values of onion
|
"""Load data from `ahmia_blacklist.txt` and return a list of MD5 values of onion
|
||||||
names. The MD5 values are fetched by::
|
names. The MD5 values are fetched by::
|
||||||
@ -38,6 +40,7 @@ def ahmia_blacklist_loader():
|
|||||||
with open(str(data_dir / 'ahmia_blacklist.txt'), encoding='utf-8') as f:
|
with open(str(data_dir / 'ahmia_blacklist.txt'), encoding='utf-8') as f:
|
||||||
return f.read().split()
|
return f.read().split()
|
||||||
|
|
||||||
|
|
||||||
ENGINES_LANGUAGES = _load('engines_languages.json')
|
ENGINES_LANGUAGES = _load('engines_languages.json')
|
||||||
CURRENCIES = _load('currencies.json')
|
CURRENCIES = _load('currencies.json')
|
||||||
USER_AGENTS = _load('useragents.json')
|
USER_AGENTS = _load('useragents.json')
|
||||||
|
@ -37,7 +37,7 @@ search_string = 'search?{query}&polygon_geojson=1&format=jsonv2&addressdetails=1
|
|||||||
result_id_url = 'https://openstreetmap.org/{osm_type}/{osm_id}'
|
result_id_url = 'https://openstreetmap.org/{osm_type}/{osm_id}'
|
||||||
result_lat_lon_url = 'https://www.openstreetmap.org/?mlat={lat}&mlon={lon}&zoom={zoom}&layers=M'
|
result_lat_lon_url = 'https://www.openstreetmap.org/?mlat={lat}&mlon={lon}&zoom={zoom}&layers=M'
|
||||||
|
|
||||||
route_url = 'https://graphhopper.com/maps/?point={}&point={}&locale=en-US&vehicle=car&weighting=fastest&turn_costs=true&use_miles=false&layer=Omniscale' # pylint: disable=line-too-long
|
route_url = 'https://graphhopper.com/maps/?point={}&point={}&locale=en-US&vehicle=car&weighting=fastest&turn_costs=true&use_miles=false&layer=Omniscale' # NOQA
|
||||||
route_re = re.compile('(?:from )?(.+) to (.+)')
|
route_re = re.compile('(?:from )?(.+) to (.+)')
|
||||||
|
|
||||||
wikidata_image_sparql = """
|
wikidata_image_sparql = """
|
||||||
@ -60,7 +60,7 @@ where {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
ORDER by ?item
|
ORDER by ?item
|
||||||
"""
|
""" # NOQA
|
||||||
|
|
||||||
|
|
||||||
# key value that are link: mapping functions
|
# key value that are link: mapping functions
|
||||||
|
Loading…
Reference in New Issue
Block a user