On Tue, Jul 18, 2017 at 8:24 PM, Personal <margaretcheng1...@gmail.com> wrote:
> Thank you for creating imdbpy. When I tried to retrieve box office gross by 
> ia.update(m,'business'), the key business is always empty. Could you tell me 
> what I should do to get box office info and budget info? Thank you!

Hi Qianyu,
what you're doing seems to work for me.

Only thing I'd do, is to be sure that you're using the version from
the repository: https://github.com/alberanid/imdbpy

Also notice that there's a distinction between 'data sets' (like "business")
and the keys that will be added when you fetch a given data set (like "gross",
"budget" and so on).
For more information, see this thread:

My test:

>>> from imdb import IMDb
>>> ia = IMDb()
>>> bh = ia.get_movie('0112573')

# let's update business information
>>> ia.update(bh, 'business')

# now check which keys were added by the 'business' info set
>>> print bh.infoset2keys['business']
[u'gross', u'copyright holder', u'filming dates', u'budget',
u'admissions', u'opening weekend', u'rentals', u'production dates']

# print the gross key
>>> print bh.get('gross')
[u'$75,609,945 (USA) (13 June 1996)', u'\xa310,812,243 (UK) (19
November 1995)', u'\xa33,342,433 (UK) (12 September 1995)',
u'$16,679,000 (UK)', u'$210,409,945 (Worldwide) (31 May 2012)',
u'\u20ac6,878,567 (Spain) (10 July 2003)', u'ESP 1,136,000,000

Hope this helps,

Davide Alberani <davide.alber...@gmail.com>  [PGP KeyID: 0x3845A3D4AC9B61AD]

Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Imdbpy-help mailing list

Reply via email to