I have a script to go from ChannelsDVR Json to sage Properties but I need to replace some characters in Genre and year. any hep is appreciated.
I am getting this ....
Title=A Few Good Men (1992)
Description=Navy lawyers (Tom Cruise, Demi Moore) defend Marines for a murder at Gitmo.
Genre=['Drama']
Year=1992-12-11T00:00:00Z
Need this ..
Title=A Few Good Men (1992)
Description=Navy lawyers (Tom Cruise, Demi Moore) defend Marines for a murder at Gitmo.
Genre=Drama
Year=1992
#! /usr/bin/python
import json
json_file = 'c:/Python/A Few Good Men (1992) 2021-05-22-1959.json'
with open(json_file) as json_data:
data = json.load(json_data)
json_data.close()
outfile=open('c:/python/output.txt', 'w')
print ("Title={}".format(data['Title']), file=outfile)
print ("Description={}".format(data['Description']), file=outfile)
print ("Genre={}".format(data['Genres']), file=outfile)
print ("Year={}".format(data['OriginalBroadcastDateTime']), file=outfile)
outfile.close()