import pywikibot
site = pywikibot.Site("test", "wikipedia")
site = pywikibot.Site("en","wikipedia")
site
APISite("en", "wikipedia")
wrestlers = pywikibot.Category(site, "Professional_wrestlers")
wrestlerarticles = wrestlers.articles(recurse = True, total = 100000)
wrestlerarticles
<generator object articles at 0x7f2eb14ea1f8>
wlist = list(wrestlerarticles)
len(wlist)
14410
f = open("test.txt","w")
f.write(str(14410))
5
f.close()