Xqt has submitted this change. ( 
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1272691?usp=email )

Change subject: fix: remove UTM tracking parameters from ProofreadPage.url_image
......................................................................

fix: remove UTM tracking parameters from ProofreadPage.url_image

Bug: T419943
Change-Id: I47170496fda68a26bba30cb8a5882561b090ecf6
---
M pywikibot/proofreadpage.py
1 file changed, 7 insertions(+), 2 deletions(-)

Approvals:
  Xqt: Verified; Looks good to me, approved
  jenkins-bot: Verified




diff --git a/pywikibot/proofreadpage.py b/pywikibot/proofreadpage.py
index 34733a0..c0181b7 100644
--- a/pywikibot/proofreadpage.py
+++ b/pywikibot/proofreadpage.py
@@ -881,6 +881,9 @@
     def url_image(self) -> str:
         """Get the file url of the scan of ProofreadPage.

+        .. version-changed:: 11.2
+           Remove UTM tracking parameters.
+
         :return: File url of the scan of ProofreadPage or None. For MW
             version < 1.40:
         :raises Exception: In case of http errors
@@ -890,9 +893,11 @@
             scan
         """
         if self.site.version() < MediaWikiVersion('1.40'):
-            return self._url_image_lt_140()
+            url = self._url_image_lt_140()
+        else:
+            url = self._url_image_ge_140()

-        return self._url_image_ge_140()
+        return url.split('?', 1)[0]

     def _ocr_callback(
         self,

--
To view, visit 
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1272691?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: I47170496fda68a26bba30cb8a5882561b090ecf6
Gerrit-Change-Number: 1272691
Gerrit-PatchSet: 4
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]

Reply via email to