I have a huge log file which I want to parse using python. The file contains the data of working and non working audio/video/image file
The content of log.txt
filename = abc.mp4
played correctly
filname = cdf.wav
failed
filename = rtg.mp3
failed
Now from this log.txt how to find out failed filename I tried re.search but seems like I not reaching at any point with that approach So I used following approach but so far I am not able the way to find out the filename
f = open('log.txt', 'r')
for i in f.realines():
if "failed" in i:
print "failed files: "
f.close()