fix: 修复抖音关键词搜索为中文的情况下,有bug
This commit is contained in:
parent
7002061d70
commit
149b6bcdc8
@ -114,7 +114,7 @@ class DOUYINClient:
|
|||||||
:return:
|
:return:
|
||||||
"""
|
"""
|
||||||
params = {
|
params = {
|
||||||
"keyword": keyword,
|
"keyword": urllib.parse.quote(keyword),
|
||||||
"search_channel": search_channel.value,
|
"search_channel": search_channel.value,
|
||||||
"sort_type": sort_type.value,
|
"sort_type": sort_type.value,
|
||||||
"publish_time": publish_time.value,
|
"publish_time": publish_time.value,
|
||||||
|
@ -138,6 +138,7 @@ class DouYinCrawler(AbstractCrawler):
|
|||||||
task = asyncio.create_task(
|
task = asyncio.create_task(
|
||||||
self.get_comments(aweme_id, semaphore), name=aweme_id)
|
self.get_comments(aweme_id, semaphore), name=aweme_id)
|
||||||
task_list.append(task)
|
task_list.append(task)
|
||||||
|
if len(task_list) > 0 :
|
||||||
await asyncio.wait(task_list)
|
await asyncio.wait(task_list)
|
||||||
|
|
||||||
async def get_comments(self, aweme_id: str, semaphore: asyncio.Semaphore) -> None:
|
async def get_comments(self, aweme_id: str, semaphore: asyncio.Semaphore) -> None:
|
||||||
|
Loading…
Reference in New Issue
Block a user