For example, you want to scrape 100 Flipkart products from every category. But this formula will only extract the top 15 products on a page. Flipkart offers a feature called limitless scrolling, which eliminates the need for pagination (such as?page=2,?page=3) in the URL. If it had this functionality, we would have entered the value into a "while loop" and increased the page values as seen below.
page_count = 0 while page_count < 5: URL = "http://example.com?page=%d" %(page_count) # scraping code... page_count += 1
So, let's go back to limitless scrolling.
The usage of "Ajax" allows any webpage to employ limitless scrolling. However, that ajax request also includes a URL from which the goods on the same page are loaded when scrolling.
To look at that URL.
When you click the link in a new window, you'll find it easily to this, with about 15 to 20 goods on each page.
Analyze the URL; there is indeed a Get parameter called?start=. (Some number)
Certain websites' Ajax URLs may additionally include "JSON" answers. If you locate them, you won't need to scrape them; simply retrieve the JSON response as you would any other JSON API.
If you are looking for web scraping service using Infinite scrolling, contact Scraping Intelligence.
Request for a quote!
Zoltan Bettenbuk is the CTO of ScraperAPI - helping thousands of companies get access to the data they need. He’s a well-known expert in data processing and web scraping. With more than 15 years of experience in software development, product management, and leadership, Zoltan frequently publishes his insights on our blog as well as on Twitter and LinkedIn.
Explore our latest content pieces for every industry and audience seeking information about data scraping and advanced tools.
Learn how to extract Korean retail websites data to track prices, new products, and competitors, helping brands improve eCommerce decisions globally.
Learn how to build an ETL pipeline for Web Scraping with Python using clear steps, trusted libraries, and reliable data loading for business teams.
Learn how to use Web Scraping to extract eBay product prices, sales volume, and best seller data to track trends and compare competitor pricing.
Learn how to extract Google & Yahoo Finance insights using simple methods to collect stock prices, financial data & market trends for smart decisions.