SyntaxFix
Write A Post
Hire A Developer
Questions
You want to convert html (a byte-like object) into a string using .decode, e.g. html = response.read().decode('utf-8').
.decode
html = response.read().decode('utf-8')
See Convert bytes to a Python String