Skip to content
Advertisement

Tag: puppeteer

Puppeteer to invoke javascript function from an external .js file

Any one has a idea on how to invoke a javascript function from puppeteer which is not inline but in an external .js file. If its inline within the html->head->script tag it works but not if the script tag points to an external .js file Sample HTML File Sample Javascript file Puppeteer code sample Answer First of all, [name=”link”] should

Puppeteer & cycling a process through multiple users

I’m trying to scrape information from a webpage behind a login wall for two users. As it stands, I’ve managed to get the code to do what I want for the first user i.e. go to webpage, login, gather the links associated with properties in a saved list, use that list to gather more details and log them to console.

Puppeteer: compare return result with a text file

So I have this code, which is now scraping the web and returns the result (message and username): Since the above code is scraping a website that is dynamically changing, what I’m trying to achieve is to avoid returning duplicate messages. One of the ways I thought it could be possible done is by: creating a .txt file, in which

empty line breaks when trying to scrape with puppeteer

I was experimenting with puppeteer on youtube and I was trying to scrape the URL src and title text from the thumbnails of the youtube main page and the scraping program works fine. The issue is when it scrapes for the title and src of the thumbnails the program starts to jump lines when logging the URL src but it

how to launch puppeteer with an already existing profile multiple time

so am trying to launch puppeteer with already existed chrome profile and it works , but what i want to do is to launch the same process multiple time which throw an error (node:12820) UnhandledPromiseRejectionWarning: Error: Failed to launch the browser process! [0311/152606.490:ERROR:chrome_main_delegate.cc(679)] Web security may only be disabled if ‘–user-data-dir’ is also specified with a non-default value am doing

Advertisement