Skip to content

Commit

Permalink
update trustpilot reviews API URL
Browse files Browse the repository at this point in the history
  • Loading branch information
mazen-r committed Dec 18, 2023
1 parent 5d90d0c commit e1156f1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion trustpilot-scraper/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ async def run():
reviews_data = await trustpilot.scrape_reviews(
# the reviews API, you can get this API by inspecting the Network activities in the browser and clicking on the next review pages
# you can also customize review filters by applying them on the page and they will e reflected on the API
url="https://www.trustpilot.com/_next/data/businessunitprofile-consumersite-8242/review/www.bhphotovideo.com.json?sort=recency&businessUnit=www.bhphotovideo.com",
url="https://www.trustpilot.com/_next/data/businessunitprofile-consumersite-2.15.0/review/www.bhphotovideo.com.json?sort=recency&businessUnit=www.bhphotovideo.com",
max_pages=3,
)
with open(output.joinpath("reviews.json"), "w", encoding="utf-8") as file:
Expand Down
2 changes: 1 addition & 1 deletion trustpilot-scraper/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ async def test_search_scraping():
@pytest.mark.asyncio
async def test_review_scraping():
reviews_data = await trustpilot.scrape_reviews(
url="https://www.trustpilot.com/_next/data/businessunitprofile-consumersite-8242/review/www.bhphotovideo.com.json?sort=recency&businessUnit=www.bhphotovideo.com",
url="https://www.trustpilot.com/_next/data/businessunitprofile-consumersite-2.15.0/review/www.bhphotovideo.com.json?sort=recency&businessUnit=www.bhphotovideo.com",
max_pages=3,
)
validator = Validator(review_schema, allow_unknown=True)
Expand Down

0 comments on commit e1156f1

Please sign in to comment.