"POST data should be bytes or an iterable of bytes. It cannot be of type str."
需要在urlencode语句后加encode(encoding=‘UTF8‘)
data = urllib.parse.urlencode(values).encode(encoding=‘UTF8‘)
Post页面爬取失败__编码问题
原文:https://www.cnblogs.com/amou/p/9134425.html