Search icon
Subscription
0
Cart icon
Close icon
You have no products in your basket yet
Save more on your purchases!
Savings automatically calculated. No voucher code required
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Go Web Scraping Quick Start Guide

You're reading from  Go Web Scraping Quick Start Guide

Product type Book
Published in Jan 2019
Publisher Packt
ISBN-13 9781789615708
Pages 132 pages
Edition 1st Edition
Languages
Author (1):
Vincent Smith Vincent Smith
Profile icon Vincent Smith

What is a User-Agent string?

When an HTTP client makes a request to a web server, they identify who they are. This holds true for web scrapers and normal browsers alike. Have you ever wondered why a website knows that you are a Windows or a Mac user? This information is contained inside your User-Agent string. Here is an example User-Agent string for a Firefox browser on a Linux computer:

Mozilla/5.0 (X11; Linux x86_64; rv:57.0) Gecko/20100101 Firefox/57.0

You can see that this string identifies the family, name, and version of the web browser, as well as the operating system. This string will be sent with every request from this browser inside of a request header, such as the following:

GET /index.html HTTP/1.1
Host: example.com
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:57.0) Gecko/20100101 Firefox/57.0

Not all User-Agent strings contain this much information. HTTP clients...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}