Get Page HTML
Get Page HTML
NodeJS - Puppeteer
Click on element
Click on element
NodeJS - Puppeteer
Scroll to page bottom
Scroll to page bottom
You might need to scroll the viewport to the bottom at times, such as when activating ‘infinite scroll’. Here’s how:
NodeJS - Puppeteer
Take Screenshot
Take Screenshot
When running the example scripts above the screenshot above will be saved as “screenshot.png” within your files.
Set Cookies
Set Cookies
Blocking Endpoints
Blocking Endpoints
It is possible to block endpoints that are not required to save bandwidth. See an example of this below:
NodeJS - Puppeteer
Country Targeting
Country Targeting
When using the Browser API, the same country-targeting parameter is available to use as in our other proxy products.When setting up your script, add the In the example above, we added
-country
flag, after your “USER” credentials within the Bright Data endpoint, followed by the 2-letter ISO code for that country.-country-us
to the Bright Data endpoint within our script, so our request will originate from the United States (“us”).EU region
You can target the entire European Union region in the same manner as “Country” above by adding “eu” after “country” in your request:-country-eu
Requests sent using -country-eu
, will use IPs from one of the countries below which are included automatically within “eu”:Countries
The allocation of a country within the EU is random.