• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Extracting information from WebView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Extracting information from WebView


  • Subject: Re: Extracting information from WebView
  • From: Andrew Farmer <email@hidden>
  • Date: Sat, 27 Oct 2007 14:15:12 -0700

On 27 Oct 07, at 12:29, Claus Atzenbeck wrote:
I started playing around with WebKit. Well, my application has a working
web browser now. However, I did not manage to extract information from
a loaded web page.


In particular, I want to get a list of authors of a given Wikipedia
page. For example, when displaying the page
<http://en.wikipedia.org/wiki/Siege_of_Malakand>, I would like to get
all user names that are mentioned on the article's history page, that is
<http://en.wikipedia.org/w/index.php?title=Siege_of_Malakand&action=history >.

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.)
_______________________________________________


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


  • Follow-Ups:
    • Re: Extracting information from WebView
      • From: Claus Atzenbeck <email@hidden>
References: 
 >Extracting information from WebView (From: Claus Atzenbeck <email@hidden>)

  • Prev by Date: Re: FYI: IB 3 Palette plugins
  • Next by Date: Best Way to Rotate
  • Previous by thread: Re: Extracting information from WebView
  • Next by thread: Re: Extracting information from WebView
  • Index(es):
    • Date
    • Thread