1

I am trying to get the keywords from the metadata of an image using the IPTCInfo3 python library. The keyword tags for the images on windows (right clicking the image, going to the details tab) are:

Capital Cities; Travel; Tourism; Building Exterior; Banking; City Life; Arranging; Downtown District; Dusk; City of London; London - England; Working; Skyscraper; Office Building; Global Business; Illuminated; Glass - Material; Modern; International Landmark; Famous Place; Business; Finance; Architecture; Travel Destinations; Urban Scene; Outdoors; England; UK; Europe; Reflection; Sunset; Sunrise - Dawn; Sky; Thames River; River; Tower; District; Urban Skyline; Cityscape; shard; Capital Cities,Travel,Tourism,Building Exterior,Banking,City Lif; 

However I am only getting the last part of the keywords list:

Capital Cities,Travel,Tourism,Building Exterior,Banking,City Lif;

This is my python script:

from iptcinfo3 import IPTCInfo

info = IPTCInfo("C:/Users/Dave/Desktop/ImageTest.jpg")
print(info['keywords'])

However, if I remove Capital Cities,Travel,Tourism,Building Exterior,Banking,City Lif; from the tags, it then outputs all the keywords, not just that one entry. It seems that this line in the tags seperated by , rather than ; is throwing it off. Is there a work around this to display all the keywords or is it nesting it in a way I can't seem to output it correctly?

This is the output from my script exactly in the terminal:

[b'Capital Cities,Travel,Tourism,Building Exterior,Banking,City Lif']

0 Answers0