Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
ulixee
GitHub Repository: ulixee/secret-agent
Path: blob/main/examples/default-agent.js
1028 views
1
const agent = require('secret-agent');
2
3
(async () => {
4
// configure input.url by running as node default-agent.js --input.url="https://ulixee.org"
5
const url = agent.input.url ?? `https://dataliberationfoundation.org/`;
6
7
const start = new Date();
8
9
await agent.goto(url, 5e3);
10
await agent.waitForPaintingStable();
11
12
agent.output = {
13
url,
14
start,
15
end: new Date(),
16
};
17
18
await agent.close();
19
})();
20
21