jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/577181 )
Change subject: [FIX] Username with illegal characters as titles, need to be cleaned up
......................................................................
[FIX] Username with illegal characters as titles, need to be cleaned up
Change-Id: Idafbd70e2058684c66d9b6340f8b80658b2e0a12
---
M scripts/flickrripper.py
1 file changed, 2 insertions(+), 0 deletions(-)
Approvals:
Xqt: Looks good to me, approved
Shizhao: Looks good to me, but someone else must approve
jenkins-bot: Verified
diff --git a/scripts/flickrripper.py b/scripts/flickrripper.py
index c0038ee..18fd6cc 100755
--- a/scripts/flickrripper.py
+++ b/scripts/flickrripper.py
@@ -171,6 +171,7 @@
if not site:
site = pywikibot.Site('commons', 'commons')
username =
photoInfo.find('photo').find('owner').attrib['username']
+ username = cleanUpTitle(username)
title = photoInfo.find('photo').find('title').text
if title:
title = cleanUpTitle(title)
@@ -191,6 +192,7 @@
else:
# Use the id of the photo as last resort.
title = photoInfo.find('photo').attrib['id']
+
fileformat = photoInfo.find('photo').attrib['originalformat']
if pywikibot.Page(site, 'File:{} - {} - {}.{}'
.format(title, project, username, fileformat)).exists():
--
To view, visit
https://gerrit.wikimedia.org/r/577181
To unsubscribe, or for help writing mail filters, visit
https://gerrit.wikimedia.org/r/settings
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Idafbd70e2058684c66d9b6340f8b80658b2e0a12
Gerrit-Change-Number: 577181
Gerrit-PatchSet: 3
Gerrit-Owner: Shizhao <shizhao(a)gmail.com>
Gerrit-Reviewer: D3r1ck01 <xsavitar.wiki(a)aol.com>
Gerrit-Reviewer: Shizhao <shizhao(a)gmail.com>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot (75)