GithubHelp home page GithubHelp logo

optionalg / imdbpy Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cinemagoer/cinemagoer

0.0 2.0 0.0 3.82 MB

IMDbPY is a Python package useful to retrieve and manage the data of the IMDb movie database about movies, people, characters and companies. This is a git clone of the official Mercurial repository.

Home Page: http://imdbpy.sf.net/

Python 99.10% C 0.90%

imdbpy's Introduction

  IMDbPY for (too) sensitive people
  =================================

Since version 2.0 (shame on me!  I've noticed this only after more
than a year of development!!!) by default adult movies are included
in the result of the search_movie(), search_episode() and search_person()
methods.

If for some unintelligible reason you don't want classics
like "Debbie Does Dallas" to show up in your list of results,
you can disable this feature initializing the IMDb class with
the 'adultSearch' argument set to 0 (or other "False" value).

E.g.:
    from imdb import IMDb
    ia = IMDb(accessSystem='http', adultSearch=0)


The behavior of a IMDb class's instance can be modified at
runtime, calling the do_adult_search() method.

E.g.:
    from imdb import IMDb

    # By default in the horny-mode.
    ia = IMDb(accessSystem='http')

    # Just for this example, be sure to exclude the proxy.
    ia.set_proxy(None)

    results = ia.search_movie('debby does dallas', results=5)
    for movie in results:
        print movie['long imdb title'], movie.movieID
    # It will print:
    # Debbie Does Dallas (1978) 0077415
    # Debbie Does Dallas Part II (1981) 0083807
    # Debbie Does Dallas: The Next Generation (1997) (V) 0160174
    # Debbie Does Dallas '99 (1999) (V) 0233539
    # Debbie Does Dallas 3 (1985) 0124352

    # You can now revert to the old puritan behavior.
    ia.do_adult_search(0)

    results = ia.search_movie('debby does dallas', results=5)
    for movie in results:
       print movie['long imdb title'], movie.movieID
    # It will print only:
    # Pauly Does Dallas (1993) (TV) 0208347


The do_adult_search() method of the http and mobile data access system
also takes another couple of arguments: "cookie_id" and "cookie_uu", so
that you can select _your own_ IMDb's account; if cookie_id is set to
None, no cookies are sent.  These parameters can also be set in
the imdbpy.cfg configuration file.
For the strings to use, see your "cookie" or "cookie.txt" file.
Obviously you need to activate the "adult movies" option for
your account; see http://imdb.com/find/preferences?_adult=1


  OTHER DATA ACCESS SYSTEMS
  =========================

Since version 2.2 every other data access system (sql)
support the same behavior of the http and mobile data access
systems (i.e.: you can set the 'adultSearch' argument and use
the 'do_adult_search' method).

Notice that for the sql data access system only results from the
search_movie() and search_episode() methods are filtered: there's no
easy (and fast) way to tell that an actor/actress is a porn-star.


imdbpy's People

Contributors

alberanid avatar kostko avatar

Watchers

 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.