Scrapes Rotten Tomatoes's website for basic information on movies.
Project description
Rotten Tomatoes in Python
This package is for easily getting Rotten Tomatoes scores and other data on movies, without the use of their API. The package scrapes their website for the data. Unfortunately, to get access to their API you have to submit a special request which takes an inordinate amount of time to process, or doesn't go through at all.
You can either call the standalone functions tomatometer
, audience_score
, genres
, etc., or use the Movie
class to only pass the name and have each attribute be fetched automatically. If you use the Movie
class, you can print all attributes by printing the object itself, or by accessing each attribute individually.
The weighted score is calculated using the formula $\frac{2}{3}(tomatometer) + \frac{1}{3}(audience_{score})$. The result is then rounded to the nearest integer.
Basic usage:
import rottentomatoes_python as rt
print(rt.tomatometer("happy gilmore"))
# Output: 61
print(rt.audience_score('top gun maverick'))
# Output: 99
print(rt.weighted_score('happy gilmore'))
# Output: 69
# --- Using the Movie class ---
movie = rt.Movie('top gun')
print(movie)
# Output: Top Gun. Tomatometer: 58. Audience Score: 83. Genres - ['Action', 'Adventure']. Weighted score: 66.
print(movie.weighted_score)
# Output: 66
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for rottentomatoes-python-0.1.5.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 60acab9b0121800c06847f261bc02438da4eaf214335dc4848ef87a908dc5582 |
|
MD5 | a6807c43fa899cf3534926b4f535ebb4 |
|
BLAKE2b-256 | c6c080f07c33d82df40c91556306ff359a6ce4e8e75881f3fdc60519b07231ee |
Hashes for rottentomatoes_python-0.1.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9dc430149885249a4be87f0504f7fb1897e167459154f104130b9078935d895f |
|
MD5 | f2e9b500c89e75b76a29b22630b009c7 |
|
BLAKE2b-256 | 1706ba1b9b57c1737e63a9e702e7e54d3df87fb62450df4d890ca98f88f0d898 |