Implementation as almost standard pywikibot script