On Aug 30, Davide Alberani <[EMAIL PROTECTED]> wrote:
> I can't even call this hack "untested", so maybe it won't work at
> all. :-)
Exactly. :-)
I'm committing a new version that should work: the correct solution
was to use the HTTP "Range" header.
At least... theoretically. After a simple test it looks like that
the IMDb.com web server ignores the "Range" header. :-/
Anyway, little explanation:
- a normal search is performed; if the string "more than 500 partial
matches" is _not_ found in the response, it's assumed to be a
valid answer (with X results, maybe none).
- otherwise, the parameters more=nm (for names) or more=tt (for titles)
are used to perform another query.
This query contains a "Range" HTTP header, to limit the answer to
a certain amount of bytes.
This amount is calculated in this way:
22 KB (today a search that leads to zero results will create
a 12 KB web page, so 22 seems to be reasonable.)
+ 512 bytes multiplied by the number of requested results.
E.g.: if - as by default - you want to get the first 20 results,
you'll fetch the first 22528 + 512*20 bytes (i.e. 32 KB)
--
Davide Alberani <[EMAIL PROTECTED]> [PGP KeyID: 0x465BFD47]
http://erlug.linux.it/~da/
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Imdbpy-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/imdbpy-devel