python qqbot

在python v3.9中用qqbot会出现一个错误AttributeError: ‘HTMLParser’ object has no attribute ‘unescape’ :

解决方案:
Starting in python 3.9 using HTMLParser()unescape() will result in the error AttributeError: ‘HTMLParser’ object has no attribute ‘unescape’

import html
html.unescape()

修改源码import html.parser; htmlUnescape = html.parser.HTMLParser().unescape
为import html.parser; htmlUnescape = html.unescape

你可能感兴趣的:(笔记,python)