Parse IMDb and TMDb api/datafiles to generate a collection of movie quotes with backdrop images. Basis for freecodecamp's Random Quote Machine zipline
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Screenshot of final app

IMDb and TMDb quotes and movie backdrop parser

Parse IMDb and TMDb data to generate a collection of movie quotes with backdrop images. Basis for my contribution to Freecodecamp's Random Quote Machine Zipline.

To run, first issue

npm install

to install all dependencies.

The following two files need to be in the same directory

IMDb data files


Can be obtained from

Then issue the script using:

node moviequotes.js -a apikey [-n] [-m] [-q] [-l] [-d]
  -a API key for TMDb, required
  -n num Number of movies to process, max. 250, default: 250
  -m num Maximum string length of movie quote, default: 100
  -q num Maximum number of quotes per movie, default: 10
  -l num Row in ratings.list.gz, where top250 movie list begins, default: 27
  -d num dely in ms for access to themoviedb api, default: 100

The script writes the resulting JSON file into output.json into the current directory.

Demo of output.json

    "title": "The Dark Knight (2008)",
    "tmdbid": 155,
    "backdrop_path": "/nnMC0BM6XbjIIrT4miYmMtPGcQV.jpg",
    "poster_path": "/1hRoyzDtpgMU7Dz4JF22RANzQO7.jpg",
    "quotes": [
      "The Joker: We made it!",
      "Cop Heckler: No more dead cops!",
      "Two-Face: IT'S ABOUT WHAT'S FAIR.",
      "The Joker: And... here... we... go!",
      "The Joker: You'll see. I'll show you.",
      "[repeated line]\nThe Joker: Why so serious?"
    "title": "The Godfather (1972)",
    "tmdbid": 238,
    "backdrop_path": "/6xKCYgH16UuwEGAyroLU6p8HLIn.jpg",
    "poster_path": "/d4KNaTrltq6bpkFS01pYtyXa09m.jpg",
    "quotes": [
      "Sonny: Goddamn FBI don't respect nothin'.",
      "Clemenza: Paulie, pull over, I gotta take a leak.",
      "Calo: In Sicily, women are more dangerous than shotguns.",
      "Sonny: How's Paulie?\nClemenza: Oh, Paulie... won't see him no more."