How to get information from youtube-dl in python ??
I am making an API for youtube-dl in tkinter & python and need to know: How to get the info dict from youtube-dl in realtime (speed, percentage finished, file size, etc.) ?? I have tried: import subprocess def execute(command): process = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE) # Poll process for new output until finished while True: nextline = process.stdout.readline() if nextline == '' and process.poll() != None: break sys.stdout.write(nextline.decode('utf-8')) sys.stdout.flush() output = process.communicate()[0] exitCode = process.returncode if (exitCode == 0): return