Collects data from movies using the OMDb API and TMDB API.
To use this script, it is necessary to configure the environment variables in the .env
. To do this, follow the steps below:
-
Open the
.env
file and fill in the environment variables with their values:OMDb_API_KEY="your_api_key" TMDB_API_KEY="your_api_key"
Open a terminal in the server folder and run the following command:
npm codar_movies
Data is saved in a csv or json file.
The script is configured to collect data from approximately 100 movies, but you can change this value by changing the MAX_PAGES
constant in the requester.py
file. One page contains approximately 19 movies.
The script is configured to collect data from the most popular movies, but you can change this value by changing the list_type
parameter in the get_tmdb_movies
function in the requester.py
file. Possible values are:
POPULAR
- Popular moviesTOP_RATED
- Top rated moviesUPCOMING
- Upcoming movies