I have a problem, I need the output of the command in python and exactly get the download speed from the wget command. My code is :
#!/usr/bin/python3
import os
import re
import subprocess
command = "wget ftp://ftp:password@172.17.1.129:1111/test.bin -p -nv "
process = subprocess.check_output(command, stderr=subprocess.STDOUT, shell=True)
ftp_result = re.findall(('\d+.\d+'),process)
print (ftp_result)
TypeError: cannot use a string pattern on a bytes-like object
What I'm doing wrong?