expand wikidata search to get keywords from google trends

This commit is contained in:
2020-03-27 16:52:19 -07:00
parent 8668a764ad
commit f548eeedd5
4 changed files with 90 additions and 38 deletions

View 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