jenkins-bot merged this change.

View Change

Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
[IMPR] use original tag name

see https://www.flickr.com/services/api/misc.tags.html

Change-Id: I30e563f94da9fc6d17cd79c154aecf90fd497c96
---
M scripts/flickrripper.py
1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/scripts/flickrripper.py b/scripts/flickrripper.py
index 18fd6cc..f4c9631 100755
--- a/scripts/flickrripper.py
+++ b/scripts/flickrripper.py
@@ -141,12 +141,16 @@
return site.getFilesFromAnHash(base64.b16encode(hashObject.digest()))


-def getTags(photoInfo):
+def getTags(photoInfo, raw=False):
"""Get all the tags on a photo."""
result = []
for tag in photoInfo.find('photo').find('tags').findall('tag'):
- result.append(tag.text.lower())
-
+ if raw:
+ # use original tag name
+ # see https://www.flickr.com/services/api/misc.tags.html
+ result.append(tag.attrib['raw'].lower())
+ else:
+ result.append(tag.text.lower())
return result



To view, visit change 577177. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I30e563f94da9fc6d17cd79c154aecf90fd497c96
Gerrit-Change-Number: 577177
Gerrit-PatchSet: 6
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)