@ -65,7 +65,7 @@ let configs = {
@@ -65,7 +65,7 @@ let configs = {
//常用浏览器user-agent
userAgents:{
iphone_chrome:'Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1',
iphone_safari:'Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1',
iphone_wechat:'Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/604.4.7 (KHTML, like Gecko) Mobile/15C202 MicroMessenger/6.6.1 NetType/4G Language/zh_CN',
mac_chrome:'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36',
android_wechat:'Mozilla/5.0 (Linux; Android 7.1.1; OD103 Build/NMF26F; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/53.0.2785.49 Mobile MQQBrowser/6.2 TBS/043632 Safari/537.36 MicroMessenger/6.6.1.1220(0x26060135) NetType/4G Language/zh_CN',
@ -86,4 +86,4 @@ async function getConfig() {
@@ -86,4 +86,4 @@ async function getConfig() {
@ -2,15 +2,33 @@ import Hero from '@ulixee/hero';
@@ -2,15 +2,33 @@ import Hero from '@ulixee/hero';
(async()=>{
consthero=newHero({
connectionToCore:'ws://192.168.3.13:1818',
userAgent:'Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1'
connectionToCore:'ws://127.0.0.1:1818',
//iphone 12 Pro
userAgent:'Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1',
viewport:{
width:390,
height:844
},
//mac mini
//userAgent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36',
//viewport: {
// width: 1440,
// height: 900
//},
showChrome:true,
showChromeInteractions:true,
showDevtools:true,
showChromeAlive:true,
});
consturl='https://v.douyin.com/iJr1NsJJ/';
consturl='https://v.douyin.com/i2PBaR5B/';
console.log("请求 %s 中。。。",url);
awaithero.goto(url,{
timeoutMs:10000,
referrer:'https://wechat.com',
timeoutMs:60000,
referrer:'',
});
//const title = await hero.document.title;
@ -18,20 +36,54 @@ import Hero from '@ulixee/hero';
@@ -18,20 +36,54 @@ import Hero from '@ulixee/hero';