Reputation: 636
What is the best way to get a list of all Wikipedia pages that contain certain types of content tables such as 'Nutritional value' table and 'Scientific classification' table?
Positive examples:
https://en.wikipedia.org/wiki/Lemon
https://en.wikipedia.org/wiki/Macadamia
Negative examples:
https://en.wikipedia.org/wiki/Sunflower_seed (only Nutritional value table)
https://en.wikipedia.org/wiki/Sugar (only Nutritional value table)
https://en.wikipedia.org/wiki/Helianthus (only Scientific classification table)
Upvotes: 2
Views: 259
Reputation: 9086
I'd probably try a combination of search API and hastemplate:
search feature:
Template:Taxobox
and Template:Infobox nutritional value
:
https://en.wikipedia.org/w/api.php?action=query&list=search&srsearch=hastemplate:Taxobox%20hastemplate:%22Infobox%20nutritional%20value%22
(currently 76 hits, including Lemon)Template:Automatic taxobox
and Template:Infobox nutritional value
: https://en.wikipedia.org/w/api.php?action=query&list=search&srsearch=hastemplate:%22Automatic%20taxobox%22%20hastemplate:%22Infobox%20nutritional%20value%22&srlimit=500
(currently 17 hits, including Macadamia)Upvotes: 3