jenkins-bot merged this change.
[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.