V
V
Vladik21092022-01-28 21:53:15
Node.js
Vladik2109, 2022-01-28 21:53:15

How to pass URL as variable to Puppeteera's page.goto()?

Hello everyone, I need to pass a link to the site in a variable that receives data from the console. But page.goto throws an error

rl.question('please enter the link:', function (link) {
        url=link;
        rl.close();
    });

await page.goto(url);

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question