Title: | Download IMDB Series Information Into a Dataframe |
---|---|
Description: | Download movie and series information using the open movie database http://www.omdbapi.com and return tidy results. To pull relevant information from the API you have to get a key from the omdb website. |
Authors: | Roel M. Hogervorst [aut, cre] |
Maintainer: | Roel M. Hogervorst <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.2.0 |
Built: | 2025-03-02 03:03:35 UTC |
Source: | https://github.com/RMHogervorst/imdb |
This is a convenient function that writes your key to the .Renviron file that is read in at start. You dont have to give the key in, if you use keep the key NULL it will ask for it in the commandline (keeping it out of the logs and .history).
add_key_to_renviron(key = NULL, location = "~/.Renviron")
add_key_to_renviron(key = NULL, location = "~/.Renviron")
key |
keep NULL to search or add manualy |
location |
what file do you want to write to? defaults to ~/.Renviron |
Of course you can also go to the file and add it yourself. the file should have a line that reads: OMDB_KEY=key
where you replace your key with your key.
This function is not for direct use.
api_key(key = NULL)
api_key(key = NULL)
key |
"quoted" key or by default searches in .Renviron en Sys.setenv |
key
This function downloads episode information into a dataframe. Use it to create a dataframe with extra information about every epidode. it downloads runtime, director, writer, actors, plot and imdb votes.
enrichIMDB(df, key = NULL)
enrichIMDB(df, key = NULL)
df |
Name of dataframe you want to add info to. NEEDS an imdbID variable. |
key |
Enter your API key. If you don't have one yet, you can obtain one here: http://www.omdbapi.com/apikey.aspx |
## Not run: enrichIMDB("IMDB") ## End(Not run)
## Not run: enrichIMDB("IMDB") ## End(Not run)
Download information about a movie from imdb
imdbMovies(moviename, key = NULL)
imdbMovies(moviename, key = NULL)
moviename |
Type the name of the movie |
key |
Enter your API key. If you don't have one yet, you can obtain one here: http://www.omdbapi.com/apikey.aspx |
This function downloads series information into a dataframe.
imdbSeries(seriesname, seasons = 1, key = NULL)
imdbSeries(seriesname, seasons = 1, key = NULL)
seriesname |
Give the name of the series for example "House MD" |
seasons |
Information about hat seasons do you want to download? Defaults to 1. |
key |
Enter your API key. If you don't have one yet, you can obtain one here: http://www.omdbapi.com/apikey.aspx |
## Not run: imdbSeries("House MD", 1:2) ## End(Not run)
## Not run: imdbSeries("House MD", 1:2) ## End(Not run)
Download information about a title from imdb by imdb ID
imdbTitleId(titleid, key = NULL)
imdbTitleId(titleid, key = NULL)
titleid |
The id, f.i.: "tt0120382" |
key |
Enter your API key. If you don't have one yet, you can obtain one here: http://www.omdbapi.com/apikey.aspx |
It has come to my attention that the use of the omdbapi might violate the terms of service that imdb has set up. According to http://www.imdb.com/conditions scraping is forbidden. I did not scrape IMDB but since we are using the omdb-api, we sort of violate the terms of service indirectly. This is just a heads up.
ToS_message()
ToS_message()
If you would like to stop this message, add a line to your .Renviron file: IMDBTOGGLE = "off". If you do I presume you have read the message.