My python script downloads youtube videos using the youtube-dl library. It only prints progress and does not return progress value. I have to pump the progress to my HTML page. Using return() only gives code as 0 or none. JavaScript is configured to get return value and add it to a textarea. It is not possible to configure the library as it is huge.
stream.download(quiet=False, filepath=outfilepath)
This calls a module pafy which further calls youtube-dl.
16,498,967.0 Bytes [100.00%] received. Rate: [5446 KB/s]. ETA: [0 secs]
This output does not go to HTML but is printed in python shell. How to get this output in my HTML page?