Enhance your web scraping experience with cloud-driven headful browsers, ensuring stealthy automation and efficient unblocking.
Haven't got a Gologin account? π We got you covered! Follow this quick Tango to sign up and configure an API token.
Already got an account π Go straight to Gologin API Documentation page and copy an API token.
npm i puppeteer-coreor
yarn add puppeteer-core
puppeteer-coreis a lightweight version of Puppeteer that doesn't come with a Chromium browser in it (you don't need a local browser in this case).
3. Set the TOKEN variable to your API token from Step 2 in the example script
const puppeteer = require('puppeteer-core');
const TOKEN = 'your-token'; // π change this
(async () => {
const browser = await puppeteer.connect({
browserWSEndpoint: `https://cloudbrowser.gologin.com/connect?token=${TOKEN}`,
ignoreHTTPSErrors: true,
});
console.info('Browser connected! Scraping...');
const page = await browser.newPage();
await page.goto('https://iphey.com');
await page.screenshot({ path: 'screenshot.jpeg' });
console.info('Screenshot taken!');
})();node ./examples/quick-start.jsYou should now see the logs and the screenshot saved in the root directory
Browser connected! Scraping...
Screenshot taken!Done!
-
token={TOKEN}(required) - API token from your Gologin account. -
profile={profile_id}(optional) - ID of a specific profile you want to run. If this parameter is specified, a new profile is not auto generated. -
geolocation={type}:{country_code}(optional) - Gologin geoproxy (floppydata). This parameter adds a specified proxy to an auto generated profile. If theprofileparameter is included, thegeolocationparameter has no effect.
β
/connect?token=${TOKEN}&profile={profile_id} - run a profile with profile_id
β
/connect?token=${TOKEN} - generate a new profile and run it
β
/connect?token=${TOKEN}&geolocation=dataCenter:DE - generate a new profile with a German geolocation and run it (check the geolocation script)
β /connect?profile={profile_id} - oops! You need to set the token parameter for authorization