Giter Site home page Giter Site logo

omdb_scraper's Introduction

OMDB Scraper

This is a small script to scrape movies from OMDB in a normalized format. It takes as an input either a JSON file with an array of titles or a JSON file with an array of IMDB ids. As an output you get a JSON file with all the data OMDB returns for all the titles or ids in the input file, including full plot.

Usage

Create an .env file in your project with the following content:

API_KEY=your_omdb_api_key

Afterwards run these commands:

# First time only
npm install

# Then Every time
npm start -- -f titles.json -t title -o db.json

Remember to replace titles.json with the path to your json input file.

Options

-f/--file - Input json file holding a valid array of either titles or imdb ids

-t/--type - Should be either title or imdb depending on the input file content

-o/--out - The output file

-h/--help - Display all options with descriptions

Useful

A short script to snatch titles off of IMDB result pages (configure this one for top 1000 for example):

const titles = Array.from(document.querySelectorAll('.lister-item-header'), header => header.querySelector('a').innerText);

omdb_scraper's People

Watchers

James Cloos avatar Paul Negoescu avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.