]> code.communitydata.science - covid19.git/blobdiff - transliterations/src/wikidata_api_calls.py
new version of this from scrape. no double quotes around articles any
[covid19.git] / transliterations / src / wikidata_api_calls.py
index f2fac889c3af2d4847f1a3462b7f0681dddbe9f9..212ed4f9139ba557ae30e015e47511c3d4c03d7d 100644 (file)
@@ -29,7 +29,7 @@ def search_wikidata(session, term, *args, **kwargs):
     return results
 
 def run_sparql_query(q):
-    results = requests.get("https://query.wikidata.org/bigdata/namespace/wdq/sparql",params={"query":q,"format":"json"})
+    results = requests.get("https://query.wikidata.org/bigdata/namespace/wdq/sparql",params={"format":"json","query":q})
     time.sleep(2)
     return results
 

Community Data Science Collective || Want to submit a patch?