Compare commits
No commits in common. "fc34c2bdcf498cd994ad13a5f20ed167466da58c" and "6b558086c1532e0b4499c30eaf7de7f7a95518c1" have entirely different histories.
fc34c2bdcf
...
6b558086c1
|
@ -1,9 +1,12 @@
|
||||||
"""Match OSM and Wikidata items."""
|
"""Match OSM and Wikidata items."""
|
||||||
|
|
||||||
|
|
||||||
CallParams = dict[str, str | int]
|
CallParams = dict[str, str | int]
|
||||||
|
|
||||||
user_agent = (
|
user_agent = (
|
||||||
"osm-wikidata/0.2 (https://git.4angle.com/edward/owl-map; edward@4angle.com)"
|
"osm-wikidata/0.2"
|
||||||
|
+ " (https://github.com/EdwardBetts/osm-wikidata;"
|
||||||
|
+ " edward@4angle.com)"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ from collections import OrderedDict
|
||||||
|
|
||||||
import requests
|
import requests
|
||||||
|
|
||||||
from . import CallParams, user_agent_headers
|
from . import CallParams
|
||||||
|
|
||||||
Hit = dict[str, typing.Any]
|
Hit = dict[str, typing.Any]
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@ def lookup_with_params(**kwargs: str) -> list[Hit]:
|
||||||
"polygon_text": 0,
|
"polygon_text": 0,
|
||||||
}
|
}
|
||||||
params.update(kwargs)
|
params.update(kwargs)
|
||||||
r = requests.get(url, params=params, headers=user_agent_headers())
|
r = requests.get(url, params=params)
|
||||||
if r.status_code == 500:
|
if r.status_code == 500:
|
||||||
raise SearchError
|
raise SearchError
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue