I'm a total newbie at pywikibot, but let me address the general issue of putting credentials in config files.

Be very wary of how you store credentials.  You should make sure they're in a file which is read-protected, and not in source control.  Otherwise the entire world will have access to your secret credentials.



On Sep 5, 2022, at 10:14 AM, Erik Sommer <ersotech@posteo.de> wrote:

Hi list,

I operate currently a bot on the German Wikisource. The bot was granted both groups, admin and bot. It is intended to be used as automated protection bot. I'm having trouble to put the right credentials in my user-config.py.

It is currently coded like following pseudo-code:

# -*- coding: utf-8 -*-

family = 'wikisource'
mylang = 'de'
usernames['wikisource']['de'] = '******'

authenticate['de.wikisource.org'] = (....*****.....)

the problem with this is that the framework only detect my bot as bot not as sysadmin. Groups taken from the debugging output: ['bot', '*', 'user', 'autoconfirmed']

What do I have to add to my config, that the bot also get picket up as sysadmin? I already read (https://www.mediawiki.org/wiki/Manual:Pywikibot/user-config.py) but doesn't make sense for me. It will not change anything if add the botname a second time to the usernames dictionary.

Best Regards

Erik Sommer

_______________________________________________
pywikibot mailing list -- pywikibot@lists.wikimedia.org
To unsubscribe send an email to pywikibot-leave@lists.wikimedia.org