diff --git a/osm_wikidata_check.py b/osm_wikidata_check.py index 4b0a5ed..064e3a6 100755 --- a/osm_wikidata_check.py +++ b/osm_wikidata_check.py @@ -38,10 +38,16 @@ assert "elements" in data notfound = [] redirects = [] +headers = { + "Accept-Encoding": "gzip,deflate", + "Accept": "application/json", + "User-Agent": "osm_wikidata_check" +} + try: print(" Wikidata ID | Redirect/issue | Label") for wd_id in ids(data["elements"]): - r = s.get(f"https://www.wikidata.org/entity/{wd_id}") + r = s.get(f"https://www.wikidata.org/entity/{wd_id}", headers=headers) if not r.ok: print(f"{wd_id:>15} | NOT FOUND! |\t") notfound.append(wd_id)