Skip to main content

trustpilot-scraper is a Python package designed for scraping Trustpilot reviews. It provides functions to retrieve Trustpilot reviews from a given Trustpilot page URL.

Installation

You can install trustpilot-scraper via pip:

pip install trustpilot-scraper

Usage

To use trustpilot-scraper, import the scrape_trustpilot_reviews function from the trustpilot_scraper.scraper module. Then, provide the base URL of the Trustpilot page from which you want to scrape reviews.

from trustpilot_scraper.scraper import scrape_trustpilot_reviews

base_url = 'https://www.trustpilot.com/review/example.com'

reviews = scrape_trustpilot_reviews(base_url)

for review in reviews:
    print(review)

Output

The scrape_trustpilot_reviews function returns a list of dictionaries, where each dictionary represents a single Trustpilot review. Each review dictionary contains the following keys: ‘Date’, ‘Author’, ‘Body’, ‘Heading’, ‘Rating’, and ‘Location’.

Features

  • Scrapes Trustpilot reviews from the provided base URL.

  • Retrieves review data including date, author, body, heading, rating, and location.

  • Handles pagination automatically to scrape all available reviews.

Dependencies

  • requests: For making HTTP requests.

  • beautifulsoup4: For parsing HTML content.

  • pandas: For data manipulation.

For more information and documentation, please visit the GitHub repository: https://github.com/irfanalidv/trustpilot_scraper.

Metadata

Release files for trustpilot-scraper 0.10

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for trustpilot-scraper 0.10
File Interpreter ABI Platform
trustpilot_scraper-0.10-py3-none-any.whl Python 3 none any Details

Release files / trustpilot_scraper-0.10-py3-none-any.whl

Download URL trustpilot_scraper-0.10-py3-none-any.whl
Size 2.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f916303b99a675e250d4fbfc1cfa704c2c0b51dc3a5d7f3ef35ce5581c9ad168
BLAKE2b-256 checksum
How to use checksums
01cf5e203da30fb9ae6de81ff03c34190d208e4a778e4cb027b253598a9c7531
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.11.7

Release history Release notifications | RSS feed

This release

0.10 This release

1 release file

0.9

1 release file

0.8

1 release file

0.5

1 release file

0.4

1 release file

0.3

1 release file

0.2

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page