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.
21 lines
516 B
21 lines
516 B
import Hero from '@ulixee/hero'; |
|
|
|
(async () => { |
|
const hero = new Hero({ connectionToCore: 'ws://192.168.3.13:1818' }); |
|
|
|
//const url = 'https://filesite.io'; |
|
//const url = 'https://www.google.com'; |
|
const url = 'https://v.douyin.com/iJr1NsJJ/'; |
|
await hero.goto(url, { |
|
timeoutMs: 20000, |
|
referrer: '-' |
|
}); |
|
|
|
const title = await hero.document.title; |
|
console.log("Page title:\n", title); |
|
|
|
await hero.close(); |
|
})().catch(error => { |
|
console.error("Error got:\n%s", error); |
|
process.exit(1); |
|
});
|
|
|