get_details | R Documentation |
This function retrieves movie metadata (title, actors, year, genres, etc.) using the OMDb API http://www.omdbapi.com/. Results are exported in a YAML file and returned as a data frame. See details below for further informations.
get_details(imdb_id, path = "./details", print = TRUE)
imdb_id |
The IMDb ID of the movie. |
path |
The folder to store results. |
print |
A boolean. If TRUE (default), movie informations are printed. |
An (free) API key is required to use the OMDb API. You can register on http://www.omdbapi.com/. When using this package for the first time, you'll be asked for setting your own API key (just follow instructions).
The request is performed using the IMDb identifier of the movie. To find this
ID you can use the function find_imdb_id()
.
If you can't retrieve the IMDb ID, visit the IMDb website (https://www.imdb.com) and get this ID from the movie URL. It is always in the form: tt9999999 (only numbers are specific to the movie; the prefix 'tt' is a constant).
For instance, in this URL: https://www.imdb.com/title/tt5699154/, the IMDb ID is 'tt5699154'.
For non-English movies, the English name might be different from the original title. For instance, the English title of the french movie "Le Sens de la fĂȘte" (2017) is "C'est la vie!" (IMDb ID = tt5699154).
Only movies are currently implemented.
A data frame with:
imdbid: the IMDb ID of the movie
type: the category (e.g. movie)
title: the movie title
year: the year of release
runtime: the movie runtime (in minutes)
director: a vector of directors
writer: a vector of writers
actors: a vector of main actors
genre: a vector of genres
plot: a short plot of the movie
language: a vector of spoken languages
country: a vector of the countries
imdbrating: the IMDb rating (in date of the request)
slug: a unique identifier (titre + year)
## Not run:
x <- get_details("tt0120863", path = ".", print = TRUE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.