DEV Community

Hugo Sandoval
Hugo Sandoval

Posted on • Updated on

The importance of use User Agent to Scraping Data

User Agent

Using User Agent isn't a common practice by many scrapers and crawlers developers. But it is important to know that using the correct User Agent can help and make easy the scraping tasks of many websites.

What is a User Agent?

The User Agent is a text string that the client sends through the headers of a request, and serves as an identifier for the type of device, operating system and browser that we are using. This information tells the server that, for example, we are using Google Chrome 80 browser and a computer with Windows 10. And therefore, the server prepares a response intended for that type of device.

Now I have a developer blog, continue reading this post here: https://hhsm95.dev/blog/the-importance-of-using-user-agent-to-scraping-data/

Thank you!

Discussion (2)

Collapse
asmalyshev1 profile image
ASMalyshev

Use UserAgent 'UCWEB/2.0 (compatible; Googlebot/2.1; +google.com/bot.html)'

Collapse
asmalyshev1 profile image
ASMalyshev

Thank you very mutch