Skip to content

Commit f9f76d1

Browse files
committed
fix: 修复字符集不匹配的情况提取web的问题
--bug=1048607 --user=刘瑞斌 【github#1577】有个网站导入web知识库报错 https://www.tapd.cn/57709429/s/1623295
1 parent 14ee62a commit f9f76d1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

apps/common/util/fork.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ def get_beautiful_soup(response):
142142
if len(charset_list) > 0:
143143
charset = charset_list[0]
144144
if charset != encoding:
145-
html_content = response.content.decode(charset)
145+
html_content = response.content.decode(encoding)
146146
return BeautifulSoup(html_content, "html.parser")
147147
return beautiful_soup
148148

0 commit comments

Comments
 (0)