Hi Usernamekiran. I want to ask if you know if there's any way to workaround adding usernames["(family)"]["(lang)"] = "YourBotHere" for every wiki that the bot should edit, similar to the wildcard example on mw:Manual:Pywikibot/user-config.py for authenticate[]. — Tenshi! (Talk page) 21:14, 12 March 2026 (UTC)Reply
- Hi Tenshi. I'm not sure what exactly you are trying to ask. Are you using a script/bot provided by pywikibot, like replacebot? In replacebot, the script wouldn't edit any project unless you tell it which project to edit. For non-pywikibot/"pre-provided scripts", you have to define the site where your bot should edit. So even if you use the wildcard, not every site would be edited unless you specifically define the sites to be edited. In main (custom) script it can be done by:
site1 = pywikibot.Site("en", "wikipedia")
site2 = pywikibot.Site("de", "wikipedia")
My config file has following:
usernames['wikipedia']['*'] = 'KiranBOT' # wildcard for all wikis
#usernames['wikipedia']['mr'] = 'KiranBOT_II' # override for mrwiki
I control which sites to edit/exclude from another file. In the same file, I have also mentioned some wikis that are not available in pywikibot. Also, even if you add/define the site to edit, it will not be edited unless a local account exists there. I hope this answers your question, if not feel free to ask again. —usernamekiran (talk) 07:36, 13 March 2026 (UTC)Reply
- I'm aware of the requirement to specify the site whenever you need an instance of pywikibot.Site as well as needing a local account to exist first, I'm not sure how I can be clearer than I was above, though I was looking for usernames['wikipedia']['*'], as I previously tried usernames['*']['*'] which didn't work. Tenshi! (Talk page) 08:51, 13 March 2026 (UTC)Reply
- Tenshi Hi. I didn't mean to say you don't know, I apologise for the confusion. Conversing over text is often confusing. I'm well aware you are a good bot-op
. In user-config each site family needs to be explicitly mentioned, but usernames can be wildcarded. Passwords can be similarly wildcarded:
('wikipedia', 'KiranBOT', BotPassword('labs', '<password>'))
('wikidata', 'KiranBOT', BotPassword('labs', '<password>'))
('wikinews', 'KiranBOT', BotPassword('labs', '<password>'))
('wikivoyage', 'KiranBOT', BotPassword('labs', '<password>'))
('mr', 'wikipedia', 'KiranBOT_II', BotPassword('labs', '<password>')),
- The entries that come later overrides the previous entries. Please feel free to ask any questions you have. —usernamekiran (talk) 17:14, 13 March 2026 (UTC)Reply