Open schcriher opened 7 years ago
A possible better way:
lyrics_html = requests.get(link, headers=HEADERS)
lyrics_html.encoding = html.apparent_encoding
soup = BeautifulSoup(lyrics_html.text, "lxml")
I have the same issue
update:
fix issue using @schcriher fix, thanks!
The contribution of Nico264 1 is interesting. One way to solve only the encoding problem is to edit the line 37 of the lyrics.py file: replace "text" with "content", according to the requests documentation 3, for utf-8 it works perfect.
Ref: