Coder Social home page Coder Social logo

imdb_scraper's Introduction

IMDb scraper in python

Requirements:

Install with: python -m pip install requests beautifulsoup4 rich

Examples:

There are 3 examples that show basic usage of the scraper.

  • search_movie.py - searches IMDb for a movie
  • top250_movies.py - scrapes the top 250 movies
  • show_movie_details.py - scrapes the full details of a movie

imdb_scraper.get_top_250_movies()

Returns list of top 250 movies

  • Return type

    list[Movie]

imdb_scraper.search(query, n=10, titles=True, actors=True)

Searches imdb for movies/actors matching query.

  • Parameters

    • query (str) – string to search for

    • n (int) – number of results to return

    • titles (bool) – whether to search for titles

    • actors (bool) – whether to search for actors

  • Return type

    dict[str, list]

  • Returns

    dict of lists of Movie/Actor objects

class imdb_scraper.Movie(movie_id, load_credits=False)

Bases: imdb_scraper.Base

_init_(movie_id, load_credits=False)

Class holding information about movie. If you want to load credits, set load_credits to True or load them manually with Movie.read_fullcredits()

  • Parameters

    • movie_id – id of movie (e.g. “tt0111161”)

    • load_credits (bool) – if True, credits will be loaded from site (default: False)

load()

Call this if you want to manually load data from site

class imdb_scraper.Actor(actor_id)

Bases: imdb_scraper.Base

_init_(actor_id)

load()

Call this if you want to manually load data from site

imdb_scraper's People

Contributors

szymon-romanko avatar

Watchers

 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.