Re: Extracting information from WebView
Re: Extracting information from WebView
- Subject: Re: Extracting information from WebView
- From: Claus Atzenbeck <email@hidden>
- Date: Sun, 28 Oct 2007 21:10:40 +0100 (CET)
On Sat, 27 Oct 2007, Andrew Farmer wrote:
> Don't screen-scrape history pages - use the MediaWiki API; it's made for this
> sort of stuff. See http://en.wikipedia.org/w/api.php for instructions. In your
> case, the parameters you want are something like:
>
> http://en.wikipedia.org/w/api.php?action=query&titles=Siege_of_Malakand&prop=revisions&rvlimit=20&format=xml
>
> This'll give you an XML representation of the 20 most recent edits to the
> page. (Note that this won't display in a web browser; remove the "&format=xml"
> to get a pretty-printed HTML version.)
Thanks for this hint. In fact, I found a good solution: I represent the
XML file as NSXMLDocument and use nodesForXPath to get the history
entries individually. Then I use attributeForName:@"user" to get an
array of user names from them. Works perfectly.
Claus
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden