|
|
|
import Douyin from '../bot/Douyin.mjs';
|
|
|
|
import Kuaishou from '../bot/Kuaishou.mjs';
|
|
|
|
import configs from '../config.mjs';
|
|
|
|
|
|
|
|
(async () => {
|
|
|
|
configs.heroTabOptions.timeoutMs = 10000; //所有内容加载完成超时
|
|
|
|
console.log('Hero配置', configs);
|
|
|
|
const heroCloudServer = 'ws://192.168.3.13:1818';
|
|
|
|
|
|
|
|
//抖音测试
|
|
|
|
//const douyin = new Douyin(heroCloudServer);
|
|
|
|
//const url = 'https://v.douyin.com/iJr1NsJJ/';
|
|
|
|
//console.log('请求中: %s ...', url);
|
|
|
|
//const data = await douyin.scrap(url);
|
|
|
|
//console.log("解析结果:\n%s", JSON.stringify(data));
|
|
|
|
|
|
|
|
//快手测试
|
|
|
|
const kuaishou = new Kuaishou(heroCloudServer);
|
|
|
|
const url = 'https://www.kuaishou.com/f/X8FTguiIjZQVwE7';
|
|
|
|
console.log('请求中: %s ...', url);
|
|
|
|
const data = await kuaishou.scrap(url);
|
|
|
|
console.log("解析结果:\n%s", JSON.stringify(data));
|
|
|
|
|
|
|
|
})();
|