MySQL (1366, "Incorrect string value: '\\xF0\\x9F\\x8E\\xAC\\xE5\\x89...' for column 'description' at row 1")

 (1366, "Incorrect string value: '\\xF0\\x9F\\x8E\\xAC\\xE5\\x89...' for column 'description' at row 1")

针对MySQL的这个错误,

第一种方法是 :

set names utf8mb4;

SET CHARACTER SET utf8mb4;
SET character_set_connection=utf8mb4;

 

第二章方法是:

  

result2 = "xxxxxxxxxxxxx"
soup = BeautifulSoup(result2,'html.parser')

插入soup即可

 

posted @ 2018-10-19 10:50  淋哥  阅读(1256)  评论(0编辑  收藏  举报