jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1132719?usp=email )
Change subject: [IMPR] After the browser call, the script affects the possibly changed text ......................................................................
[IMPR] After the browser call, the script affects the possibly changed text
Bug: T389166 Change-Id: Ic6fd7a6d7d413f73cec446c04382050d07d4a0dc --- M scripts/replace.py 1 file changed, 8 insertions(+), 1 deletion(-)
Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
diff --git a/scripts/replace.py b/scripts/replace.py index 3bf3ca6..9ca9904 100755 --- a/scripts/replace.py +++ b/scripts/replace.py @@ -690,7 +690,12 @@ return False
def treat(self, page) -> None: - """Work on each page retrieved from generator.""" + """Work on each page retrieved from generator. + + .. versionchanged:: 10.1 + After the browser call, the script affects the possibly + changed text. + """ try: original_text = page.text except InvalidPageError as e: @@ -761,6 +766,8 @@ page.get(get_redirect=True, force=True) except NoPageError: pywikibot.info(f'Page {page.title()} has been deleted.') + else: + self.treat(page) return
if choice == 'n':
pywikibot-commits@lists.wikimedia.org