Hi,

renaming the password cookie file is not a good idea after Pywikibot 8.0.0 was released because each account has its own file. [1]

You may have different user config files which can be used with global -config option e.g. -config:mybot_config. [2]
This new global option was introduced with Pywikibot 7.7 [3]

Best
xqt

[1] https://phabricator.wikimedia.org/rPWBCba56084e12a496bbb4f71dfea0fd88a818c18a81
[2] https://doc.wikimedia.org/pywikibot/master/global_options.html#global-options​​​​​​​
[3] https://phabricator.wikimedia.org/rPWBCa02dc8dcf93ebb35e0b24884eddc6a4ff517584a
 
Von: Bináris <wikipo...@gmail.com>
Gesendet: 24.02.2023 04:27
An: Pywikibot discussion list <pywikibot@lists.wikimedia.org>
Betreff: [pywikibot] Re: Multiple users in user-config.py?
 
 
 
Roy Smith <r...@panix.com> ezt írta (időpont: 2023. febr. 24., P, 0:42):
My bot needs to be able to run as either of two different accounts depending on the task.  DYKToolsBot for most things, DYKToolsAdminBot for specific tasks that need admin rights.  How do I do this?
 
I just got up to quickly wirite somewhere that we need separate user-fixes.pys per user, best defined in config.py, and this mail waited me here. :-)
So we should have per user configs.
 
An ugly workaround by that time what I did with logins: a Windows batch.
ren other.lwp temp.lwp
ren pywikibot.lwp other.lwp
ren temp.lwp pywikibot.lwp
 
If you start your scripts froma  batch (or Linux script), this is no extra pain with user-config.py.
 
_______________________________________________
pywikibot mailing list -- pywikibot@lists.wikimedia.org
Public archives at 
https://lists.wikimedia.org/hyperkitty/list/pywikibot@lists.wikimedia.org/message/QRXUOHVWW2B7L3AIPUCFCZKAYUQHKEPZ/
To unsubscribe send an email to pywikibot-le...@lists.wikimedia.org

Reply via email to