Adapt iTunesParser.py for Python 3

This commit is contained in:
2017-04-12 01:39:26 +02:00
parent dd8a5c3c58
commit dec9e5ab05

View File

@@ -1,7 +1,7 @@
#!/usr/bin/env python
"""
--> Parse library and just do JSON
--> Parse library and just do JSON adapted for Elasticsearch
iTunes Graph Parser
@@ -235,5 +235,5 @@ if __name__ == '__main__':
print(output)
else:
with io.open(options.output, 'wb') as outfile:
outfile.write(output)
outfile.write(bytes(output, 'UTF-8'))
print('JSON data written to: ' + options.output)