On May 06, Jesper Noehr <[EMAIL PROTECTED]> wrote:
[please, reply on the mailing list if possible]
> >I'm about to do some tests with other "+" titles and using
> >urllib.quote instead of urllib.quote_plus.
>
> Ah. Seems like I might've overfixed it then.
No, these was just some ideas: I've done it and the problem
persists, so it looks like you've spotted the bug correctly.
> >>--- /root/IMDbPY-3.0/build/lib.linux-i686-2.4/imdb/__init__.py
> >
> >Is this part of the patch really necessary?
>
> I haven't made lots of patches so it was just diff -ru. Feel free
> to correct, and tell me how to make them properly :-)
No no, the patch was perfect (I'm used to create it with diff -Naur,
but your is ok).
I was talking about the changes to the get_imdbID method - but it
seems that you were right (see below).
> >Are you sure that a search with 's=all&q=%s' could return the main
> >page of a movie, while the same parameters used with the query
> >'q=%s;s=pt' has just returned a list of movies?
> >
> >I'll do some tests, but if you have some examples, it would help.
>
> I've tested this, and it does. Try with "Tristan + Isolde (2006)".
Done; you're correct, and I've an explanation to this behavior:
doing the s=pt query the server expect a query for a _perfectly
correct_ title (title, kind year, imdbIndex); for some reasons
titles with "+" are not correctly handled: I suspect an error in
our (or their) code handling URL encoding, but so far I haven't
found a way to encode it correctly (if possible at all...)
On the other hand a search with s=all (I suspect s=tt would be
better) does a normal search, but the "IMDbPYnew" account is
set to return a movie's main page if there's just one "good enough
result". I'm wondering what the default is for accesses without an
account (IMDbPY sends a cookie: it has its own account on IMDb so
that it can search for adult titles; but if adultSearch is off,
it doesn't use any account [1]).
I'll check it later.
> I had to mess around with various HTTP headers and telnet to figure
> this one out.
Sounds funny! :-)
> >and in at least one case (in retrieve_unicode) the IOError
> >exception (raised by urllib) is trapped, but urllib2 raises the
> >urlib2.HTTPError exception, which doesn't have the same attributes.
>
> Hmyeah, but it seems like urllib vs. urllib2 is *basically* the
> same with regards to error handling, with the exception of the
> Exceptions being raised.
That's a good news: I hope to have time to read the documentation, soon.
> It's definitely possible to have IMDbURLopener subclass a module
> of our own that utilizes urllib2, so no code change would be needed.
Can be a solution, at least as a first step.
> >Oh, by the way: if you're interested in do some (ever very little)
> >work on IMDbPY just let me know: I will be glad to add you to the
> >list of developers and grant you access to the CVS repository.
>
> As I'm messing with IMDbPY excessively these days (as you might've
> noticed from all my emails), I'd love to be able to contribute
> directly. Of course I'll put a little more thought into the patches
> before I submit them -- hadn't had my coffee this morning ;-)
Ok, welcome aboard! :-)
Let me know what your username on sourceforge is, and I'll add you
to the developers list.
Thanks!
+++
[1] that makes me think we should set another account for queries
with adultSearch set to off... Mmmm...
--
Davide Alberani <[EMAIL PROTECTED]> [PGP KeyID: 0x465BFD47]
http://erlug.linux.it/~da/
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Imdbpy-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/imdbpy-devel