Problem with script for www.7arte.net

If you made a script you can offer it to the others here, or ask help to improve it. You can also report here bugs & problems with existing scripts.
Post Reply
Yorgul
Posts: 13
Joined: 2003-01-22 23:26:26

Problem with script for www.7arte.net

Post 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.
antp
Site Admin
Posts: 9639
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post by antp »

That's very strange :shocked:
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 :/
Yorgul
Posts: 13
Joined: 2003-01-22 23:26:26

Post by Yorgul »

Thank you for your prompt reply.
I'll be waiting for your findings.
Yorgul
Posts: 13
Joined: 2003-01-22 23:26:26

Post by Yorgul »

Just to check if I'm doing anything wrong... :ha:

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));
antp
Site Admin
Posts: 9639
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post 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)
Yorgul
Posts: 13
Joined: 2003-01-22 23:26:26

Post by Yorgul »

So, if it can be corrected, only on next release, right?
antp
Site Admin
Posts: 9639
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post 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 ;)
Yorgul
Posts: 13
Joined: 2003-01-22 23:26:26

Post by Yorgul »

I'll be waiting, then.
Thanks for checking into it.

Take care
antp
Site Admin
Posts: 9639
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post 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.
Post Reply