HTML scraping using lxml and requests gives a unicode error [duplicate]
问题 This question already has answers here : parsing XML file gets UnicodeEncodeError (ElementTree) / ValueError (lxml) (2 answers) Closed 4 years ago . I'm trying to use HTML scraper like the one provided here. It works fine for the example they provided. However, when I try using it with my webpage, I receive this error - Unicode strings with encoding declaration are not supported. Please use bytes input or XML fragments without declaration. I've tried googling but couldn't find a solution. I'd