diff --git a/bot/Douyin.mjs b/bot/Douyin.mjs index eadf087..39060b2 100644 --- a/bot/Douyin.mjs +++ b/bot/Douyin.mjs @@ -76,8 +76,8 @@ class Douyin extends HeroBot { elType = 'video'; if (!imgElem) { - //尝试获取用户头像作为封面图,兼容直播页面 - imgElem = await hero.querySelector('.avatar-component-avatar-container img'); + //尝试获取用户头像作为封面图,兼容直播已结束页面 + imgElem = await hero.querySelector('.reflow-content img'); elType = 'image'; if (!imgElem) { diff --git a/test/scrap_test.mjs b/test/scrap_test.mjs index bfbe5e6..eef5f94 100644 --- a/test/scrap_test.mjs +++ b/test/scrap_test.mjs @@ -26,6 +26,8 @@ import getConfigs from '../config.mjs'; //直播地址测试 url = 'https://v.douyin.com/i2WaMoAN/'; + //已结束直播 + url = 'https://v.douyin.com/i2W5TV4e/'; configs.heroTabOptions.timeoutMs = 20000; //所有内容加载完成超时