drmadgr / imdb-api

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

no result found for some searches and more... #11

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.
for exmaple : The following strings provide no results:
" Honey, I Shrunk the Kids"
" Schindler's List"
as issued before also:
"green mile"

2.
in titles some chars don't parse right
- " shows as "&#x27 " , also & and ' 

What is the expected output? What do you see instead?
1. no results were found although this titles exists.

What version of the product are you using? On what operating system?
ver 3.5
windows XP SP2

Please provide any additional information below.

1. with debugging the source code i've managed to find some reason for that
problem, the are some titles like these exmaples, that in search result
HTML page "Popular Titles" end with </p> instead of <p><b> .
so in line 135 in IMDB.cs , for exmaple:
pat = @"<b>Popular Titles</b>(.*?)(<p><b>|</p>)";
instead of
pat = @"<b>Popular Titles</b>(.*?)<p><b>";
had solved the problem and managed to find all these 3 titles.
in addition,
not all "exact/partial/approx matches" are parsed, 
i supposed that's happen because you parse one line , and search only in
this line for "exact/partial/approx matches",
iv'e simply replaced in parseTitleLinks method in IMDB.cs file:
all 
match = reg.Match(line);
lines
with
Match match = reg.Match(sB.ToString());
in it's managed to find more of this "exact/partial/approx matches".
(although i don't think that all of them)

Original issue reported on code.google.com by yos...@gmail.com on 1 Oct 2009 at 6:21