On Mon, 19 Sept 2022 at 17:03, Julius Hamilton juliushamilton100@gmail.com wrote:
Hey,
It seems the following API call works for Wikipedia pages:
https://en.wikipedia.org/w/api.php?action=query&prop=extracts&exsent...
But not for Wikisource pages:
https://en.wikisource.org/w/api.php?action=query&prop=extracts&exsen...
Is there documentation somewhere about the API not working for Wikisource or perhaps only certain actions / props working for certain sites?
Did you look at the wikitext of that page? https://en.wikisource.org/w/index.php?title=A_Simplified_Grammar_of_the_Swed...
prop=extracts works, but I would say it's a poor fit for many (most?) wikisource pages. https://en.wikisource.org/w/api.php?action=query&prop=extracts&exsen...
How can I get the full plaintext from an entire book on Wikisource with the
API?
Plaintext as in wikitext or in parsed html converted to plaintext?
You could use something like this to fetch every page under A_Simplified_Grammar_of_the_Swedish_Language: https://en.wikisource.org/w/api.php?generator=allpages&action=query&...
Regards