drmadgr / imdb-api

Automatically exported from code.google.com/p/imdb-api
0 stars 0 forks source link

Search bug #10

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. iam searching "green mile" by title
2. no results found.

What is the expected output? What do you see instead?

What version of the product are you using? On what operating system?
3.5  xp sp3

Please provide any additional information below.

Original issue reported on code.google.com by ihs34...@gmail.com on 6 Aug 2009 at 2:48

GoogleCodeExporter commented 9 years ago
I have the same issue. When you search for "The Day the Earth Stood Still" IMDB 
API
returns no results.

When you enter the query manually in e.g. Firefox:

http://www.imdb.com/find?s=all&q=The+Day+the+Earth+Stood+Still

you DO get results.

The resulting HTML page contains no results at all, which is strange, because 
the
query is correct.

It only happens with some movies.

At first I thought it was related to the missing '+' characters not inserted by 
the
code, but that doesn't seem to matter. So if you "hack" the code to do:

"http://www.imdb.com/find?s=all&q=The+Day+the+Earth+Stood+Still"

instead of:

"http://www.imdb.com/find?s=all&q=The Day the Earth Stood Still"

for the URL string the same result is returned.

I'm running W7 x64 btw.

Original comment by loek.fre...@gmail.com on 22 Feb 2010 at 2:05

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
in IMDB.CS
I changed line 134ish
from 
    pat = @"Popular Titles(.*?)<p>";
to
    pat = @"Popular Titles(.*?)</p>(?!.*</p>)";

This fixed many search errors for me :)  Let it be known I am not very great 
with regular expressions so this may introduce other issues.

--Beaniiman

Original comment by Beanii...@gmail.com on 8 Oct 2010 at 6:58