提交 10d01d7c 编写于 作者: W wizardforcel

2020-07-23 23:53:30

上级 d9e53740
......@@ -10,7 +10,7 @@ from . import config
__author__ = "ApacheCN"
__email__ = "apachecn@163.com"
__license__ = "SATA"
__version__ = "2020.07.22"
__version__ = "2020.07.23"
RE_CODE = r'<(pre|code)[^>]*?>[\s\S]*?</\1>'
RE_TAG = r'<[^>]*?>'
......@@ -96,6 +96,9 @@ def trans_one(html):
return html
def trans_html(html):
# 预处理
html = re.sub(r'<\?xml[^>]*\?>', '', html)
html = re.sub(r'xmlns=".+?"', '', html)
html = process_code(html)
root = pq(html)
......
# 历史记录
v2020.7.23
+ 解决 XHTML 的解析问题
v2020.7.22
+ 将 BS4 改为 PyQuery 修复列表翻译问题
......
git add -A
git commit -am "$(date "+%Y-%m-%d %H:%M:%S")"
git push
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册