Open kelson42 opened 7 years ago
$ curl -g 'https://query.wikidata.org/sparql?format=json&query=PREFIX%20wdt%3A%20%3Chttp%3A%2F%2Fwww.wikidata.org%2Fprop%2Fdirect%2F%3E%0ASELECT%20%3Fitem%20%3FitemLabel%20%24logotype%20WHERE%20{%0A%20%20%3Fitem%20wdt%3AP154%20%3Flogotype.%20%0A%20%20%3Fitem%20wdt%3AP856%20%3Chttps%3A%2F%2Ffr.wikivoyage.org%2F%3E%20.%0A%20%20%20SERVICE%20wikibase%3Alabel%20{%0A%20%20%20%20bd%3AserviceParam%20wikibase%3Alanguage%20%22fr%22%0A%20%20%20}%0A}'
{
"head" : {
"vars" : [ "item", "itemLabel", "logotype" ]
},
"results" : {
"bindings" : [ {
"item" : {
"type" : "uri",
"value" : "http://www.wikidata.org/entity/Q19826572"
},
"logotype" : {
"type" : "uri",
"value" : "http://commons.wikimedia.org/wiki/Special:FilePath/Wikivoyage-Logo-v3-en.svg"
},
"itemLabel" : {
"xml:lang" : "fr",
"type" : "literal",
"value" : "Wikivoyage en français"
}
} ]
}
}
The idea is to provide X /M/faviconheigtxwidth entries. It would be then easy by search all urls starting with "/M/favicon" what kind of resolutions are available and pick the good one.
This issue has been automatically marked as stale because it has not had recent activity. It will be now be reviewed manually. Thank you for your contributions.
This has to be implememted at Zimfarm level.
This issue has been automatically marked as stale because it has not had recent activity. It will be now be reviewed manually. Thank you for your contributions.
With data from Wikidata