How to extract links from the See Also section of the Wikipedia article?

Is there a way to extract all the links only from the See Also section of the Wikipedia article via the Wikpedia API?

I am interested in the method, but I can not find it.

+4
source share
2 answers

Yes, you can do this using the Wikipedia API with action = parse . For this purpose, we need two properties: sectionsand links. For example, for a Chicago Wikipedia article, we use the following query to get the index of a section called "See Also":

https://en.wikipedia.org/w/api.php?action=parse&prop=sections&page=Chicago

, 43. :

https://en.wikipedia.org/w/api.php?action=parse&prop=links&page=Chicago&section=43

.. , , Portal: Chicago Portal: Illinois. , , & ns = 0.

+4

, API. MediaWiki , , .

, - HTML-, <a href.

0

All Articles