fix: 修复小红书上传只有一个标签的问题

This commit is contained in:
zzzzzy2k
2026-05-03 14:03:10 +08:00
committed by GitHub
parent 34a3b3b47e
commit 8c30f4c6a6
+9 -8
View File
@@ -399,14 +399,15 @@ class XiaoHongShuBaseUploader(BaseVideoUploader):
desc = page.locator('p[data-placeholder*="输入正文描述"]')
await desc.click()
await page.keyboard.type("#" + self.tags[0], delay=30)
await page.locator('#creator-editor-topic-container').wait_for(
state="visible",
timeout=3000
)
first_item = page.locator('#creator-editor-topic-container .item').first
await first_item.wait_for(state="visible", timeout=2000)
await first_item.click()
for tag in self.tags: # 循环处理所有 tags
await page.keyboard.type("#" + tag, delay=30)
await page.locator('#creator-editor-topic-container').wait_for(
state="visible",
timeout=3000
)
first_item = page.locator('#creator-editor-topic-container .item').first
await first_item.wait_for(state="visible", timeout=2000)
await first_item.click()
async def fill_meta(self, page: Page) -> None:
await self.fill_title(page)