Re:Extracting data from Wikipedia using curl, grep, cut and ...
by davidgerard on Monday August 15, 2016 @07:24PM
(#12294323)
... there's an API making half of this superfluous. You can do pretty much any MediaWiki reading or writing through it. (All Wikipedia bots are required to use it, for instance.)
https://en.wikipedia.org/w/api.php
The article text is a raw blob of wikitext you have to process, but you don't have to go to stupid lengths trying to parse HTML without a browser.