User:Tahmid/sandbox
Appearance
(Redirected from User:Tahmid02016/sandbox)
import pywikibot
site = pywikibot.Site("en", "wikipedia")
with open("articles.txt") as F:
articles = F.strip().split('\n')
F = open("results.txt", "w")
for name in articles:
page = pywikibot.Page(site, name)
text = page.extract()
F.write(text)
F.write('\n\n')
F.close()