Compare commits

..

No commits in common. "fc34c2bdcf498cd994ad13a5f20ed167466da58c" and "6b558086c1532e0b4499c30eaf7de7f7a95518c1" have entirely different histories.

2 changed files with 6 additions and 3 deletions

View file

@ -1,9 +1,12 @@
"""Match OSM and Wikidata items."""
CallParams = dict[str, str | int]
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)"
)

View file

@ -6,7 +6,7 @@ from collections import OrderedDict
import requests
from . import CallParams, user_agent_headers
from . import CallParams
Hit = dict[str, typing.Any]
@ -28,7 +28,7 @@ def lookup_with_params(**kwargs: str) -> list[Hit]:
"polygon_text": 0,
}
params.update(kwargs)
r = requests.get(url, params=params, headers=user_agent_headers())
r = requests.get(url, params=params)
if r.status_code == 500:
raise SearchError