Everything you need to know about web scraping

What is web scraping?

Web scraping, also called spidering, crawling, or scraping, is the process of finding and downloading web pages. A web scraper, also known as a spider or robot, is a program that downloads web pages linked to given URLs, extracts the hyperlinks contained in them, and continuously downloads web pages found via those hyperlinks.

Over a certain period of time, a significant portion of the "surface web" is crawled. Web scrapers must be able to download thousands of pages per second, which are in turn distributed among hundreds of computers. Now you may understand what web scraping is. The articles in the helpful information section of our site will help you understand in detail what web scraping means in the business world.

Companies like Google, Facebook, LinkedIn use scraping to collect data, because most of the data these companies need exists in the form of a web page without API access. And price scraping services from websites are more needed by small and medium businesses.

Features of scraping

  • Politeness: Tracking the maximum number of website visits.
  • Reliability: It must ensure it does not get stuck on an infinite number of pages.
  • Distribution: Downloaded pages must be distributed among hundreds of computers within seconds.
  • Scalability
  • Performance and efficiency
  • Quality: It is important to maintain the quality of downloaded hyperlinks
  • Freshness
  • Extensibility

web scraping

Politeness policy

The scraper uses a small portion of the website server's bandwidth, i.e., it retrieves one page at a time. To achieve this, the request queue must be divided into one queue per web server — the server queue is open only if it has not been accessed within a given "politeness window."

For example: if the website scraper can retrieve 100 pages per second, and the politeness policy dictates that it cannot retrieve more than 1 page from the server every 30 seconds — we need URLs from at least 3,000 different servers for the crawl to reach its maximum throughput.

Web scrapers play an important role in search engines. In a web search engine, spider scrapers collect pages that need to be indexed.

There are other uses for scraper bots, such as data mining on the internet.

Example of data mining on the internet

  1. ShopWiki, which is a price comparison service
  2. Attributor - a service that searches the internet for copyright violations.

There are certain websites that are quite difficult to find using a scraper. Such sites are called the Deep or Hidden Web.

Categories of sites in the deep or hidden web

  • Private sites: sites that require login and password. Restricted to a limited circle of people and not accessible to everyone. They are static and cannot be crawled.
  • Form results: Again restricted to a limited circle. The result appears after entering specific data. For better understanding, an example: a train ticket, a plane ticket. The only limitation is the difficulty in finding changes made behind the form.
  • Scripted pages: Data is in script form. This can be a script using JavaScript, Flash, or any other language. The only limitation in this case is the slowdown of scraping because the script is executed.