Page 1 of 1
Web with register
Posted: 2014-03-02 16:24:57
by raulsara
Hello;
I've a problem with the web to extract Pictures
www.covercaratulas.com, i've developed a new script but on the last page, tells me i must be registered. So i can't Get Picture because it doesn't show me the page with the picture. Pleasse what can i do, i don't know who can i register with the script. My nick web coveratula.com is raulsara and the password antmovie
Maybe i have to add the user / password in the url. I don't know.
Pleasse help me.
Thanks
Posted: 2014-03-02 18:30:38
by J
hm, looks like you need to send a cookie when you try to dl a picture. You can try the cookie you got from the site when you first login with your browser.
Use GetPage3 instead of GetPage
Code: Select all
function GetPage3(address: string; referer: string; cookies: string): string;
Same as GetPage2, but allows to specify cookies as a string: 'uid=120; pwd=FHNHESW' for example.
for example the site set the cookie:
Server:
www.covercaratulas.com
Name: usuario
Value: MzYwMzY2OnJhdWxzYXJhOjZhNTUzOWQ1MDU2OTRiNDlkMTZiNzgzMjgyM2YzOGQ3
end date: 2014-11-19
Posted: 2014-03-02 23:22:44
by raulsara
Ok J, tomorrow I'll try and tell you something.
Thanks
Posted: 2014-03-03 15:01:55
by raulsara
Hi J:
I tried to do what you tell me and it doesn't work me.
Could you help me?.
My user in the web
www.covercaratulas.com is 'raulsara' and the password is 'antmovie'.
Getpage3 (pageweb , ? , ?);
I've tried several ways but it does not work me
Thanks
Posted: 2014-03-03 22:09:51
by antp
From what he posted, the cookie would be
'usuario=MzYwMzY2OnJhdWxzYXJhOjZhNTUzOWQ1MDU2OTRiNDlkMTZiNzgzMjgyM2YzOGQ3'
The refered parameter is the "previous page" (the address of the page you loaded before, e.g. the main page or the movie page url)
Posted: 2014-03-03 22:56:39
by J
hi, a bit of a mess with this site

but the magic part is:
Code: Select all
page := GetPage3(address,'','usuario=MzYwMzY2OnJhdWxzYXJhOjZhNTUzOWQ1MDU2OTRiNDlkMTZiNzgzMjgyM2YzOGQ3');
well, it´s a four step path to get to the picture, but perhaps you find a shortcut.
movie:
http://www.covercaratulas.com/El_poder_ ... 35614.html
firstpic:
http://www.covercaratulas.com/caratula- ... 21314.html
picpage:
http://www.covercaratulas.com/caratula/ ... r_Peppito/
picture:
http://www.covercaratulas.com/ode2/cart ... EPPITO.jpg
I wrote little demo prog. with an example movie to test:
Code: Select all
program cookietest;
uses
StringUtils1;
var
address: string;
page: string;
begin
address := 'http://www.covercaratulas.com/caratula-carteles-Paranoia__2013__V2-21314.html';
page := GetPage3(address,'','usuario=MzYwMzY2OnJhdWxzYXJhOjZhNTUzOWQ1MDU2OTRiNDlkMTZiNzgzMjgyM2YzOGQ3');
address := 'http://www.covercaratulas.com/' + TextBetween(page, 'Visualizar: <a href="', '"');
ShowMessage (address);
page := GetPage3(address,'','usuario=MzYwMzY2OnJhdWxzYXJhOjZhNTUzOWQ1MDU2OTRiNDlkMTZiNzgzMjgyM2YzOGQ3');
ShowMessage (page);
address := TextBetween(page, 'src="http://', '"');
ShowMessage (address);
GetPicture('http://' + address);
end.
hope this is the right picture

Posted: 2014-03-04 08:40:53
by raulsara
Hi J:
Tonight I'll prove it well but I've done a little test and I think it works well !!!.
The script I got it done just me missing the last access to the image.
Thank you very much, I didn't know how to finish the script.
Tonight I'll prove it right and i'll say something.
Thank you very much :grinking: :grinking: :)
Posted: 2014-03-05 17:11:45
by raulsara
HI J
I tried your solution and it works great. Now I can finish the script.
Thank you very much

Posted: 2014-03-08 17:21:12
by raulsara
Hi "J", I have a problem with the script. If you are using the ShowMessage then it works fine but when you take away the showmessages sometimes goes well and other times I do not read web page. I've tried everything but I have not managed to make it works. Is random, when there is ShowMessage it works but when ther isn't showmessage is randon. Please could you help me.
Thanks
Posted: 2014-03-08 17:28:33
by antp
Maybe it is because the script goes too fast ?
Instead of the showmessage, try to put a call to "sleep" (I think it is that, check the help file) to wait for one or two seconds for example.
Posted: 2014-03-08 17:32:44
by raulsara
Hi Antp, thanks. I will try it.
Posted: 2014-03-08 17:43:42
by J
hm, that sounds really strange.
The ShowMessage(s) are only good for debugging to see how it works, so there is absolutely no need for them for the final script functionality itself.
Are you sure that you have nothing else changed? What is the exact error you get back? What do you get back when the error occurs - just an empty page or a different content?
How many GetPage do you send per movie?
Maybe the script is sometimes too fast, or there is a timer or something. I for example had sometimes connection problems with IMDB server when doing a script in batch mode for hundreds or thousands of movies.
To be honest, without testing I have no clue what the problem comes from.
Posted: 2014-03-08 18:08:32
by raulsara
Hi antp and J. I put ' Sleep 40000' after getpage3 and it seems to work fine. I'll keep testing it but I think it works.
Thanks again.

Posted: 2014-03-09 09:59:06
by antp
40000 ? That makes 40 seconds, seems a lot (or you mean 4000 ?)
Posted: 2014-03-09 15:42:42
by raulsara
I'm sorry antp, i mean 4000.
Thanks