Answer the question
In order to leave comments, you need to log in
How to deal with 'utf-8' codec can't decode byte 0xc0 in position 199: invalid start byte error?
there is a site, the data from which are obtained in the form
<h4>Àäðåñà ìàãàçèíîâ</h4><br>\n <h4>ã. Ðûáèíñê</h4><br>\n <ol>\n <li>Óë. Ëüâà Îøàíèíà, ä.5 òåë. (4855)26-57-64</li>\n
.content.decode('utf-8')
like this error utf-8' codec can't decode byte 0xc0 in position 199: invalid start byte .content.decode('utf-8', errors='ignore')
this I get a <h4> </h4><br>\n <h4>. </h4><br>\n <ol>\n <li>. , .5 . (4855)26-57-64</li>\n <li>. , . , .10 . (4855)27-38-77</li>\n
Answer the question
In order to leave comments, you need to log in
I also solved this bug. In general, you need to use either CP866 or Windows-1251 encoding.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question