mirror of
https://github.com/zhenxun-org/zhenxun_bot.git
synced 2025-12-15 14:22:55 +08:00
修复B站动态生成失败的问题
B站动态样式更改 1. card已变更为bili-dyn-list__item 2. 置顶消息变成了一个tag(此处存疑,暂未发现其他tag
This commit is contained in:
parent
6d824e38bc
commit
f87c60e6db
@ -333,13 +333,13 @@ async def get_user_dynamic(
|
||||
# 删除置顶
|
||||
await page.evaluate(
|
||||
"""
|
||||
xs = document.getElementsByClassName('first-card-with-title');
|
||||
xs = document.getElementsByClassName('bili-dyn-item__tag');
|
||||
for (x of xs) {
|
||||
x.remove();
|
||||
x.parentNode.remove();
|
||||
}
|
||||
"""
|
||||
)
|
||||
card = await page.query_selector(".card")
|
||||
card = await page.query_selector(".bili-dyn-list__item")
|
||||
# 截图并保存
|
||||
await card.screenshot(
|
||||
path=dynamic_path / f"{local_user.sub_id}_{dynamic_upload_time}.jpg",
|
||||
|
||||
Loading…
Reference in New Issue
Block a user