On Mar 15, Chris Spencer <chriss...@gmail.com> wrote:

> > 'http' and 'mobile' works the same way, too.

> I'm not using sql, just the default IMDb (which is presumably http?).

Exactly, the default is 'http', which fetches information from the web;
it has nothing to do with the plain text data files (files like
mpaa-ratings-reasons.list.gz, in this case).

This example works for me:

  from imdb import IMDb
  i = IMDb('http')
  matrix = i.search_movie('the matrix (1999)')[0]
  i.update(matrix)
  print matrix, matrix.movieID
  print matrix['mpaa']

I've tried with both 'lxml' and 'beautifulsoup' parsers [1].
It prints 'Rated R for sci-fi violence and brief language.', by the way.

> For that, your above example generates a keyerror. How would I fix
> this for http?

Can you report the exception?  I need to be sure where the problem lies.


+++
[1] can be forced with the "useModule" argument of imdb.IMDb (e.g.:
    useModule='lxml' or useModule='beautifulsoup'); by default it
    first tries 'lxml', falling back to 'beautifulsoup'.
-- 
Davide Alberani <davide.alber...@gmail.com> [PGP KeyID: 0x465BFD47]
http://erlug.linux.it/~da/

------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Imdbpy-help mailing list
Imdbpy-help@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/imdbpy-help

Reply via email to