directly like -config:myconfig or -config:myotherconfig.py. What do you think about this proposal?Greetingsxqt Von: Johnuniq Gesendet: 08.09.2022 11:19An: Kopie: Pywikibot discussion list Betreff: Re: [pywikibot] Re: authenticate as bot and sysop I did not do anything clever. I just copied user-config.py
Several methods to use multiple bot accountsDue to T71283 sysop account setting was given up with release 3.0.20200111. On the other hand you may have multiple bot accounts, e.g. onw for production system and one for test purposes. And none of them may be part of the sysop group. How can you use
his approach. Can you explain?
>
> Best
>
> xqt
> Von: Johnuniq
> Gesendet: 08.09.2022 09:23
> An: Pywikibot discussion list
> Betreff: [pywikibot] Re: authenticate as bot and sysop
>
> > how You use different configs in the same script?
>
> In my case, I wou
<<< text/html; charset=utf-8: Unrecognized >>>
___
pywikibot mailing list -- pywikibot@lists.wikimedia.org
To unsubscribe send an email to pywikibot-le...@lists.wikimedia.org
Sorry I cannot follow this approach. Can you explain?BestxqtVon: Johnuniq Gesendet: 08.09.2022 09:23An: Pywikibot discussion list Betreff: [pywikibot] Re: authenticate as bot and sysop > how You use different configs in the same script?In my case, I would first run a script to select which use
> how You use different configs in the same script?
In my case, I would first run a script to select which user I needed
and that script copied the appropriate user-config file. After that, I
would run a second script that used pywikibot. I have not tried
YiFei Zhu's solution.
All I will say is that it is the documented API [1] to use nn-default
usernames, and I have used it before, years ago. If it doesn't work
now it is a bug.
[1]
https://github.com/wikimedia/pywikibot/blob/f57f7420edcab0980c287aaf9557edc1ea3f6e92/pywikibot/__init__.py#L1053
On Wed, Sep 7, 2022 at
Not sure if this works, as I had the feeling the parameter user in the
constructor was more or less irrelevant. (Provided X Site Object got Y
from user-config.py)
Erik
On 07.09.22 19:52, YiFei Zhu wrote:
Create two Site instances and pass in different user= parameters to
the constructor.
Create two Site instances and pass in different user= parameters to the
constructor.
On Wed, Sep 7, 2022, 03:52 Erik Sommer wrote:
> Now I don't use two accounts in the same script invocation. But I use a
> collection of scripts (self written, not part of pywikibot) and use them
> with
Now I don't use two accounts in the same script invocation. But I use a
collection of scripts (self written, not part of pywikibot) and use them
with different bot accounts. How to use different accounts in the same
invocation, that I don't know. Can someone other help, because I see it
how You use different configs in the same script?
PYWIKIBOT_DIR points to one config.
It used to be possible to specify normal and admin account in the same
user-config.py
As I I understand it is not the case anymore.
What I need is a possibility to edit with a normal bot account and, for
Good work!
> use the env variable PYWIKIBOT_DIR
Oh. At one time I was using two accounts at one site and I used a
script to copy the wanted user-config.py to the pywikibot directory.
If I need that again, I'll try to remember to use the env variable.
On Wed, Sep 7, 2022 at 4:15 PM Erik Sommer
Also in addition. The scoping of the OAuth token works perfectly. The
sysop bot has only the protect right.
On 07.09.22 09:14, Erik Sommer wrote:
Thanks Johnuniq and also xqt for the good hints,
at last I found my mistake. I'm operating two bot accounts at the
moment. One does all the heavy
Thanks Johnuniq and also xqt for the good hints,
at last I found my mistake. I'm operating two bot accounts at the
moment. One does all the heavy lifting, but hasn't any sysop rights. The
other one is for sysop actions only (was a wish by the community).
The solution provided by piwikibot is
I upgraded all my pip modules yesterday, including pywikibot. Your
line numbers are 18 lines different from mine in _pages.py so you
might upgrade although that is unlikely to help.
Browsing around the source shows that @need_right('protect') is in
site/_apisite.py and is responsible for the
This experiment was the initial reason for my post. I have one bot
configured and I tried to protect some pages. This is stack trace from
this experiment:
File "/home/esommer/workspace/WS_THEbotIT/service/protect.py", line
47, in task
lemma.protect(reason="Schutz fertiger Seiten",
I don't know but many years ago I ran an admin bot on a non-WMF wiki.
A separate sysopnames variable was used to specify a user with admin
credentials. Sysopnames was removed from pywikibot and whereas I've
never used it, the theory is that now you have only a single bot user
as defined in
No worries,
I do software dev for a living. It's all local and no one is checking in
credentials. But that wasn't really the question here.
On 05.09.22 17:21, Roy Smith wrote:
I'm a total newbie at pywikibot, but let me address the general issue
of putting credentials in config files.
Be
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
19 matches
Mail list logo