I'm trying to make a script for the above portuguese database, but I get an odd error.
When I run the script for, let's say, American Pie, the script builds the correct url
http://www.7arte.net/cgi-bin/arquivos/s ... erican+Pie
but then gives no movie found.
If I paste that url in a browser, it works perfectly.
I checked the result from Line := GetPage(Address); and the returned page has no search results, but everything else is there.
Did anyone find the same problem in other pages? How can I solve this?
Thanks in advance.
Problem with script for www.7arte.net
Just to check if I'm doing anything wrong...
Code: Select all
procedure AnalyzePage(Address: string);
var
Line, MovieItem, MovieTitle, MovieAddress: string;
TitlePos, BeginPos, EndPos: Integer;
List: TStringList;
begin
Line := GetPage(Address);
ShowMessage(Address);
ShowMessage(Line);
PickTreeClear;
if Pos('<b><i>Resultados Encontrados</i></b>', Line) <> 0 then
// ...
// The Address has the correct url
// The Line does not have the links to found movies
// If I paste the contents of Address in a browser, it works!
AnalyzePage('http://www.7arte.net/cgi-bin/arquivos/search_orig.pl?letra=&proc='+UrlEncode(MovieName));
It is easy to test:
and same problem
Works fine if I create a blank Delphi projects that downloads the page.
So there is a problem in the way that the page is downloaded, maybe an option in the TIdHTTP component (the one that does the HTTP download)
Code: Select all
program NewScript;
var
s: string;
begin
s := GetPage('http://www.7arte.net/cgi-bin/arquivos/search_orig.pl?letra=&proc=American+Pie');
ShowMessage(s);
end.
Works fine if I create a blank Delphi projects that downloads the page.
So there is a problem in the way that the page is downloaded, maybe an option in the TIdHTTP component (the one that does the HTTP download)