Back
Data Scraping & Aggregation

A Platform-Aware Review Extraction Tool for Amazon and Flipkart

How Pfactorial Technologies built a Flask app that turns a single Amazon or Flipkart product link into a structured, exportable review table, with built-in CAPTCHA handling.

August 21, 2026
Share
ENGAGEMENT SNAPSHOT

Pfactorial_Case_Study_ReviewMaster image 1
Figure 1 - Key figures from this engagement, at a glance.
EXECUTIVE SUMMARY
Our client needed a way to pull structured product reviews from Amazon and Flipkart from a single pasted product link, instead of a person manually reading through and compiling reviews across platforms for research or comparison.
A generic scraper doesn't clear that bar: Amazon and Flipkart each render differently, both actively resist scraping with CAPTCHA challenges and IP-based blocking, and the extraction has to reliably tell the two platforms apart from a URL before it can even start.
Pfactorial built a Flask review-comparison app that detects the source platform from the submitted URL, drives platform-specific Selenium and BeautifulSoup scraping - with CAPTCHA-retry handling and optional proxy support - and returns a structured, downloadable review table.
Why this engagement is representative This engagement demonstrates Pfactorial's ability to build resilient, platform-aware scraping - handling CAPTCHA challenges and per-site HTML differences explicitly - rather than a single generic scraper that breaks the moment a target site changes.
THE CHALLENGE
Turning a single pasted product link into a structured review table meant handling two platforms that actively resist automated access, each in a different way.

1. Amazon and Flipkart have to be told apart automatically

The app identifies the source platform from the submitted URL using regex before it can pick the right scraping logic - there's no manual platform selection step.

2. Both platforms actively resist scraping

CAPTCHA challenges interrupt extraction, especially on Amazon, and the app has to detect and recover from them - closing and reopening the browser, and retrying without a proxy - rather than simply failing the request.

3. Two platforms, two completely different HTML structures

amazon_reviews() and flipkart_reviews() each parse their target site's specific markup with BeautifulSoup; a change to either site's layout breaks only that collector, as later happened to the Flipkart path.

4. Review data has to be usable outside the app, not just displayed

Results need a downloadable CSV path, not just an on-screen table, so the extracted reviews are usable in a spreadsheet or a separate analysis workflow.
The real brief Not "scrape one site's reviews" but "take any Amazon or Flipkart product link and return a structured, exportable review table, resiliently."
THE SOLUTION
Pfactorial built a Flask app that detects the source platform from a submitted product URL, runs platform-specific Selenium and BeautifulSoup scraping with CAPTCHA-retry handling, and returns the results as an on-screen table or a CSV download.
Pfactorial_Case_Study_ReviewMaster image 2
Figure 1 - One pasted link routes through platform detection, resilient extraction, and structured delivery.

Architectural principles

  • Detect the platform, don't ask the user - main() infers Amazon vs. Flipkart from the URL itself by regex, so the interface stays a single input box rather than a platform picker.
  • One collector per platform, isolated from the other - amazon_reviews() and flipkart_reviews() are separate functions tailored to each site's HTML, so a layout change on one platform doesn't take down extraction on the other.
  • CAPTCHA handling as an explicit retry path - The Amazon collector detects a CAPTCHA page and retries with a fresh, non-proxy browser rather than treating the challenge as a hard failure.
  • No persistence, by design - Review data is a one-time collection returned per request, not written to a database - the extraction is scoped to what the user asked for, nothing retained afterward.
CAPABILITIES DELIVERED
Each capability covers one step of turning a pasted product link into usable review data.
CAPABILITY
WHAT IT DOES
Platform auto-detection
Identifies Amazon or Flipkart from the submitted URL by regex, with no manual platform selection.
Structured review extraction
Captures product name, customer rating, review title, review description, and review upvotes for each review on the product's first review page.
CAPTCHA-aware scraping
Detects CAPTCHA challenges on Amazon and retries with browser restarts and a non-proxy fallback.
Proxy-optional browser configuration
proxy_browser.py can configure the Selenium browser with or without a proxy, depending on what the target site currently requires.
CSV export
The /download_csv route sends the extracted reviews as a downloadable file for use outside the app.
Pfactorial_Case_Study_ReviewMaster image 3
Figure 2 - Detection, extraction, and delivery run as three isolated, purpose-built stages.
Design note Reviews are deliberately not persisted to a database - each extraction is scoped to the single request that triggered it. That keeps the app simple and avoids owning stored review data long-term, at the cost of re-scraping on every lookup rather than serving a cached result.
ENGINEERING FOR SCALE AND RELIABILITY
Four decisions shaped how the scraper stays usable against sites that actively resist it.

Regex-based platform detection instead of a manual selector

main() in scrap_data.py parses the submitted URL to route to amazon_reviews() or flipkart_reviews() automatically, keeping the user-facing flow a single input field.

Separate scraping functions per platform

Amazon and Flipkart have unrelated HTML structures, so isolating amazon_reviews() and flipkart_reviews() means a selector change on one site is a contained fix, not a shared-code regression - as borne out when the Flipkart collector broke independently of the Amazon path.

Explicit CAPTCHA retry logic over silent failure

The Amazon path detects a CAPTCHA page and retries by closing and reopening the browser, falling back to a non-proxy browser, rather than surfacing an opaque error to the user.

Session-scoped data, not a persistent store

Extracted reviews live only for the current request and download cycle; no reviews or user-submitted URLs are written to a database, limiting the app's data-retention footprint by design.
DELIVERY APPROACH
The app was built outward from URL detection to the scraping logic to the export path.
1. Platform detection - building the regex-based routing in scrap_data.py that identifies Amazon vs. Flipkart from the submitted URL.
2. Browser configuration layer - building proxy_browser.py to configure Selenium with or without a proxy, and in headless mode, for scraping.
3. Platform-specific scrapers - building amazon_reviews() and flipkart_reviews(), each parsing its target site's HTML with BeautifulSoup, including CAPTCHA detection and retry handling on the Amazon path.
4. Flask app and export route - wiring app.py's search and CSV-download routes, and the CSV logging for contact-form submissions.
RESULTS AND IMPACT

Pfactorial_Case_Study_ReviewMaster image 4
- Key outcomes from this engagement.
The app successfully extracts structured reviews - product name, rating, title, description, and upvote count - from a single pasted Amazon product URL, with results available on-screen or as a CSV download; the Amazon collection path is confirmed working, while the Flipkart path currently needs rework after a site-side selector change.
Because platform detection, scraping, and CAPTCHA handling are isolated per platform, fixing or updating one collector, as the Flipkart path currently needs, doesn't require touching the Amazon path, which keeps the app's working functionality stable while the affected collector is reworked.

What it enabled commercially

The client has a working, resilient pattern for pulling structured review data out of e-commerce platforms that actively resist scraping, with a clear, isolated path to restore full Flipkart coverage and extend to further platforms without redesigning the app.
WHY PFACTORIAL
This engagement reflects Pfactorial's practice of building scraping systems that plan for the target fighting back - CAPTCHA handling, proxy support, and platform isolation designed in from the start, not bolted on after the first block.
Pfactorial_Case_Study_ReviewMaster image 5
- Service lines this engagement draws on.
Engagement enquiries Pfactorial Technologies works with organisations that need structured data pulled reliably from sites that don't want to be scraped. If you're scoping a data-extraction or competitive-research tool, we're happy to talk through what resilient collection actually takes. · pfactorial.ai
APPENDIX A - TECHNOLOGY STACK
The technology stack underpinning the system, grouped by the layer it serves.
Pfactorial_Case_Study_ReviewMaster image 6

Result and Analysis

ENGAGEMENT SNAPSHOT

How Pfactorial Technologies built a Flask app that turns a single Amazon or Flipkart product link into a structured, exportable review table, with built-in CAPTCHA handling.

Pfactorial_Case_Study_ReviewMaster image 1
Pfactorial_Case_Study_ReviewMaster image 2
Pfactorial_Case_Study_ReviewMaster image 3
Pfactorial_Case_Study_ReviewMaster image 4
Pfactorial_Case_Study_ReviewMaster image 5
Pfactorial_Case_Study_ReviewMaster image 6