change decode

This commit is contained in:
lowking 2021-05-24 09:32:41 +08:00 committed by GitHub
parent 25a78c8762
commit 3adccc1b6c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

2
pl.py
View File

@ -34,7 +34,7 @@ async def pl(context):
for _ in range(3): # 最多重试3次
try:
plhtml = get(f"http://www.gd2063.com/pl/?{s}")
htmlStr = plhtml.content.decode("gb2312")
htmlStr = plhtml.content.decode("gbk")
soup = BeautifulSoup(htmlStr, 'html.parser')
arr = soup.find_all(name='a', attrs={"class": "heise"}, limit=10)
result = ""