1

I have this piece of code that find all the wikipedia articles that have the template dubious using the library pywikibot:

pages = pywikibot.Page(site, "Template:Dubious").getReferences(namespaces = 0)

Now I need to find all Featured articles. I guess that it can be done using the right search string, but I don't know which is.

1 Answers1

1

Since you mentioned Wikipedia, then I assume you can use the features of CirrusSearch. This should work:

pages = list(site.search('incategory:"Featured articles" hastemplate:"Dubious"'))

Of-coarse, if you are using a non-English Wikipedia, then you'll have to replace the Featured articles with the localized name of that category.

AXO
  • 8,198
  • 6
  • 62
  • 63