How to set user-agent header with puppeteer JavaScript and not fail

When scraping, we want to do a few things. Scrape slowly (but fast enough), use proxy, rotate ip address and rotate User-Agent header. With this, we may go unnoticed. User-Agent header is one of the… Read more

Similar

How JavaScript linters cause bugs

I was doing code review for a coworker yesterday, and it soon became obvious that he used a linter and that the linter gave him a bright idea: use strict comparisons. Using strict comparisons is a great rule to follow. === instead of ==, !== instead of !=... (more…)

Read more »

Common JavaScript functions with Lodash

There are some things in JavaScript that seem tedious to write. When I first started learning the language a few years back, I found a few common functions like shuffle and range that are included in the Ruby and Python API, but are just n...

Read more »