开发者

Wikipedia as part of my iOS app

开发者 https://www.devze.com 2023-03-24 07:20 出处:网络
I would like to download information from wi开发者_StackOverflowkipedia to my iOS app. Firstly, I created simple RSS reader, but I can\'t download date from wiki. Now, I think that I should create par

I would like to download information from wi开发者_StackOverflowkipedia to my iOS app. Firstly, I created simple RSS reader, but I can't download date from wiki. Now, I think that I should create parser for wiki.

What do you think about this? Any ideas?

Thanks, Tomek


In my opinion, parsing a website is never a good idea. Only the smallest change in the design of the website can break your application and make it unusable. I'd try to get to your data in an alternative way. ;-)

Sandro Meier


Scrapping a web site directly from your app is never a good idea. If you are ever going to do that it is suggested that you do it on a server and provide the data to your app in a well known format, so that site changes can be quickly managed by your server, and as a result, never breaking your app.

Although wikipedia does not have a formal API, it provides some other ways of extracting data from its servers. You should check this link:

http://en.wikipedia.org/wiki/Wikipedia:Creating_a_bot#APIs%5Ffor%5Fbots


I know this question is quite old. But I've dealt with the same problem and wrote this very small library. I am using the mediawiki api (Mentioned in the post from Felipe) to get the needed information.

https://github.com/prine/WikiApiObjectiveC

0

精彩评论

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

关注公众号