
通过注入js脚本实现
在chrome浏览器打开直播间,f12打开开发者工具,切换到console,输入以下代码:
var targetNode = document.getElementsByClassName("webcast-chatroom___items")[0];
// 观察者的选项(要观察哪些突变)
var config = {
attributes: true,
childList: true,
subtree: true
};
// 当观察到突变时执行的回调函数
var callback = function(mutationsList) {
mutationsList.forEach(function(item, index) {
if (item.type == 'childList') {
console.log(item.target.innerText);
} else if (item.type == 'attributes') {
}
});
};
// 创建一个链接到回调函数的观察者实例
var observer = new MutationObserver(callback);
// 开始观察已配置突变的目标节点
observer.observe(targetNode, config);回车后就能实时看到抖音公屏消息了。网友回复
如何将linux服务器的文件目录映射到windows电脑磁盘?
Docling 与 MarkItDown 两个库有啥不同?
豆包收费后国产其他ai软件也会跟进收费吗?
JPEG 与 HEIF图片格式区别?
centos7版本太旧无法安装python3.11,如何在docker中运行python3.11?
python如何做个RPA按键精灵的程序?
写一个windows的cmd的python代码如何在命令行中捕获获取复制粘贴的图片?
如何将别人爆款的抖音短视频短剧文案提取为seedance2的提示词?
阿里云域名dns云解析10万次日限额如何应对?
windows电脑如何提交上架ipa苹果应用?


