On Nov 09, Radu Jurca <[EMAIL PROTECTED]> wrote: Hi! If possible, write text-only emails, please.
> I was wondering it it's possible to extract from the online database > the distribution of votes and the set of user comments submitted about > a movie. More precisely, given a movie I would like to know:<br> > - how many users gave it a rating of 7 for example;<br> An example of this: from imdb import IMDb i = IMDb() m = i.get_movie('0057012') i.update(m, 'vote details') print m['number of votes'][7] # How many people voted "7". Keep in mind that the 'number of votes' keyword may not exist (and so "7"), so look before you leap. :-) Many other information are available; try this: i.update(m, 'all') print m.keys() Obviously it will fetch every available info about a movie: don't do a "i.update(m, 'all')" in real life, but limit your query to the set of information you really need. > - what were the comments (e.g., text, rating, submission date) left by > previous users;<br> Users comments are totally unsupported, sorry - and I have no plan to support it in the near future: they are available only on the web site, they are copyrighted by the respective authors and are scattered in way too many pages to be easily retrievable. Most of the time, moreover, there are simply too many of them. Best regards, -- Davide Alberani <[EMAIL PROTECTED]> [PGP KeyID: 0x465BFD47] http://erlug.linux.it/~da/ ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Imdbpy-devel mailing list Imdbpy-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/imdbpy-devel