Reputation: 51
I am attempting to retrieve box art for video game titles from Wikipedia using a GET query and the Wikipedia API. I am using the below query string which seems to be working fine for any other article, such as for the article about the Wii:
Which produces the below result:
{
"batchcomplete": true,
"query": {
"pages": [
{
"pageid": 421853,
"ns": 0,
"title": "Wii",
"thumbnail": {
"source": "https://upload.wikimedia.org/wikipedia/commons/thumb/1/14/Wii-console.jpg/400px-Wii-console.jpg",
"width": 400,
"height": 400
},
"pageimage": "Wii-console.jpg"
}
]
}
}
However whenever I try it with any article about an individual video game title it isn't working. For example, for Wii Sports:
Which produces the below:
{
"batchcomplete": true,
"query": {
"normalized": [
{
"fromencoded": false,
"from": "Wii_Sports",
"to": "Wii Sports"
}
],
"pages": [
{
"pageid": 5077457,
"ns": 0,
"title": "Wii Sports"
}
]
}
}
Every other title I try is bringing up the same results.
Is there any way to resolve this?
Upvotes: 4
Views: 210
Reputation: 10329
I believe you will only get image results when the image is free in the public domain or licensed in such a way that it is free to use and not when it is licensed or fair use.
When I query for pageprops
on wii, I see a page_image_free
and indeed, the image on that page is in the public domain. However, on wii sports, it instead has page_image
which means the license is not free, and indeed the image on that page is fair use which means it's not licensed or free.
Upvotes: 2