|
|
@ -2,8 +2,19 @@ import Hero from '@ulixee/hero'; |
|
|
|
|
|
|
|
|
|
|
|
(async () => { |
|
|
|
(async () => { |
|
|
|
const hero = new Hero({ connectionToCore: 'ws://192.168.3.13:1818' }); |
|
|
|
const hero = new Hero({ connectionToCore: 'ws://192.168.3.13:1818' }); |
|
|
|
await hero.goto('https://filesite.io'); |
|
|
|
|
|
|
|
|
|
|
|
const url = 'https://filesite.io'; |
|
|
|
|
|
|
|
//const url = 'https://www.google.com';
|
|
|
|
|
|
|
|
await hero.goto(url, { |
|
|
|
|
|
|
|
timeoutMs: 120000, |
|
|
|
|
|
|
|
referrer: '-' |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
const title = await hero.document.title; |
|
|
|
const title = await hero.document.title; |
|
|
|
console.log('Page title', title); |
|
|
|
console.log('Page title', title); |
|
|
|
|
|
|
|
|
|
|
|
await hero.close(); |
|
|
|
await hero.close(); |
|
|
|
})(); |
|
|
|
})().catch(error => { |
|
|
|
|
|
|
|
console.log('ERROR when request url via hero', error); |
|
|
|
|
|
|
|
process.exit(1); |
|
|
|
|
|
|
|
}); |
|
|
|