smarnach / pyexiftool

a Python library to communicate with an instance of Phil Harvey's excellent ExifTool command-line application.
Other
270 stars 111 forks source link

metadata from uri #1

Closed annebaui closed 12 years ago

annebaui commented 12 years ago

hi, is it possible to get the metadata of an uri like this: metadata = et.get_tag("MWG:Description", "http://anne-bauermeister.de/srimatopics/gecko.jpg")

? just getting ValueError: No JSON object could be decoded back

smarnach commented 12 years ago

PyExifTool is just a wrapper around the exiftool command-line utility. Since exiftool only operates on local files, PyExifTool has the same limitation.

The easiest way around this is to download the file using urllib2.urlopen() and save it to a temporary file (tempfile.NamedTemporaryFile()),

annebaui commented 12 years ago

ok, thanks for answering that fast - i did it right the way you described it