From e9cb67d1351864b3c886dbdad24c55b98d7f3ac5 Mon Sep 17 00:00:00 2001 From: hillerliao Date: Sat, 22 Oct 2022 10:08:58 +0800 Subject: [PATCH] try to fix encoding in title --- rsshub/spiders/infoq/search.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rsshub/spiders/infoq/search.py b/rsshub/spiders/infoq/search.py index 4e2c66f..d75f27c 100644 --- a/rsshub/spiders/infoq/search.py +++ b/rsshub/spiders/infoq/search.py @@ -1,6 +1,6 @@ import requests import json -from urllib.parse import unquote, quote +from urllib.parse import unquote from rsshub.utils import DEFAULT_HEADERS from rsshub.utils import fetch @@ -26,6 +26,7 @@ def ctx(category='', type=''): payload = {"q":category,"t": type,"s":20,"p":1} posts = requests.post(url, json=payload, headers=DEFAULT_HEADERS) posts = json.loads(posts.text)['data']['list'] + category = unquote(category, 'utf-8') return { 'title': f'{category} - 搜索 - InfoQ', 'link': f'{domain}/search/c=0/k={category}/t=0',