How to get the results related to dates from Sparql queries in wikidata in JSON through Python codes in the same format they appear when I query directly through the web?
When I query in Wikidata Query Portal (Try it), some dates appear formatted like 21 de junho de 1839
, but when i request them via Python with the library SPARQLWrapper, they appear this way: 1839-06-21T00:00:00Z
. How to get the "beautified version" from site in JSON?
I have slightly modified your query and added it to the wikidata.yaml sample queries of the pyLodStorage library for which i am committer so that
works and gives the cut&paste result shown further down below.
returns
now you can pipe the result thru
which results in
if all runs well in a different locale the output should be according to your locale.
MachadoDeAssis
query
try it!
result