Main functionality

fakepilot.extract_info(source, with_reviews=False, nreviews=5)[source]

Return the information of a company page.

Parameters:
  • source (file-like) – Company’s page of Trustpilot.

  • with_reviews (bool, optional) – Indicates whether the company’s reviews are extracted.

  • nreviews (int, optional) – Number of reviews to be extracted. Ignored if with_reviews is False.

Returns:

Company’s information

Return type:

dict(str, )

fakepilot.get_reviews(company_page, nreviews)[source]

Get the reviews’ data included in a company’s Trustpilot page.

The number of extracted reviews is the minimum of nreviews and the number of reviews in the company’s page.

Parameters:
  • company_page (bs4.Tag) – HTML company’s page where the reviews are extracted from.

  • nreviews (int) – Number of reviews to be extracted.

Returns:

Reviews of a company.

Return type:

list(dict(str,))