Page MenuHomePhabricator

scripts should log in automatically
Open, MediumPublicFeature

Description

I often run replace.py and cosmetic_changes.py, and they log me in automatically.

Today I tried running movepage.py, and it didn't. Running login.py first resolved.

Isn't movepages.py supposed to log me in automatically, too?

Event Timeline

JJMC89 renamed this task from movepage.py does log in automatically to movepage.py does not log in automatically.Jan 13 2021, 1:51 AM
JJMC89 renamed this task from movepage.py does not log in automatically to movepages.py does not log in automatically.
JJMC89 added a project: Pywikibot-Scripts.
JJMC89 updated the task description. (Show Details)

Using login.py is the usual way to login. There are only a few scripts which have implemented an automatic login (clean_sandbox, cosmetic_changes, delete, editarticle, imageuncat, newitem, replace, touch, solve_disambiguation).

Where to go?

Xqt renamed this task from movepages.py does not log in automatically to scripts should log in automatically.Jan 29 2021, 12:48 PM
Xqt triaged this task as Lowest priority.
Xqt changed the subtype of this task from "Task" to "Feature Request".
This comment was removed by Xqt.

Login is made automatically already if necessays:

D:\pwb\GIT\core>pwb touch -page:user:xqt/Test
Retrieving 1 pages from wikipedia:de.
WARNING: No user is logged in on site wikipedia:de
WARNING: No user is logged in on site wikipedia:de
Password for user <redacted> on wikipedia:de (no characters will be shown):

I disabled pywikibot.Site().login() in line 112 for this test.

Xqt raised the priority of this task from Lowest to Medium.Mar 6 2023, 10:56 AM

Change 906547 had a related patch set uploaded (by Xqt; author: Xqt):

[pywikibot/core@master] [bugfix] No longer lazy load cookies

https://gerrit.wikimedia.org/r/906547

Change 906547 merged by Xqt:

[pywikibot/core@master] [bugfix] No longer lazy load cookies

https://gerrit.wikimedia.org/r/906547

Change 908207 had a related patch set uploaded (by Xqt; author: Xqt):

[pywikibot/core@stable] [bugfix] No longer lazy load cookies

https://gerrit.wikimedia.org/r/908207

Change 908207 merged by Xqt:

[pywikibot/core@stable] [bugfix] No longer lazy load cookies

https://gerrit.wikimedia.org/r/908207