Files
ffmpeg_collection/rich_parser.py
2026-02-26 15:52:01 +01:00

11 lines
395 B
Python

def search_file(file_path, word):
with open(file_path, 'r') as file:
for line in reversed(file.readlines()):
if word in line:
return line
speed = search_file('E:/Projects/python/ffmpeg_work_folder/testoutprogress.txt', 'speed=')
frame = search_file('E:/Projects/python/ffmpeg_work_folder/testoutprogress.txt', 'frame=')
print(speed)
print(frame)