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