On May 18, michael charclo <[EMAIL PROTECTED]> wrote:

> When I look for 'allo allo' on the IMDb website the series are in first
> place.
> When I look for 'allo allo' with imdbpy I get the movie 'Gone with the
> wind'.
> Any idea why this happens?

Hi!
Hmmm... funny thing.

Not sure why, but these are the facts: doing an usual search on the
web site, you'll get a list which first lists "Exact Matches" and
after that "Partial Matches" [1].  Performing a search using IMDbPY,
you get first "Popular Titles" and after that (in an "Other Results"
sub-section) the "Exact Matches" and the "Partial Matches".

I can think of two causes:
1. IMDbPY uses the akas.imdb.com server; maybe it handles queries
   in a slightly different way.
2. one of the "search preferences" set for the IMDbPYweb's account
   triggers this behavior.

I don't consider this exactly a bug, even if I agree that in some
circumstances the results can looks a bit odd.

If this results too annoying, you can do some tests using another
account and then use it (for both 'http' and 'mobile' data access system),
using the cookie_id and cookie_uu parameters of the do_adult_search
method [2].

If the problem is with the used server, it can be changed at
run-time, overriding the imdb.imdbURL_find variable, like this:
  import imdb
  imdb.imdbURL_find = 'http://MYPREFERREDSERVER.imdb.com/find?'
  ia = imdb.IMDb('http')
  results = ia.search_movie('title to search')
  ...


Thank you for the report!
Oh, if you want to do some experiments, the query used by IMDbPY
is in the format:
  http://akas.imdb.com/find?s=tt;mx=20;q=TITLE+TO+SEARCH+FOR


+++
[1] I've to check if this is true also doing a "title only" search,
    and not a generic search as I've done.
[2] yeah, yeah: this portion of code should be moved outside, in
    a set_cookie method. :-)
    Anyway, this is an example:
      import imdb
      ia = imdb.IMDb('http')
      ia.do_adult_search(True, cookie_id=YOUR_ID_STRING, 
cookie_uu=YOUR_UU_STRING)
      results = ia.search_movie('title to search')

-- 
Davide Alberani <[EMAIL PROTECTED]> [PGP KeyID: 0x465BFD47]
http://erlug.linux.it/~da/

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Imdbpy-devel mailing list
Imdbpy-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/imdbpy-devel

Reply via email to