fix: 修复抖音中文搜索关键二次编码问题
This commit is contained in:
parent
13ee7bdf95
commit
548271e537
|
@ -1,6 +1,6 @@
|
|||
# 基础配置
|
||||
PLATFORM = "xhs"
|
||||
KEYWORDS = "python,golang"
|
||||
KEYWORDS = "编程副业,编程兼职"
|
||||
LOGIN_TYPE = "qrcode" # qrcode or phone or cookie
|
||||
COOKIES = ""
|
||||
# 具体值参见media_platform.xxx.field下的枚举值,暂时只支持小红书
|
||||
|
|
|
@ -140,7 +140,7 @@ class DOUYINClient(AbstractApiClient):
|
|||
query_params = {
|
||||
'search_channel': search_channel.value,
|
||||
'enable_history': '1',
|
||||
'keyword': urllib.parse.quote(keyword),
|
||||
'keyword': keyword,
|
||||
'search_source': 'tab_search',
|
||||
'query_correct_type': '1',
|
||||
'is_filter_search': '0',
|
||||
|
@ -151,10 +151,10 @@ class DOUYINClient(AbstractApiClient):
|
|||
'list_type': 'multi',
|
||||
}
|
||||
if sort_type.value != SearchSortType.GENERAL.value or publish_time.value != PublishTimeType.UNLIMITED.value:
|
||||
query_params["filter_selected"] = urllib.parse.quote(json.dumps({
|
||||
query_params["filter_selected"] = json.dumps({
|
||||
"sort_type": str(sort_type.value),
|
||||
"publish_time": str(publish_time.value)
|
||||
}))
|
||||
})
|
||||
query_params["is_filter_search"] = 1
|
||||
query_params["search_source"] = "tab_search"
|
||||
referer_url = f"https://www.douyin.com/search/{keyword}?aid=f594bbd9-a0e2-4651-9319-ebe3cb6298c1&type=general"
|
||||
|
|
Loading…
Reference in New Issue