You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
1.4 KiB
36 lines
1.4 KiB
import Douyin from '../bot/Douyin.mjs'; |
|
import Kuaishou from '../bot/Kuaishou.mjs'; |
|
import Xigua from '../bot/Xigua.mjs'; |
|
import configs from '../config.mjs'; |
|
|
|
(async () => { |
|
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)); |
|
|
|
//快手测试 |
|
//configs.heroTabOptions.timeoutMs = 10000; //所有内容加载完成超时 |
|
//console.log('Hero配置', configs); |
|
//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)); |
|
|
|
//西瓜测试 |
|
const url = 'https://www.ixigua.com/7092326495246516749'; |
|
configs.heroBotOptions.referrer = url; |
|
configs.heroBotOptions.userAgent = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36'; |
|
console.log('Hero配置', configs); |
|
|
|
const xigua = new Xigua(heroCloudServer); |
|
console.log('请求中: %s ...', url); |
|
const data = await xigua.scrap(`${url}?wid_try=1`); |
|
console.log("解析结果:\n%s", JSON.stringify(data)); |
|
|
|
})();
|
|
|