lifegpc / bili

A tool to download barrage/video from bilibili/acfun. Support English, Japanese and Chinese(China).一个Python编写的从Bilibili/Acfun下载弹幕/视频的工具。支持英语、日语和中文(**)。(WEBGUI正在路上)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

BUG Report: attribute 'unescape' of 'HTMLParser' object has been removed since Python 3.9

walwan opened this issue · comments

Problem Description

See output below:

Traceback (most recent call last):
File "~/bili/start.py", line 2315, in
main(ip)
File "~/bili/start.py", line 1148, in main
PrintInfo.printlr(ri)
File "~/bili/PrintInfo.py", line 180, in printlr
print(f"{lan['O7']}{rhtml(d['des'])}")#简介:
File "~/bili/bstr.py", line 85, in rhtml
r=HTMLParser().unescape(r)
AttributeError: 'HTMLParser' object has no attribute 'unescape'

Reason

From bpo-37328 in Python 3.9 changelog (here), attribute 'unescape' of 'HTMLParser' object has been removed.

I just personally regard this as a bug. If you are not planning to remove code using "unescape", just close this issue.

Solution

  • Use Python 3.8