Metadata-Version: 2.1
Name: trustpilot-scraper
Version: 0.9
Summary: A Python library for scraping Trustpilot reviews.
Home-page: https://github.com/irfanalidv/trustpilot_scraper
Author: Md Irfan Ali
Author-email: irfanali29@hotmail.com
License: MIT
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
License-File: LICENSE
Requires-Dist: requests
Requires-Dist: beautifulsoup4
Requires-Dist: pandas


trustpilot-scraper
===================

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:

.. code-block:: bash

    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.

.. code-block:: python

    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.

    
