Skip to content

phoenixsite/fakepilot

Repository files navigation

CI

Trustpilot scrapping Python package. Extract online business reviews and integrate it on your code. It is based on BeautifulSoup.

Features

  • Extract the information of a company from a Trustpilot page.
  • Obtain its reviews with a fine-grained detail.
  • The output data is structured in a simple dictionary.
  • Support for Trustpilot pages with different HTML structure.

IMPORTANT: fakepilot now doesn't fetch the web pages from Trustpilot. This must be done by the user of the package.

Usage

The main function is extract_info. You can pass a file containing a Trustpilot HTML page of a company and it returns information, like number of reviews, phone number or address. Also, you can specify if you want some of the company's reviews to be extracted.

import fakepilot as fp
fp.extract_info("tests/data/burgerking.no.html")
fp.extract_info("tests/data/burgerking.no.html", with_reviews=True, 2)

Installation

fakepilot is available on PyPI. You can install it with

python -m pip install fakepilot

To install fakepilot from the GitHub source, clone the repository with git:

git clone https://github.com/phoenixsite/fakepilot.git

Then, change your current directory to the one you cloned and install it with pip:

cd fakepilot
python -m pip install .

Documentation

For a detail description of all the options you can visit the fakepilot's documentation or you can build yourself in docs with Sphinx:

cd docs
python -m pip install -r requirements.txt
make html