Hi Ed,
    The query you mentioned returns external urls in the web page. May be the 
word I used is ambiguous. In some Wikipedia pages there is a section called 
"External Links". It is normally after further reading section. so in this 
example Amoxicillin Wikipedia page, there is a table like structure having a 
heading "Antibacterials: cell envelope antibiotics (J01C-J01D)" under "External 
Link" section of the page. Basically, what I want to do is to get urls 
mentioned in that section for each wikipedia page. Do you get the requirement 
clearly now? Thank you.

regards,
Kalpa
________________________________________
From: mediawiki-api-boun...@lists.wikimedia.org 
[mediawiki-api-boun...@lists.wikimedia.org] on behalf of Ed Summers 
[e...@pobox.com]
Sent: Wednesday, September 12, 2012 10:27 PM
To: MediaWiki API announcements & discussion
Subject: Re: [Mediawiki-api] extracting external link portion of a wiki page

Does, this get you what you need?

    
http://en.wikipedia.org/w/api.php?action=query&prop=links&titles=Amoxicillin&format=json&pllimit=500

It should return all the Wikipedia links in the article. The external
links are links to web properties outside of Wikipedia.

//Ed

On Wed, Sep 12, 2012 at 10:12 PM, Gunaratna, Dalkandura Arachchige
Kalpa Shashika Silva <gunaratn...@wright.edu> wrote:
> Hi,
>    I have been using mediaWiki API to get categories a page belongs to using
> 'query' for 'action' and 'category' for 'prop'.
>
>    Now I want to get external link part of a page. For example, Amoxicillin
> wikipedia page http://en.wikipedia.org/wiki/Amoxicillin has a table like
> structure in the external links section down in the bottom of the page
> having links to many other related concepts to Amoxicillin. I want to
> retrieve links of those related concepts. Currently, I am looking for a way
> to get these details. I am not sure yet whether I can do it through the API
> or I just have to process the page to get those details. If there is a way
> to get these details through MediaWiki API, please respond. Thank you very
> much in advance.
>
> regards,
> Kalpa
>
> _______________________________________________
> Mediawiki-api mailing list
> Mediawiki-api@lists.wikimedia.org
> https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
>

_______________________________________________
Mediawiki-api mailing list
Mediawiki-api@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api



_______________________________________________
Mediawiki-api mailing list
Mediawiki-api@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api

Reply via email to