jenkins-bot has submitted this change. (
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1257407?usp=email )
Change subject: IMPR: Remove UTM tracking parameter in FilePage.get_file_url()
......................................................................
IMPR: Remove UTM tracking parameter in FilePage.get_file_url()
Bug: T420827
Change-Id: I75dc69bd33cefc347265e9d7018cdc3006d05351
---
M pywikibot/page/_filepage.py
1 file changed, 5 insertions(+), 2 deletions(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/page/_filepage.py b/pywikibot/page/_filepage.py
index bdbcc6f..8f5bdb0 100644
--- a/pywikibot/page/_filepage.py
+++ b/pywikibot/page/_filepage.py
@@ -188,6 +188,9 @@
the corresponding thumbnail URL directly. See the additional
notes at :api:`Imageinfo`.
+ .. version-changed:: 11.2
+ Remove UTM tracking parameter.
+
.. seealso::
* :meth:`APISite.loadimageinfo()
@@ -201,13 +204,13 @@
"""
# Plain url is requested.
if url_width is None and url_height is None and url_param is None:
- return self.latest_file_info.url
+ return self.latest_file_info.url.split('?', 1)[0]
# Thumburl is requested.
self.site.loadimageinfo(self, history=not self._file_revisions,
url_width=url_width, url_height=url_height,
url_param=url_param)
- return self.latest_file_info.thumburl
+ return self.latest_file_info.thumburl.split('?', 1)[0]
def file_is_shared(self) -> bool:
"""Check if the file is stored on any known shared repository.
--
To view, visit
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1257407?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.wikimedia.org/r/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: I75dc69bd33cefc347265e9d7018cdc3006d05351
Gerrit-Change-Number: 1257407
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <[email protected]>
Gerrit-Reviewer: Xqt <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
Pywikibot-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]