On Tue, Jul 26, 2016 at 5:31 AM, Janmejai Pratap Singh
<janmejaisingh123...@gmail.com> wrote:
> I can see from the documentation that, there are ways to retrieve
> ratings for the movies. But I needed them in the database, is their
> any way to get them in the database?

exactly: the usual way, consists in using IMDbPY to get a movie object
and with that read the rating.

If you need to directly work on the database, it's still possible.
I cut & paste from an old mail with a similar request:

To answer where most of the information are: most of the data is in
the movie_info and person_info tables.
There, a movie_id (or person_id) and an info_type_id (a reference to
entries in the info_type table) can be used to identify the meaning of
the 'info' column.

For example, to get the rating information for movies:
- to to the info_type table and search for the ID of the info 'rating' (in
  my case, 101)
- now you should usually see into the movie_info_table... but the rating
  information are a special case and requires different indexes (that's
  a thing I want to change...) and are stored separately, in the
movie_info_idx table
- there, you can see which movie have a given rate looking at the movie_id,
  info_type_id (entries with 101) and 'info' (which actually store the rating).

All this steps are made transparent by the IMDbPY library, as documented
in http://imdbpy.sourceforge.net/docs/README.sqldb.txt  (SQL USAGE section:
it's pretty simple and identical to the use accessing the web data)
If it's better to use IMDbPY or directly the database is up to you, depending
on the goal you need to reach.

Hope this helps,

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

Imdbpy-help mailing list

Reply via email to