1
此代码工作完全在控制台上,但是当我在烧瓶应用程序中实现它,它说,有一个AttributeError
“模块”对象有没有属性“UNESCAPE”
clean = html.unescape(tweet.text)
final = re.sub(r'\w+:\/{2}[\d\w-]+(\.[\d\w-]+)*(?:(?:\/[^\s/]*))*', '', clean)
我也试过import html
里面的for循环
和from html import unescape
'import html; print(html .__ file __)' - 我敢打赌,你正在与'html'模块隐式相对导入。 –
你的文件名是什么? –
@ jared-goguen manage.py – Blacksun