开发者

Download Images from wikipedia by Music Category and Handling Updates

开发者 https://www.devze.com 2023-03-28 13:53 出处:网络
I am trying to get Music Artist images and Album Art information from Wikipedia. Has anyone tried this before?

I am trying to get Music Artist images and Album Art information from Wikipedia. Has anyone tried this before? I searched around and found few links with relevant information

http://commons.wikimedia.org/w/index.php?title=Special:Search&ns0=1&ns6=1&a开发者_运维知识库mp;ns12=1&ns14=1&ns100=1&ns106=1&redirs=0&search=buitenzorg&limit=10&offset=0 - search images for buitenzorg

http://www.mediawiki.org/wiki/API:Allimages - All images API call to fetch image urls from wiki

But could not find a way to download all the images from Music category and run deltas for updates after the initial download. Any pointers to the solution will be helpful.


I searched everywhere and finally I went with below mentioned implementation. Here's the api documentation: http://www.mediawiki.org/wiki/API:Main_page

  1. Call wikipedia API for artist page
  2. Look at the player card info given on the right, and get the image name.
  3. Make another wikimedia call to get Image download url.
  4. Download the actual image.

For deltas, the only way is to hit wikipedia APIs again with image name and check for updates.

The other work around for this is setting your own wikimedia server, which will handle deltas.

See here http://www.mediawiki.org/wiki/Manual:Installation_guide

0

精彩评论

暂无评论...
验证码 换一张
取 消