bug fixes
This commit is contained in:
parent
59611dd077
commit
fbcf3d102b
|
@ -70,7 +70,7 @@ def build_dict(hit, lat, lon):
|
||||||
def do_lookup(elements, lat, lon):
|
def do_lookup(elements, lat, lon):
|
||||||
try:
|
try:
|
||||||
hit = osm_lookup(elements, lat, lon)
|
hit = osm_lookup(elements, lat, lon)
|
||||||
except geocode.wkidata.QueryError as e:
|
except geocode.wikidata.QueryError as e:
|
||||||
return {
|
return {
|
||||||
"query": e.query,
|
"query": e.query,
|
||||||
"error": e.r.text,
|
"error": e.r.text,
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
SELECT ?item ?itemLabel ?commonsSiteLink ?commonsCat WHERE {
|
SELECT ?item ?itemLabel ?commonsSiteLink ?commonsCat WHERE {
|
||||||
?item wdt:P836 {{ gss }} .
|
?item wdt:P836 "{{ gss }}" .
|
||||||
OPTIONAL { ?commonsSiteLink schema:about ?item ;
|
OPTIONAL { ?commonsSiteLink schema:about ?item ;
|
||||||
schema:isPartOf <https://commons.wikimedia.org/> }
|
schema:isPartOf <https://commons.wikimedia.org/> }
|
||||||
OPTIONAL { ?item wdt:P373 ?commonsCat }
|
OPTIONAL { ?item wdt:P373 ?commonsCat }
|
||||||
|
|
Loading…
Reference in a new issue