feat: 抖音支持指定视频列表爬去

This commit is contained in:
Relakkes
2023-11-18 22:07:30 +08:00
parent 098923d74d
commit 81bc8b51e2
7 changed files with 52 additions and 25 deletions

View File

@@ -74,13 +74,12 @@ class XiaoHongShuCrawler(AbstractCrawler):
await login_obj.begin()
await self.xhs_client.update_cookies(browser_context=self.browser_context)
crawler_type_var.set(self.crawler_type)
if self.crawler_type == "search":
# Search for notes and retrieve their comment information.
crawler_type_var.set("search")
await self.search()
elif self.crawler_type == "detail":
# Get the information and comments of the specified post
crawler_type_var.set("detail")
await self.get_specified_notes()
else:
pass