ANTBE can help me? timeout in script...

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
gnbusetto
Posts: 18
Joined: 2007-10-04 12:01:23

ANTBE can help me? timeout in script...

Post by gnbusetto »

I re-write Legrad's script 'DVDMOVIES'
and it's now working fine...
exept...
When you connect to search first time 'connection erro' shows.
Re-search again, and voilá, all it's OK!!!!

Maybe it´s a cokie?
or what else'

Can help me?
thank a lot.
antp
Site Admin
Posts: 9639
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post by antp »

Maybe there is a variable that is not initialized.
Try to check value of the variables that you give to GetPage function.
bad4u
Posts: 1148
Joined: 2006-12-11 22:54:46

Post by bad4u »

On the first run it loads the intro page instead of the search page. You can see this behaviour when you open a new browser window and try to load the search page (http://www.dvdmovies.com.ar/ventas/peli ... anzado.php) in the browser. Same happens when the browser within AMC loads the page.

You will need to find a different link for the search that loads the correct page or maybe there is another way using Getpage2 (with a referrer page) ? I did not use GetPage2 yet - I just played around with it earlier, but still not sure about how it works. Maybe Antoine can give an example ? ;)
antp
Site Admin
Posts: 9639
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post by antp »

GetPage(Address)
becomes
GetPage2(Address, 'http://www.dvdmovies.com.ar/');
But as referrer is never used with GetPage, it should not work better on 2nd time. So I still wonder what it is. Maybe a cookie, but I thought that they were not handled automatically.
bad4u
Posts: 1148
Joined: 2006-12-11 22:54:46

Post by bad4u »

Maybe I'll have a closer look on it the next days.

For now I have a simple workaround - you only have to load the intro page before loading the search page.
Use

Code: Select all

strPage := GetPage('http://www.dvdmovies.com.ar');
strPage := GetPage(Address);

instead of

Code: Select all

strPage := GetPage(Address);
Btw.. you can delete

Code: Select all

if(GetOption('Sin resultado') = 0) then Input('DVDmovies', 'Buscar:', MovieName);
as you have not initialized any options on script properties.
Post Reply