A command-line tool that takes a TripAdvisor hotel search URL (for example, all hotels in Casablanca) and saves every review with its rating into a CSV file, ready for analysis or for training a sentiment model.
How I built it
The script fetches pages with Requests and parses them with BeautifulSoup: first the list of hotels, then each hotel’s review pages. Reviews and ratings are saved to a CSV file. Usage is a single command: python scraper.py <url> <filename>.