Python 网页抓取:解析漂亮的汉字时出现问题 soup/requests

Python Webscraping: Problems parsing chinese characters with beautiful soup/requests

我正在抓取一个中文网站,通常解析中文字符没有问题,我用 bs4 中的模式函数查找特定的 url。 但是,对于这个特定的中文网站,汤无法正确解析。 下面是我用来设置汤的代码:

start = f'http://www.shuichan.cc/news_list.asp?action=&c_id=93&s_id=210&page={1}'
r = requests.get(start)
soup = bs(r.content, "html.parser")

打印汤的示例如下:

Current soup

注意:虽然是垃圾邮件,但我不得不添加一张图片作为 Stack :)

以上内容应该如下所示:

Proper soup

我想知道我是否必须在请求中指定某种编码,或者可能在 soup 中指定某种编码,但到目前为止我还没有找到任何可行的方法。

提前致谢!

我不懂中文。这是否给出了预期的结果?

import requests
from bs4 import BeautifulSoup as bs

start = f'http://www.shuichan.cc/news_list.asp?action=&c_id=93&s_id=210&page={1}'
r = requests.get(start)
soup = bs(r.content.decode('GBK', 'ignore'), "html.parser")

print(soup)