jenkins-bot merged this change.

View Change

Approvals: Xqt: Looks good to me, approved Shizhao: Looks good to me, but someone else must approve jenkins-bot: Verified
[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(-)

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 change 577181. To unsubscribe, or for help writing mail filters, visit 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@gmail.com>
Gerrit-Reviewer: D3r1ck01 <xsavitar.wiki@aol.com>
Gerrit-Reviewer: Shizhao <shizhao@gmail.com>
Gerrit-Reviewer: Xqt <info@gno.de>
Gerrit-Reviewer: jenkins-bot (75)