zzZ5 / Html2Epub

将 html链接, html文件 或 html文本 转换成 epub文件.
MIT License
23 stars 5 forks source link

AttributeError: module 'cgi' has no attribute 'escape' python 3.8 #2

Closed shieep closed 4 years ago

shieep commented 4 years ago

File "c:\Users\Administrator\Documents\Untitled-2.py", line 79, in downloadepub c = html2epub.create_chapter_from_string(bookpage) File "C:\Program Files\Python38\lib\site-packages\html2epub\chapter.py", line 320, in create_chapter_from_string return Chapter(clean_xhtml_string, title, url) File "C:\Program Files\Python38\lib\site-packages\html2epub\chapter.py", line 168, in init self.html_title = cgi.escape(self.title, quote=True) AttributeError: module 'cgi' has no attribute 'escape'

zzZ5 commented 4 years ago

fix: use html.escape instead of cgi.escape