Easy web scraping for Rotten Tomatoes movie reviews and info.
Why Rotten Tomatoes?
Rotten Tomatoes is the world's most trusted source for entertainment recommendations. They provide users with indications of fresh or rotten by aggreation of reviews from critics. Learn more about Rotten Tomatoes.
- One line scraper
- Critic review scraper
- Main info scraper
- Add code to get movie names from Wikipedia
Update secondary API functions to accept movie name instead of link- Check robots.txt for crawl rate in case of future addition
- Type hints
- Scrape user reviews
- Scrape Tomatometer and audience score in main info.
import tomatopy as rtp
# get main information and critic reivews for X2
main_info, reviews = rtp.scrape_movie_info('X2: X-Men United')
# just get main info
reivews = rtp.get_critic_reviews('https://www.rottentomatoes.com/m/x2_xmen_united')
# just get critic reviews
main_info = rtp.get_main_page_info('https://www.rottentomatoes.com/m/x2_xmen_united')
# change crawl rate to 1 second per request (default rate)
rtp.set_crawl_rate(1.0)
# get movie names from wikipedia [2008 in film] (https://en.wikipedia.org/wiki/2008_in_film)
names = rtp.scrape_movie_names(2008)