IMDbPY is a Python package useful to retrieve and manage the data of the IMDb movie database about movies, people, characters and companies

Overview

PyPI version. Supported Python versions. Project license. Travis CI build status.

IMDbPY is a Python package for retrieving and managing the data of the IMDb movie database about movies, people and companies.

Revamp notice

Starting on November 2017, many things were improved and simplified:

  • moved the package to Python 3 (compatible with Python 2.7)
  • removed dependencies: SQLObject, C compiler, BeautifulSoup
  • removed the "mobile" and "httpThin" parsers
  • introduced a test suite (please help with it!)

Main features

  • written in Python 3 (compatible with Python 2.7)
  • platform-independent
  • can retrieve data from both the IMDb's web server, or a local copy of the database
  • simple and complete API
  • released under the terms of the GPL 2 license

IMDbPY powers many other software and has been used in various research papers. Curious about that?

Installation

Whenever possible, please use the latest version from the repository:

pip install git+https://github.com/alberanid/imdbpy

But if you want, you can also install the latest release from PyPI:

pip install imdbpy

Example

Here's an example that demonstrates how to use IMDbPY:

from imdb import IMDb

# create an instance of the IMDb class
ia = IMDb()

# get a movie
movie = ia.get_movie('0133093')

# print the names of the directors of the movie
print('Directors:')
for director in movie['directors']:
    print(director['name'])

# print the genres of the movie
print('Genres:')
for genre in movie['genres']:
    print(genre)

# search for a person name
people = ia.search_person('Mel Gibson')
for person in people:
   print(person.personID, person['name'])

Getting help

Please refer to the support page on the project homepage and to the the online documentation on Read The Docs.

The sources are available on GitHub.

License

Copyright (C) 2004-2019 Davide Alberani <da --> mimante.net> et al.

IMDbPY is released under the GPL license, version 2 or later. Read the included LICENSE.txt file for details.

NOTE: For a list of persons who share the copyright over specific portions of code, see the CONTRIBUTORS.txt file.

NOTE: See also the recommendations in the DISCLAIMER.txt file.

Comments
  • IMDb redesign broke most of the parsers on Dec. 19, 2017

    IMDb redesign broke most of the parsers on Dec. 19, 2017

    Issue description

    For the past couple of days, fetching information with imdpy is broken. For example, using the doc example of fetching data for "The Untouchables" yields a title of 'The leading information resource for the entertainment industry'

    Version of IMDbPY, Python and OS

    • Python: Python 3.6.4
    • IMDbPY: 6.2
    • OS: uname_result(system='Darwin', node='arioso', release='15.6.0', version='Darwin Kernel Version 15.6.0: Mon Nov 13 21:58:35 PST 2017; root:xnu-3248.72.11~1/RELEASE_X86_64', machine='x86_64', processor='i386')

    Steps to reproduce the issue

    >>> import imdb
    >>> ia = imdb.IMDb()
    >>> s_result = ia.search_movie("The Untouchables")
    >>> the_unt = s_result[0]
    >>> ia.update(the_unt)
    >>> the_unt['runtime']
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "/usr/local/lib/python3.6/site-packages/imdb/utils.py", line 1480, in __getitem__
        rawData = self.data[key]
    KeyError: 'runtimes'
    >>> the_unt['rating']
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "/usr/local/lib/python3.6/site-packages/imdb/utils.py", line 1480, in __getitem__
        rawData = self.data[key]
    KeyError: 'rating'
    >>> the_unt['title']
    'The leading information resource for the entertainment industry'
    >>> the_unt.keys()
    ['title', 'kind', 'year', 'akas', 'plot', 'canonical title', 'long imdb title', 'long imdb canonical title', 'smart canonical title', 'smart long imdb canonical title']
    >>> the_unt['kind']
    'movie'
    >>> the_unt['year']
    2017
    >>> the_unt['akas']
    ['The Untouchables']
    >>> the_unt['plot']
    ["A comedic look at the relationship between a wealthy paraplegic and an unemployed man with a criminal record who's hired to help him."]
    >>> the_unt['canonical title']
    'leading information resource for the entertainment industry, The'
    >>> the_unt['long imdb title']
    'The leading information resource for the entertainment industry (2017)'
    

    What's the expected result?

    • real movie data

    What's the actual result?

    • random marketing strings for imdb.com, or missing key errors of internal data

    Additional details

    bug http help needed 
    opened by itsayellow 27
  • Website redesign

    Website redesign

    Hi everyone!

    I don't know where tickets related to the website should go, so I'm writing this here, apologies if it's the wrong place.

    I am currently attending a UI design course and, as an exercise, I decided to redesign the current website. I thought it needed a fresh new look, so here it is: please comment, leave your feedback and thoughts.

    Thank you!

    Web 1280 – 1 Web 1280 – 2 Web 1280 – 3 Web 1280 – 4 Web 1280 – 5

    opened by albemala 21
  • More flaky tests

    More flaky tests

    Issue description

    Currently, during python3.7 rebuilds for Arch Linux, I see more broken tests

    Version of IMDbPY, Python and OS

    • Python: 3.7
    • IMDbPY: 6.5
    • OS: Arch Linux

    Steps to reproduce the issue

    python setup.py build
    export PYTHONPATH=${srcdir}/${pkgname}-${pkgver}/build:${PYTHONPATH}
    py.test
    

    What's the expected result?

    • All tests succeed

    What's the actual result?

    • Some tests fail.

    Additional details

    ============================= test session starts ==============================
    platform linux -- Python 3.7.0, pytest-3.6.3, py-1.5.4, pluggy-0.6.0
    rootdir: /build/python-imdbpy/src/python-imdbpy-6.5, inifile:
    plugins: cov-2.5.1
    collected 157 items
    
    tests/test_http_chart_bottom.py ...                                      [  1%]
    tests/test_http_chart_top.py .....                                       [  5%]
    tests/test_http_company_main.py .                                        [  5%]
    tests/test_http_gather_refs.py .                                         [  6%]
    tests/test_http_movie_combined.py ..............ss..............ss...... [ 30%]
    ....................ss............................                       [ 62%]
    tests/test_http_movie_keywords.py ..                                     [ 63%]
    tests/test_http_movie_plot.py ...                                        [ 65%]
    tests/test_http_movie_reviews.py .                                       [ 66%]
    tests/test_http_movie_sites.py .                                         [ 66%]
    tests/test_http_movie_taglines.py F..                                    [ 68%]
    tests/test_http_movie_votes.py ....F.                                    [ 72%]
    tests/test_http_person_bio.py ..F.F.........F...                         [ 84%]
    tests/test_http_person_main.py ......                                    [ 87%]
    tests/test_http_person_otherworks.py ...                                 [ 89%]
    tests/test_http_search_company.py .                                      [ 90%]
    tests/test_http_search_keyword.py ....                                   [ 92%]
    tests/test_http_search_movie.py .F.....                                  [ 97%]
    tests/test_http_search_movie_keyword.py ...                              [ 99%]
    tests/test_http_search_person.py .                                       [100%]
    
    =================================== FAILURES ===================================
    ____________ test_movie_taglines_single_should_be_a_list_of_phrases ____________
    
    movie_taglines = <function movie_taglines.<locals>.retrieve at 0x7f4469627f28>
    
        def test_movie_taglines_single_should_be_a_list_of_phrases(movie_taglines):
            page = movie_taglines('if....')
            data = parser.parse(page)['data']
    >       assert data['taglines'] == ['Which side will you be on?']
    E       assert ['Which side ...ilm Festival'] == ['Which side will you be on?']
    E         Left contains more items, first extra item: 'Winner "Best Film" Cannes Film Festival'
    E         Use -v to get the full diff
    
    tests/test_http_movie_taglines.py:21: AssertionError
    _________________ test_movie_ratings_demographics_should_be_19 _________________
    
    movie_ratings = <function movie_ratings.<locals>.retrieve at 0x7f4469627510>
    
        def test_movie_ratings_demographics_should_be_19(movie_ratings):
            page = movie_ratings('matrix')
            data = parser.parse(page)['data']
    >       assert len(data['demographics']) == 19
    E       AssertionError: assert 18 == 19
    E        +  where 18 = len({'aged 18 29': {'rating': 8.6, 'votes': 391694}, 'aged 30 44': {'rating': 8.8, 'votes': 529555}, 'aged 45 plus': {'rating': 8.5, 'votes': 113536}, 'aged under 18': {'rating': 8.4, 'votes': 2120}, ...})
    
    tests/test_http_movie_votes.py:45: AssertionError
    ___________________ test_birth_date_should_be_in_ymd_format ____________________
    
    person_bio = <function person_bio.<locals>.retrieve at 0x7f446975dd90>
    
        def test_birth_date_should_be_in_ymd_format(person_bio):
            page = person_bio('fred astaire')
            data = parser.parse(page)['data']
    >       assert data['birth date'] == '1899-5-10'
    E       KeyError: 'birth date'
    
    tests/test_http_person_bio.py:35: KeyError
    ___________________ test_death_date_should_be_in_ymd_format ____________________
    
    person_bio = <function person_bio.<locals>.retrieve at 0x7f446975dd90>
    
        def test_death_date_should_be_in_ymd_format(person_bio):
            page = person_bio('fred astaire')
            data = parser.parse(page)['data']
    >       assert data['death date'] == '1987-6-22'
    E       KeyError: 'death date'
    
    tests/test_http_person_bio.py:47: KeyError
    _______________________ test_trade_mark_should_be_a_list _______________________
    
    person_bio = <function person_bio.<locals>.retrieve at 0x7f446975dd90>
    
        def test_trade_mark_should_be_a_list(person_bio):
            page = person_bio('julia roberts')
            data = parser.parse(page)['data']
    >       assert len(data['trade mark']) == 2
    E       AssertionError: assert 3 == 2
    E        +  where 3 = len(['Her bright smile', 'Gentle voice', 'Her mole.'])
    
    tests/test_http_person_bio.py:107: AssertionError
    ________ test_found_many_result_should_contain_correct_number_of_movies ________
    
    search_movie = <function search_movie.<locals>.retrieve at 0x7f44695ff730>
    
        @mark.fragile
        def test_found_many_result_should_contain_correct_number_of_movies(search_movie):
            page = search_movie('ace in the hole')
            data = parser.parse(page)['data']
    >       assert 185 < len(data) < 200
    E       AssertionError: assert 200 < 200
    E        +  where 200 = len([('0043338', {'kind': 'movie', 'title': 'Ace in the Hole', 'year': 1951}), ('1441232', {'kind': 'tv movie', 'title': '...tle': 'Ace in the Hole', 'year': 2015}), ('0149583', {'kind': 'short', 'title': 'Ace in the Hole', 'year': 1942}), ...])
    
    tests/test_http_search_movie.py:30: AssertionError
    ============== 6 failed, 145 passed, 6 skipped in 107.08 seconds ===============
    
    
    opened by dvzrv 16
  • Fix og_title matching - empty dict for kinds other than movie

    Fix og_title matching - empty dict for kinds other than movie

    Previous regexp didn't match TV series (and probably other kinds).

    Sample og_tilte values

    Agents of S.H.I.E.L.D. (TV Series 2013– )
    Lost (TV 2004–2010)
    The Matrix (1999)
    

    Related to #103

    Before

    In [7]: ia.get_movie('2364582')
    Out[7]: <Movie id:2364582[http] title:_None_>
    

    After

    In [3]: ia.get_movie('2364582')
    Out[3]: <Movie id:2364582[http] title:_"Agents of S.H.I.E.L.D." (2013)_>
    

    Parsed title

    In [6]: analyze_og_title(u'Agents of S.H.I.E.L.D. (TV Series 2013– )')
    Out[6]: 
    {'kind': u'tv series',
     'series years': u'',
     'title': u'Agents of S.H.I.E.L.D.',
     'year': 2013}
    
    In [7]: analyze_og_title(u'Lost (TV Series 2004–2010)')
    Out[7]: {'kind': u'tv series', 'series years': u'2010', 'title': u'Lost', 'year': 2004}
    
    In [8]: analyze_og_title(u'The Matrix (1999)')
    Out[8]: {'kind': 'movie', 'title': u'The Matrix', 'year': 1999}
    
    opened by jsynowiec 16
  • SSL: CERTIFICATE_VERIFY_FAILED certificate verify failed (_ssl.c:833)

    SSL: CERTIFICATE_VERIFY_FAILED certificate verify failed (_ssl.c:833)

    Issue description

    First time trying the example sample code and receiving this error.

    Version of IMDbPY, Python and OS

    • Python: Python 3.6.5
    • IMDbPY: 6.5
    • OS: ('Darwin', 'MacBook-Pro-de-Tiago.local', '17.6.0', 'Darwin Kernel Version 17.6.0: Tue May 8 15:22:16 PDT 2018; root:xnu-4570.61.1~1/RELEASE_X86_64', 'x86_64', 'i386')

    Steps to reproduce the issue

    if possible, provide a minimal code to reproduce the problem

    from imdb import IMDb
    
    # create an instance of the IMDb class
    ia = IMDb()
    
    # get a movie
    movie = ia.get_movie('0133093')
    print(movie)
    

    What's the expected result?

    Not sure, exactly.. movie info?! First time..

    What's the actual result?

    Traceback (most recent call last):
      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/imdb/__init__.py", line 706, in update
        ret = method(mopID)
      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/imdb/parser/http/__init__.py", line 425, in get_movie_plot
        cont = self._retrieve(self.urls['movie_main'] % movieID + 'plotsummary')
      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/imdb/parser/http/__init__.py", line 379, in _retrieve
        ret = self.urlOpener.retrieve_unicode(url, size=size)
      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/imdb/parser/http/__init__.py", line 208, in retrieve_unicode
        'original exception': e}
    imdb._exceptions.IMDbDataAccessError: {'errcode': 'socket error', 'errmsg': '[Errno socket error] [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:833)', 'url': 'http://www.imdb.com/title/tt0133093/plotsummary', 'proxy': '', 'exception type': 'IOError', 'original exception': OSError('socket error', OSError('socket error', SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:833)')))}
    

    Additional details

    opened by tiagoaquinofl 13
  • imdbpy2sql.py never completes (OS X 10.7.5 Lion)

    imdbpy2sql.py never completes (OS X 10.7.5 Lion)

    I've tried to run imdbpy2sql.py three times now and each time it gets to the stage "adding foreign keys" and stalls. I left it running for more than 24 hours then gave up. Running it again I can see it get to around 47/48 minutes CPU time in Activity Monitor (which is like a GUI version of the top command) then nothing happens. There's no disk activity and the memory usage is zero.

    I set the computer never to sleep and ran the command through nohup in case that was a factor but the same thing happened.

    As it's done most of the work except for the foreign keys, is there a way I can re-run it, skipping everything else and just doing the foreign keys?

    opened by ambrosechapel 13
  • SSL handshake failure

    SSL handshake failure

    Issue description

    write the description here

    There appears to be some sort of requests handshake issue:

    All matching attempt leads to this:

    Traceback (most recent call last): File "/usr/local/lib/python3.6/site-packages/IMDbPY-6.6.dev20180501-py3.6.egg/imdb/parser/http/init.py", line 183, in retrieve_unicode uopener = self.open(url) File "/usr/local/lib/python3.6/urllib/request.py", line 1763, in open raise OSError('socket error', msg).with_traceback(sys.exc_info()[2]) File "/usr/local/lib/python3.6/urllib/request.py", line 1757, in open return getattr(self, name)(url) File "/usr/local/lib/python3.6/urllib/request.py", line 1936, in open_http return self._open_generic_http(http.client.HTTPConnection, url, data) File "/usr/local/lib/python3.6/urllib/request.py", line 1932, in _open_generic_http response.status, response.reason, response.msg, data) File "/usr/local/lib/python3.6/urllib/request.py", line 1948, in http_error result = method(url, fp, errcode, errmsg, headers) File "/usr/local/lib/python3.6/urllib/request.py", line 2136, in http_error_302 headers, data) File "/usr/local/lib/python3.6/urllib/request.py", line 2167, in redirect_internal return self.open(newurl) File "/usr/local/lib/python3.6/urllib/request.py", line 1763, in open raise OSError('socket error', msg).with_traceback(sys.exc_info()[2]) File "/usr/local/lib/python3.6/urllib/request.py", line 1757, in open return getattr(self, name)(url) File "/usr/local/lib/python3.6/urllib/request.py", line 1967, in open_https return self._open_generic_http(self._https_connection, url, data) File "/usr/local/lib/python3.6/urllib/request.py", line 1916, in _open_generic_http http_conn.request("GET", selector, headers=headers) File "/usr/local/lib/python3.6/http/client.py", line 1239, in request self._send_request(method, url, body, headers, encode_chunked) File "/usr/local/lib/python3.6/http/client.py", line 1285, in _send_request self.endheaders(body, encode_chunked=encode_chunked) File "/usr/local/lib/python3.6/http/client.py", line 1234, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "/usr/local/lib/python3.6/http/client.py", line 1026, in _send_output self.send(msg) File "/usr/local/lib/python3.6/http/client.py", line 964, in send self.connect() File "/usr/local/lib/python3.6/http/client.py", line 1400, in connect server_hostname=server_hostname) File "/usr/local/lib/python3.6/ssl.py", line 407, in wrap_socket _context=self, _session=session) File "/usr/local/lib/python3.6/ssl.py", line 814, in init self.do_handshake() File "/usr/local/lib/python3.6/ssl.py", line 1068, in do_handshake self._sslobj.do_handshake() File "/usr/local/lib/python3.6/ssl.py", line 689, in do_handshake self._sslobj.do_handshake() OSError: [Errno socket error] [Errno socket error] EOF occurred in violation of protocol (_ssl.c:833)

    Version of IMDbPY, Python and OS

    • Python: python3 -V or, if you are using Python 2, python -V
    • IMDbPY: python3 -c 'import imdb ; print(imdb.VERSION)' or, if you are using Python 2, python -c 'import imdb ; print(imdb.VERSION)'
    • OS: python -c 'import platform ; print(platform.uname())'

    python - Python 3.6.5rc1 imdbpy - 6.6dev20180415 OS - uname_result(system='Linux', node='ushapld00167.stg-tfayd.com', release='2.6.32-573.26.1.el6.x86_64', version='#1 SMP Tue May 3 12:39:43 PDT 2016', machine='x86_64', processor='x86_64')

    Steps to reproduce the issue

    if possible, provide a minimal code to reproduce the problem

    #!python
    
    # your code here
    

    ia = imdb.IMDb() ia.set_proxy(proxy) results = ia.search_movie(title)

    What's the expected result?

    -A search for movies.

    What's the actual result?

    • SSL handshake issues.

    Additional details

    • I've attempting force reinstalling every module I can think of.
    bug http 
    opened by rednibia 12
  • HTTPError 403 fetching web pages

    HTTPError 403 fetching web pages

    Issue description

    As in the description.

    Version of Cinemagoer, Python and OS

    • Python: Python 3.9.2
    • Cinemagoer: 2022.02.11
    • OS: uname_result(system='Linux', node='raspberrypi', release='5.15.61+', version='#1579 Fri Aug 26 11:08:59 BST 2022', machine='armv6l')

    Steps to reproduce the issue

    import imdb
    ia = imdb.Cinemagoer()
    ia.search_movie('The Curious Case of Benjamin Button')
    

    Try multiple times. Occurs only sometimes.

    What's the expected result?

    [<Movie id:0421715[http] title:_The Curious Case of Benjamin Button (2008)_>, <Movie id:3011584[http] title:_"Zoom In" The Curious Case of Benjamin Button (2008)_>, <Movie id:7229412[http] title:_"Chris Stuckmann Movie Reviews" The Curious Case of Benjamin Button (2014)_>, <Movie id:18793490[http] title:_The Curious Case of Benjamin Button by F. Scott Fitzgerald (Short Story Month) (2019) (Podcast Episode) - The Drunk Guys Book Club Podcast (2017)_>, <Movie id:17184240[http] title:_The Curious Case of Benjamin Button by F. Scott Fitzgerald (2021) (Podcast Episode) - Just Sleep - Bedtime Stories for Adults (2021)_>, <Movie id:19831222[http] title:_The Curious Case of Benjamin Button âEUR¢ The Next Reel (2012) (Podcast Episode) - The Next Reel Film Podcast Master Feed (2011)_>, <Movie id:3487928[http] title:_"Partners" The Curious Case of Benjamin Butt-Ugly (2014)_>, <Movie id:1430122[http] title:_The Curious Birth of Benjamin Button (2009) (V)_>, <Movie id:8343064[http] title:_"RealTVFilms" Alexandre Desplat, Curious Case of Benjamin Button (2009)_>, <Movie id:22311096[http] title:_The Curious Case of Benja-Scam Button w/ Josh Brekhus (2022) (Podcast Episode) - Scam Goddess (2019)_>, <Movie id:17497930[http] title:_"SSDM" What is THE CURIOUS CASE OF BENJAMIN BUTTON really about? (2021)_>, <Movie id:2135211[http] title:_"Hollywood on Set" Ink Heart/Paul Blart: Mall Cop/The Curious Case of Benjamin Button (2009)_>, <Movie id:18151852[http] title:_Bavarian Podcast Works Flagship Show S4E14: Rotations for Bayern, the futures for Sabitzer & Musiala, the curious case of Benjamin Pavard, the Ballon d'Or, and more! (2021) (Podcast Episode) - Bavarian Football Works: For Bayern Munich fans (2019)_>]
    

    What's the actual result?

    Traceback (most recent call last):
      File "/home/roy/.local/lib/python3.9/site-packages/imdb/parser/http/__init__.py", line 221, in retrieve_unicode
        response = uopener.open(url)
      File "/usr/lib/python3.9/urllib/request.py", line 523, in open
        response = meth(req, response)
      File "/usr/lib/python3.9/urllib/request.py", line 632, in http_response
        response = self.parent.error(
      File "/usr/lib/python3.9/urllib/request.py", line 561, in error
        return self._call_chain(*args)
      File "/usr/lib/python3.9/urllib/request.py", line 494, in _call_chain
        result = func(*args)
      File "/usr/lib/python3.9/urllib/request.py", line 641, in http_error_default
        raise HTTPError(req.full_url, code, msg, hdrs, fp)
    urllib.error.HTTPError: HTTP Error 405: Not Allowed
    Traceback (most recent call last):
      File "/home/roy/.local/lib/python3.9/site-packages/imdb/parser/http/__init__.py", line 221, in retrieve_unicode
        response = uopener.open(url)
      File "/usr/lib/python3.9/urllib/request.py", line 523, in open
        response = meth(req, response)
      File "/usr/lib/python3.9/urllib/request.py", line 632, in http_response
        response = self.parent.error(
      File "/usr/lib/python3.9/urllib/request.py", line 561, in error
        return self._call_chain(*args)
      File "/usr/lib/python3.9/urllib/request.py", line 494, in _call_chain
        result = func(*args)
      File "/usr/lib/python3.9/urllib/request.py", line 641, in http_error_default
        raise HTTPError(req.full_url, code, msg, hdrs, fp)
    urllib.error.HTTPError: HTTP Error 405: Not Allowed
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "/home/roy/.local/lib/python3.9/site-packages/imdb/__init__.py", line 444, in search_movie
        res = self._search_movie(title, results)
      File "/home/roy/.local/lib/python3.9/site-packages/imdb/parser/http/__init__.py", line 408, in _search_movie
        cont = self._get_search_content('tt', title, results)
      File "/home/roy/.local/lib/python3.9/site-packages/imdb/parser/http/__init__.py", line 396, in _get_search_content
        cont = self._retrieve(self.urls['find'] % params)
      File "/home/roy/.local/lib/python3.9/site-packages/imdb/parser/http/__init__.py", line 379, in _retrieve
        ret = self.urlOpener.retrieve_unicode(url, size=size)
      File "/home/roy/.local/lib/python3.9/site-packages/imdb/parser/http/__init__.py", line 249, in retrieve_unicode
        raise IMDbDataAccessError(
    imdb._exceptions.IMDbDataAccessError: {'errcode': None, 'errmsg': 'None', 'url': 'https://www.imdb.com/find?q=The+Curious+Case+of+Benjamin+Button&s=tt', 'proxy': '', 'exception type': 'IOError', 'original exception': <HTTPError 405: 'Not Allowed'>}
    
    bug http 
    opened by Ryo-Sajima 11
  • HTTPError 308: Permanent Redirect

    HTTPError 308: Permanent Redirect

    Have IMDB changed the URL structure?

    raise IMDbDataAccessError( imdb._exceptions.IMDbDataAccessError: {'errcode': None, 'errmsg': 'None', 'url': 'https://www.imdb.com/find?q=the+batman&s=tt', 'proxy': '', 'exception type': 'IOError', 'original exception': <HTTPError 308: 'Permanent Redirect'>}

    Redirect to: https://www.imdb.com/find/?q=the%20batman&s=tt

    bug http 
    opened by xalienxx 10
  • series

    series "creator" seems to be broken

    Issue description

    parsing of series "creator" seems to be broken

    Version of IMDbPY, Python and OS

    • Python: 3.6.9
    • IMDbPY: 6.8
    • OS: ('Linux', '5.3.0-62-generic', '#56~18.04.1-Ubuntu SMP Wed Jun 24 16:17:03 UTC 2020', 'x86_64', 'x86_64')

    Steps to reproduce the issue

    ia = IMDb()
    m = ia.get_movie("2861424")
    print(m['creator'])
    

    What's the expected result?

    [<Person id:1363595[http] name:_Dan Harmon_>, <Person id:1551598[http] name:_Justin Roiland_>]
    

    What's the actual result?

    KeyError: 'creator'
    

    Additional details

    The current code for extracting series creators is:

                    foreach='//td[starts-with(text(), "Creator")]/..//a',
    

    Changing it to match the code for extracting writers/directors seems to work:

                    foreach='//div[starts-with(normalize-space(text()), "Creator")]/ul/li[1]/a',
    

    Although why this is wasn't entirely clear to me. The actual structure of the html is this:

        <div class="credit_summary_item">
            <h4 class="inline">Creators:</h4>
            <a href="/name/nm1363595/?ref_=tt_ov_wr">Dan Harmon</a>, 
            <a href="/name/nm1551598/?ref_=tt_ov_wr">Justin Roiland</a>    
        </div>
    

    Which looks a lot more like ..//a than ul/li[1]/a to my untrained eye. But the latter form seems to work. (Note that Directors and Writers seem to have the same html form given above.)

    bug http 
    opened by meeotch 10
  • The

    The "in" operator doesn't work as described in the documentation

    Issue description

    The documentation states that "key in movieObject" should indicate whether the key is available for the given movieObject but this doesn't work.

    Version of IMDbPY, Python and OS

    • Python: 3.6.4
    • IMDbPY: 6.5dev20180410
    • OS: Linux 4.13.0-37-generic #42~16.04.1-Ubuntu SMP x86_64

    Steps to reproduce the issue

    #!python
    
    from imdb import IMDb
    
    ia = IMDb()
    movie = ia.get_movie('0133093')
    print('title' in movie, 'title' in movie.keys())
    

    What's the expected result?

    True True

    What's the actual result?

    False True

    Additional details

    bug 
    opened by uyar 10
  • Parsing lists with unreleased titles

    Parsing lists with unreleased titles

    When using get_movie_list on one of my personal lists with currently unreleased titles the program crashes as the parser can't find a release year for some of the titles. The list contains for example the title with the following ID: 0455788. I'm actually only interested on getting the movieIDs from the list and not the Movie objects, but I'm couldn't find such a function here.

    File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/imdb/init.py", line 459, in get_movie_list res = self.get_movie_list(list, results) File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/imdb/parser/http/init.py", line 425, in _get_movie_list result_part = self.listProxy.list_parser.parse(cont, results=results)['data'] File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/imdb/parser/http/utils.py", line 434, in parse data = self.parse_dom(dom) File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/imdb/parser/http/utils.py", line 526, in parse_dom return Rules(self.rules).extract(dom) File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/imdb/parser/http/piculet.py", line 373, in extract value = self.apply(element) File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/imdb/parser/http/piculet.py", line 517, in apply extracted = rule.extract(subroot) File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/imdb/parser/http/piculet.py", line 582, in extract raw_values = [self.extractor.extract(r, transform=False) File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/imdb/parser/http/piculet.py", line 582, in raw_values = [self.extractor.extract(r, transform=False) File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/imdb/parser/http/piculet.py", line 373, in extract value = self.apply(element) File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/imdb/parser/http/piculet.py", line 517, in apply extracted = rule.extract(subroot) File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/imdb/parser/http/piculet.py", line 574, in extract value = self.extractor.extract(subroot) File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/imdb/parser/http/piculet.py", line 376, in extract return value if self.transform is None else self.transform(value) File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/imdb/parser/http/listParser.py", line 75, in transform=lambda x: int(''.join(i for i in x if i.isdigit())[:4]) ) ValueError: invalid literal for int() with base 10: ''

    bug http 
    opened by jsteinba 1
  • Limited movies returned for actors

    Limited movies returned for actors

    This is noted on the website changelog: "Please notice that since now, the person pages will return a very limited list of movies for each role."

    Is this intentional or a limitation? If intentional is there a way to return all of their movies?

    Thanks

    http support 
    opened by clearcutgit 3
  • Request to add movie age-range

    Request to add movie age-range

    Issue description

    write the description here

    Version of Cinemagoer, Python and OS

    NOTICE: please always try the latest version from the repository before submitting a bug.

    • Python: python3 -V or, if you are using Python 2, python -V
    • Cinemagoer: python3 -c 'import imdb ; print(imdb.VERSION)' or, if you are using Python 2, python -c 'import imdb ; print(imdb.VERSION)'
    • OS: python -c 'import platform ; print(platform.uname())'

    Steps to reproduce the issue

    if possible, provide a minimal code to reproduce the problem

    #!/usr/bin/env python
    
    # your code here
    

    What's the expected result?

    What's the actual result?

    Additional details

    enhancement http 
    opened by zahra-ash0uri 1
  • Help using AKAs / languages

    Help using AKAs / languages

    Issue description

    Can someone help me figure out where I am going wrong please? I am trying to translate titles.

    Version of Cinemagoer, Python and OS

    Name: cinemagoer
    Version: 2022.2.11
    Summary: Python package to access the IMDb's database
    Home-page: https://cinemagoer.github.io/
    Author: Davide Alberani
    Author-email: [email protected]
    License: GPL
    Location: c:\users\chris\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages
    Requires: lxml, SQLAlchemy
    Required-by:
    

    Steps to reproduce the issue

    import imdb
    from imdb import helpers
    
    ia = imdb.Cinemagoer()
    
    movies = ia.search_movie('Tuż przed tragedią')
    print(helpers.akasLanguages(movies[0]))
    

    What's the expected result?

    I expect to see all of the languages and titles shown here: https://www.imdb.com/title/tt0462133/releaseinfo

    What's the actual result?

    Outputs: [(None, 'Tuż przed tragedią')]

    Additional details

    Perhaps I am using it wrong? I want to input a title in whatever language, find the movie/show, then see if the desired output language is in the AKAs.

    The example given above is the Polish name of a show. Lets assume I want to translate it to English. I would get Seconds from Disaster

    Thanks, Chris

    bug http 
    opened by Chris230291 1
  • Mismatch in

    Mismatch in "kind" parameter when using "ia.search_movie" and "ia.get_movie"

    Hello!

    I've got to say, fantastic job with this tooling, this is a great tool.

    However, I noticed an issue: Occasionally, with some titles, there's a mismatch with the "kind" result of search_movie and get_movie commands. For example, where get_movie gives you a "podcast episode", search_movie gives you "movie".

    A way to reproduce this result: Search phrase: "Better call saul - season 01 -" First result: 'DE TV Recap: Better Call Saul Season 5 Finale' IMDB-ID: 18612522 search_movie kind: "movie" get_movie kind: "podcast episode"

    Information: Python 3.10.0 Windows 10 or Linux platform / Ubuntu Server 20.04 LTS (both reproduce this same output) Cinemagoer version 2022.02.11

    opened by FinlandApollo 0
Releases(2022.12.27)
  • 2022.12.27(Dec 27, 2022)

  • 2022.12.04(Dec 4, 2022)

    A lot of fixes for person and movie pages. Since now, the person pages will return a very limited list of movies for each role; there is nothing we can do about it.

    • #232: add get_showtimes() method (courtesy of Kostya Farber)
    • #388: add 'videos' key to extract movie trailer links
    • #391: add parental guide advisory votes (courtesy of salehdeh76)
    • #395: fix for some wrongly-formatted titles (courtesy of tsaklidis)
    • #396: raise exception on resize image (courtesy of tsaklidis)
    • #398: fix for production status
    • #415: change User-Agent to a more complete form
    • #419: fix movie and person searches
    • #420: introduce a contributor guide (courtesy of Elizabeth Thorne)
    • #421: fixes for person parsers
    Source code(tar.gz)
    Source code(zip)
    CHANGELOG.txt(56.63 KB)
    cinemagoer-2022.12.4-py3-none-any.whl(292.30 KB)
    cinemagoer-2022.12.4.tar.gz(259.48 KB)
  • 2022.02.11(Feb 11, 2022)

  • 2022.01.26(Jan 26, 2022)

    NOTICE: the project has been renamed from IMDbPY to Cinemagoer.

    Complete changelog:

    [general]

    • #238: by default, exceptions are raised
    • #315: include all script in the ./bin directory
    • #318: fix kind of tv mini series in search results
    • #369: do not rebuild locales running setup.py clean
    • #371: support for 8-digit imdbIDs
    • #378: renamed to cinemagoer

    [http]

    • #308: fix movie connections parser
    • #319: parse review rating
    • #327: do not strip new lines
    • #329: improve localized and original title
    • #330: fix for tv series for seasons not found
    • #331: fix kind of tv mini series in search results
    • #342: parse all information from full credits
    • #343: fix for mpaa and certificates from parental guide page
    • #344: extract advisories from parental guide page
    • #346: collect raw info from country code
    • #348: fix for series with no episodes
    • #349: relevant keywords
    • #357: add support for TV Special
    • #366: fix full-size image links
    • #372: support fox box office charts
    Source code(tar.gz)
    Source code(zip)
    cinemagoer-2022.1.26-py3-none-any.whl(294.23 KB)
    cinemagoer-2022.1.26.tar.gz(265.50 KB)
  • 2021.04.18(Apr 18, 2021)

    • What's new in release 2021.04.18 (Black Sails)

      [general]

      • #289: Serbian translations
      • #290: update Portuguese translations
      • #291: allow direct access to filmography keys
      • #299: add pagination to get_movie_list (courtesy of Stein van Broekhoven)
      • #300: any iterable can be used as season_nums parameter of update_series_seasons
      • #305: fix ability to set logging level
      • #310: fix build of locales .mo files
      • #312: extract localized title

      [sql]

      • #287: fix missing logger
    Source code(tar.gz)
    Source code(zip)
    IMDbPY-2021.4.18-py3-none-any.whl(291.53 KB)
    IMDbPY-2021.4.18.tar.gz(258.28 KB)
Owner
Davide Alberani
A programmer with a soft spot for trash movies.
Davide Alberani
Program that automates the bump of the Disboard Bot. Done 100% in Python with PyAutoGUI library

Auto-Discord-Bump Program that automates the bump of the Disboard Bot done 100% in python with PyAutoGUI How to configue You will need 3 things before

Mateus 1 Dec 19, 2021
unofficial source of the discord bot, “haunting.” created by: vorqz, vert, & Veltz

hauntingSRC unofficial source of the discord bot, “haunting.” created by: vorqz, vert, & Veltz reasoning: creators skidded the most of this bot and do

Vast 11 Nov 04, 2022
A Twitter Bot that retweets and likes tweets with the hashtag #girlscriptwoc and #girlscript, and also follows the user.

GirlScript Winter of Contributing Twitter Bot A Twitter Bot that retweets and likes tweets with the hashtag #girlscriptwoc and #girlscript, and also f

Pranay Gupta 9 Dec 15, 2022
Simple Craigslist wrapper

python-craigslist A simple Craigslist wrapper. License: MIT-Zero. Disclaimer I don't work for or have any affiliation with Craigslist. This module was

Julio M. Alegria 370 Dec 22, 2022
A powerfull Telegram Leech Bot

owner of this repo :- Abijthkutty contact me :- Abijth Telegram Torrent and Direct links Leecher Dont Abuse The Repo ... this is intented to run in Sm

αвιנтн 9 Jun 11, 2022
Telegram Url Upload Bot With Same more Features ✨

Telegram Url Upload Bot With Same more Features ✨

Group Dc Bots 4 Feb 12, 2022
💬 Send iMessages using Python through the Shortcuts app.

py-imessage-shortcuts Send iMessages using Python through the Shortcuts app. Requires macOS Monterey (macOS 12) or later. Compatible with Apple Silico

Kevin Schaich 10 Nov 30, 2022
Python library for Spurwing API to schedule appointments, manage calendars and custom integrations.

Spurwing API Python Library Lightweight Python library for Spurwing's API. Spurwing's API makes it easy to add robust scheduling and booking to your a

Spurwing 1 Jul 14, 2021
Finds Jobs on LinkedIn using web-scraping

Find Jobs on LinkedIn 📔 This program finds jobs by scraping on LinkedIn 👨‍💻 Relies on User Input. Accepts: Country, City, State 📑 Data about jobs

Matt 44 Dec 27, 2022
A google search telegram bot.

Google-Search-Bot A google search telegram bot. Made with Python3 (C) @FayasNoushad Copyright permission under MIT License License - https://github.c

Fayas Noushad 37 Nov 24, 2022
Easily update resume to naukri with one click

NAUKRI RESUME AUTO UPDATER I am using poetry for dependencies. you can check or change in data.txt file for username and password Resume file must be

Rahul.p 1 May 02, 2022
Framework to collect and process weather data from wttr.in.

Weathercrawler Automatic extraction and processing framework for weather data from wttr.in Installation tested with: Python 3.7.3 Python 3.9.4 git clo

Maurice Günder 0 Jul 26, 2021
A simple object model for the Notion SDK.

A simplified object model for the Notion SDK. This is loosely modeled after concepts found in SQLAlchemy.

Jason Heddings 54 Jan 02, 2023
A Discord bot that enables using breakout rooms on a server

Discord Breakout Room Bot This bot enables you to use breakout rooms on your Discord server! Note This bot was thrown together within a few hours, so

Till Müller 2 Nov 23, 2021
𝐀 𝐦𝐨𝐝𝐮𝐥𝐚𝐫 𝐓𝐞𝐥𝐞𝐠𝐫𝐚𝐦 𝐆𝐫𝐨𝐮𝐩 𝐦𝐚𝐧𝐚𝐠𝐞𝐦𝐞𝐧𝐭 𝐛𝐨𝐭 𝐰𝐢𝐭𝐡 𝐮𝐥𝐭𝐢𝐦𝐚𝐭𝐞 𝐟𝐞𝐚𝐭𝐮𝐫𝐞𝐬 !!

𝐇𝐨𝐰 𝐓𝐨 𝐃𝐞𝐩𝐥𝐨𝐲 For easiest way to deploy this Bot click on the below button 𝐌𝐚𝐝𝐞 𝐁𝐲 𝐒𝐮𝐩𝐩𝐨𝐫𝐭 𝐆𝐫𝐨𝐮𝐩 𝐒𝐨𝐮𝐫𝐜𝐞𝐬 𝐆𝐞𝐧𝐞?

Mukesh Solanki 4 Oct 18, 2021
This is the repository for HalpyBOT, the Hull Seals IRC Chatbot Assistant.

HalpyBOT 1.4.2 This is the repository for HalpyBOT, the Hull Seals IRC Chatbot Assistant. Description This repository houses all of the files required

The Hull Seals 3 Nov 03, 2022
Fastest Pancakeswap Sniper BOT TORNADO CASH 2022-V1 (MAC WINDOWS ANDROID LINUX)

Fastest Pancakeswap Sniper BOT TORNADO CASH 2022-V1 (MAC WINDOWS ANDROID LINUX) ⭐️ AUTO BUY TOKEN ON LAUNCH AFTER ADD LIQUIDITY ⭐️ ⭐️ Support Uniswap

Crypto Trader 7 Jan 31, 2022
A minimal caching proxy to GitHub's REST & GraphQL APIs

github-proxy A caching forward proxy to GitHub's REST and GraphQL APIs. GitHub-Proxy is a thin, highly extensible, highly configurable python framewor

Babylon Health 26 Oct 05, 2022
Python Client for Instagram API

This project is not actively maintained. Proceed at your own risk! python-instagram A Python 2/3 client for the Instagram REST and Search APIs Install

Facebook Archive 2.9k Jan 01, 2023