Hey, I'm a student in Britain. I was thinking about using wikipedia for a school project. It uses the related links of an article to show the links graphically. I was wondering if anyone knew the best way of doing this? my two thoughts are from the database dump if the related links are there. Or by html parsing.
Thanks for any help.
David schreef:
Hey, I'm a student in Britain. I was thinking about using wikipedia for a school project. It uses the related links of an article to show the links graphically. I was wondering if anyone knew the best way of doing this? my two thoughts are from the database dump if the related links are there. Or by html parsing.
Thanks for any help.
HTML parsing (also known as screenscraping) is not necessary and almost never a good idea. To obtain a list of links in a given article, use the API:
http://en.wikipedia.org/w/api.php?action=query&prop=links&titles=Mai...
For the full API documentation, see [1].
Roan Kattouw (Catrope)
Roan said:----------------
HTML parsing (also known as screenscraping) is not necessary and almost never a good idea. To obtain a list of links in a given article, use the API:
http://en.wikipedia.org/w/api.php?action=query&prop=links&titles=Mai...
_________________________________________________________
Hey Roan,
Would this give you interwiki links also?
It would be pretty useful. Thanks! -Courtney
Christensen, Courtney schreef:
Roan said:----------------
HTML parsing (also known as screenscraping) is not necessary and almost never a good idea. To obtain a list of links in a given article, use the API:
http://en.wikipedia.org/w/api.php?action=query&prop=links&titles=Mai...
Hey Roan,
Would this give you interwiki links also?
It would be pretty useful.
No, but prop=langlinks will. You can combine them with prop=links|langlinks
Roan Kattouw (Catrope)
"Roan Kattouw" roan.kattouw@home.nl wrote in message news:48F4ED71.2040407@home.nl...
Christensen, Courtney schreef:
Roan said:----------------
HTML parsing (also known as screenscraping) is not necessary and almost never a good idea. To obtain a list of links in a given article, use the API:
http://en.wikipedia.org/w/api.php?action=query&prop=links&titles=Mai...
Hey Roan,
Would this give you interwiki links also?
It would be pretty useful.
No, but prop=langlinks will. You can combine them with prop=links|langlinks
Technically, prop=langlinks will only give you interlanguage links (which are links that look like [[en:This title in English]]). Other kinds of interwiki links, like [[wikt:define]] or [[:fr:Different title in French]], cannot be retrieved via the API, except by parsing the page text.
Russ
On Tue, Oct 14, 2008 at 10:29 AM, David 05014611@brookes.ac.uk wrote:
Hey, I'm a student in Britain. I was thinking about using wikipedia for a school project. It uses the related links of an article to show the links graphically. I was wondering if anyone knew the best way of doing this? my two thoughts are from the database dump if the related links are there. Or by html parsing.
I don't know what software will you use to plot the links, but here is one very powerfull and handy:
Tei wrote:
On Tue, Oct 14, 2008 at 10:29 AM, David 05014611@brookes.ac.uk wrote:
Hey, I'm a student in Britain. I was thinking about using wikipedia for a school project. It uses the related links of an article to show the links graphically. I was wondering if anyone knew the best way of doing this? my two thoughts are from the database dump if the related links are there. Or by html parsing.
I don't know what software will you use to plot the links, but here is one very powerfull and handy:
You can try Synarcher. See screenshots. http://synarcher.sourceforge.net/
-- Best regards, Andrew Krizhanovsky
wikitech-l@lists.wikimedia.org