Page 1 of 1
Problem with script for www.7arte.net
Posted: 2003-01-22 23:46:02
by Yorgul
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.
Posted: 2003-01-23 08:48:51
by antp
That's
very strange
This evening I will try to find why it happens...
I made few tests here but since I am not at home I do not have the source code of the program to do more
Posted: 2003-01-23 09:30:28
by Yorgul
Thank you for your prompt reply.
I'll be waiting for your findings.
Posted: 2003-01-23 15:29:22
by Yorgul
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));
Posted: 2003-01-23 16:56:09
by antp
It is easy to test:
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.
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)
Posted: 2003-01-23 17:42:27
by Yorgul
So, if it can be corrected, only on next release, right?
Posted: 2003-01-23 18:56:43
by antp
I guess it is a small bug, so when I'll find it I will update the program without changing its version, like most of the bug corrections.
I will probably see that on friday evening, and if I find a solution I'll upload the update on friday night or on saturday
Posted: 2003-01-24 00:03:51
by Yorgul
I'll be waiting, then.
Thanks for checking into it.
Take care
Posted: 2003-01-24 17:14:34
by antp
I really do not know why it does not work.
Seems to be a problem in the TIdHTTP component (from Indy Library).
I will try to find what's the problem. It works fine with an old version, but I won't use an old version only for that, since the new version solved other problems.