maruscia
maruscia

Reputation: 31

Number of links between two Wikipedia pages

I have been successfully able to use the Wikipedia pagelinks SQL dump to obtain hyperlinks between Wikipedia pages for a specific revision time.

However, there are cases where multiple instances of such links exist, e.g. the very same https://en.wikipedia.org/wiki/Wikipedia page and https://en.wikipedia.org/wiki/Wikimedia_Foundation. I'm interested to find number of links between pairs of pages for a specific revision.

Ideal solutions would involve dump files other than pagelinks (which I'm not aware of), or using the MediaWiki API.

Upvotes: 1

Views: 503

Answers (1)

Tgr
Tgr

Reputation: 28160

I think your least bad option is to parse the Parsoid output; e.g. go to https://en.wikipedia.org/api/rest_v1/page/html/Wikipedia and count the links matching the selector a[rel="mw:WikiLink"][href="./Wikimedia_Foundation"].

Upvotes: 1

Related Questions