utf8 codec can't decode byte 0x96 in python

前端 未结 3 457
被撕碎了的回忆
被撕碎了的回忆 2020-12-05 07:34

I am trying to check if a certain word is on a page for many sites. The script runs fine for say 15 sites and then it stops.

UnicodeDecodeError: \'utf8\' co

3条回答
  •  失恋的感觉
    2020-12-05 07:43

    The site 'http://www.homestead.com' doesn't claim to be sending you utf-8, the response actually claims to be iso-8859-1:

    
    

    You must use the correct encoding for the page you actually received, not just guess randomly.

提交回复
热议问题