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