Fetching movie ratings, gross collection, budget and production year

494 views
Skip to first unread message

Saish Redkar

unread,
Apr 14, 2016, 7:07:35 PM4/14/16
to imdbpy-users
I am trying to extract the movie ratings, gross collection, budget and production year of the movies from the SQL tables. But I see that not all movies have the above information.
How to get this info using the imdbpy package? 

Davide Alberani

unread,
Apr 17, 2016, 3:13:52 PM4/17/16
to imdbpy...@googlegroups.com
Hi Saish,
IMDbPY extract all the information contained in the plain text data files,
so i something is missing it's simply not distributed at all by IMDb.


--
Davide Alberani <davide....@gmail.com> [PGP KeyID: 0x465BFD47]
http://www.mimante.net/

Saish Redkar

unread,
Apr 18, 2016, 11:45:19 PM4/18/16
to imdbpy-users
Hey Davide,
As mentioned in the IMDBPy Documentation, the following help in getting the movie runtime and ratings -
print the_unt['runtime']
print the_unt['rating']

Are there similar ways of getting the gross,budget,etc. using python? 
eg. print the_unt['gross] won't work

-Saish 

Davide Alberani

unread,
May 8, 2016, 3:47:21 AM5/8/16
to imdbpy...@googlegroups.com, Saish Redkar
Sure,
if they are available, they can be accessed using these keys:
'budget', 'weekend gross', 'gross', 'opening weekend', 'rentals',
'admissions', 'filming dates', 'production dates','studios', 'copyright holder'

In general, please remember that the Movie/Person/Company/Character
instances behave like dictionaries, do you can get the list of keys
with .keys()
> --
> You received this message because you are subscribed to the Google Groups
> "imdbpy-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to imdbpy-users...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

gideon....@gmail.com

unread,
Feb 28, 2019, 4:37:21 PM2/28/19
to imdbpy-users
Hi Davide,

Just checking, but budget and gross are still not part of IMDbPY, right? I haven't seen them while using the API. Also, you don't include the studio that produces a movie in the movie class or the viewership rating (e.g. PG-13), do you? 

Davide Alberani

unread,
Feb 28, 2019, 5:02:15 PM2/28/19
to imdbpy...@googlegroups.com
Hi Gideon,
from which data source? In the distributed dataset, those information
are missing,
but they are present on the site. It theory we're parsing them, but
the format changed again,
and so right now bugdet information parsers are broken.
We should fix adding the correct parser to the DOMHTMLMovieParser
class in parser/http/movieParser.py

About the production companies and certificates, they seem to work for me.
See this example, that will print all the available keys for the main
page of The Matrix (remember
that there are also other pages, reachable using this API
https://imdbpy.readthedocs.io/en/latest/usage/data-interface.html ),
and the lists of certificates and production companies:

#!/usr/bin/env python3
# -*- coding: utf-8 -*-

ia = imdb.IMDb()

matrix = ia.get_movie('0133093')
print(sorted(matrix.keys()))
print(matrix.get('certificates'))
print(matrix.get('production companies'))


Hope this helps,
Davide Alberani <davide....@gmail.com> [PGP KeyID: 0x3845A3D4AC9B61AD]
http://www.mimante.net/

gideon....@gmail.com

unread,
Mar 1, 2019, 3:55:29 PM3/1/19
to imdbpy-users
Hi Davide,

Thank you for the super quick and helpful response.

You are absolutely right about the viewership ratings/certificates and studio/production companies. I did not process that those were what I was looking for.

For the budget and grossing data, if I understand you correctly, you are saying that you do not currently have the information through the API because IMDb changed its layout. So my questions would be a) do you know when you will have this fixed?; and b) with regard to my question on Stack Overflow that you graciously answered, if I want to obtain 10,000 budgets, grossing amounts, certificates, and production companies, would you recommend the same 2 approaches that you mentioned on Stack Overflow? 

Thank you very much for your help.

- Gideon 

Davide Alberani

unread,
Mar 6, 2019, 2:14:37 PM3/6/19
to imdbpy...@googlegroups.com
On Fri, Mar 1, 2019 at 9:55 PM <gideon....@gmail.com> wrote:
>
> For the budget and grossing data, if I understand you correctly, you are saying that you do not currently have the information through the API because IMDb changed its layout. So my questions would be a) do you know when you will have this fixed?

Good question; probably not soon since I have very little time to
devote to this project.

> and b) with regard to my question on Stack Overflow that you graciously answered, if I want to obtain 10,000 budgets, grossing amounts, certificates, and production companies, would you recommend the same 2 approaches that you mentioned on Stack Overflow?

Yes, sure.
If possible, investigate if other providers have the information you
are looking for; unfortunately IMDb doesn't have an API, so it's quite
difficult to do queries on their data.


Best regards,

gideon....@gmail.com

unread,
Mar 7, 2019, 9:43:51 PM3/7/19
to imdbpy-users
Got it. Thanks for the feedback. 
Reply all
Reply to author
Forward
0 new messages