wikibattle icon indicating copy to clipboard operation
wikibattle copied to clipboard

Use Wikimedia extracts API to retrieve hints

Open goto-bus-stop opened this issue 5 years ago • 0 comments

Currently, hints are extracted from the rendered HTML for a wiki page using cheerio. But I just noticed that wikipedia has an "extracts" API:

https://en.wikipedia.org/w/api.php?action=query&prop=extracts&exchars=200&explaintext=true&format=json&titles=Donald%20Glover

https://en.wikipedia.org/w/api.php?action=query&prop=extracts&exchars=200&explaintext=true&format=json&titles=Kansas%20City,%20Missouri

They seem to generally be as good if not better than the results from our custom hint code.

This might also address https://github.com/goto-bus-stop/wikibattle/issues/159 :pray:

goto-bus-stop avatar Jun 19 '20 14:06 goto-bus-stop