jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/675757 )
Change subject: [bugfix] Remove 'Special:MyLanguage/' from mainpage title ......................................................................
[bugfix] Remove 'Special:MyLanguage/' from mainpage title
Bug: T278702 Change-Id: I926b9442c1afc6d0964a12d8f44877a47c3885d1 --- M tests/aspects.py 1 file changed, 4 insertions(+), 1 deletion(-)
Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
diff --git a/tests/aspects.py b/tests/aspects.py index 6002220..98d9aa5 100644 --- a/tests/aspects.py +++ b/tests/aspects.py @@ -28,6 +28,7 @@
from pywikibot import Site
+from pywikibot.backports import removeprefix from pywikibot.comms import http from pywikibot.data.api import Request as _original_Request from pywikibot.exceptions import ServerError, NoUsername @@ -942,7 +943,9 @@ if self._mainpage.site == site: return self._mainpage
- mainpage = pywikibot.Page(site, site.siteinfo['mainpage']) + maintitle = site.siteinfo['mainpage'] + maintitle = removeprefix(maintitle, 'Special:MyLanguage/') # T278702 + mainpage = pywikibot.Page(site, maintitle) if not isinstance(site, DrySite) and mainpage.isRedirectPage(): mainpage = mainpage.getRedirectTarget()
pywikibot-commits@lists.wikimedia.org