mirror of
https://github.com/NanmiCoder/MediaCrawler.git
synced 2026-06-06 09:57:25 +08:00
refactor: xhs add log
This commit is contained in:
@@ -136,6 +136,7 @@ class XHSClient:
|
||||
if res and res.get("items"):
|
||||
res_dict: Dict = res["items"][0]["note_card"]
|
||||
return res_dict
|
||||
utils.logger.error("[xhs.client.get_note_by_id] get note empty and res:", res)
|
||||
return dict()
|
||||
|
||||
async def get_note_comments(self, note_id: str, cursor: str = "") -> Dict:
|
||||
|
||||
@@ -102,6 +102,7 @@ class XiaoHongShuCrawler(AbstractCrawler):
|
||||
keyword=keyword,
|
||||
page=page,
|
||||
)
|
||||
utils.logger.info("Search notes res:", notes_res)
|
||||
semaphore = asyncio.Semaphore(config.MAX_CONCURRENCY_NUM)
|
||||
task_list = [
|
||||
self.get_note_detail(post_item.get("id"), semaphore)
|
||||
|
||||
Reference in New Issue
Block a user