Skip to content

MacPal2002/opinionFetch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpinionFetch

A CLI scraper for collecting product reviews from Ceneo and Amazon.pl using Puppeteer.

The tool lets you:

  • choose a source (Ceneo or Amazon),
  • provide a product ID,
  • set how many reviews to collect,
  • export results as one JSON file or many TXT files.

Requirements

  • Node.js 18+ (recommended)
  • npm
  • Internet connection

Installation

npm install

Usage

Run:

node index.js

Then follow CLI prompts:

  1. Select service (Ceneo / Amazon)
  2. Enter product ID (e.g. B0D3658SHD or 163090037)
  3. Choose number of reviews to collect
  4. Choose output format

Output

Generated files are saved in:

  • reviews/ceneo/ for Ceneo
  • reviews/amazon/ for Amazon

1) Single JSON file

File name pattern:

  • data_<PRODUCT_ID>.json

Structure:

{
  "productId": "...",
  "productName": "...",
  "engine": "Ceneo or Amazon",
  "scrapedAt": "ISO date",
  "totalReviews": 50,
  "reviews": [
    {
      "score": "0.800",
      "sentiment": "P",
      "content": "Review text"
    }
  ]
}

2) Multiple TXT files

One file per review, named like:

  • <PRODUCT_NAME>_<SCORE>_<SENTIMENT>_<INDEX>.txt

Where:

  • SCORE is normalized to 0.000 - 1.000
  • SENTIMENT is:
    • P (positive)
    • N (negative)

Notes

  • The Amazon flow intentionally waits for manual user interaction ([WAITING...]) after opening the review page. This helps handle anti-bot checks or login/captcha screens before scraping continues.
  • If no more pages/reviews are available, scraping stops early.
  • Website layout changes may require selector updates in index.js.

Tech Stack

  • puppeteer
  • puppeteer-extra
  • puppeteer-extra-plugin-stealth
  • inquirer
  • chalk

Disclaimer

This tool is for educational purposes only. Web scraping may violate the Terms of Service of the target websites.

About

A CLI scraper for collecting product reviews from Ceneo and Amazon.pl using Puppeteer.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors