America`s Test Kitchen

Author Message
Steve Luerman 12/30/2003 08:57 am
I am trying to grap the "recipes" off the America`s Test Kitchen website ( http://www.americastestkitchen.com ). I am a registered user of the site. With Internet Explorer, I can successfully access the recipes. But with Offline Explorer, I get the "Viewer Login" page ( http://www.americastestkitchen.com/logind.asp ). In "Options - Internet connection settings", I do have "Use Microsoft Internet Explorer cookies" selected. And I have "Options - Agent identification" set to "Microsoft Internet Explorer". In the Project Properties, I have set the "in HTML forms - User name" with my registered login id. Any suggestions on what else I need to set? Or is there something about this website that is not supported?

Thanks.
Oleg Chernavin 01/01/2004 05:34 am
Happy New Year!

I would suggest you to browse to the site logon page in Offline Explorer`s Internal browser and process with logon there. Now keep the site logged on in the Internal browser and start downloading the site with Offline Explorer. This should work well.

Best regards,
Oleg Chernavin
MP Staff
Steve 01/03/2004 10:12 pm
Happy New Year!

Thanks for the advice, but I still must be doing something wrong. I loaded "http://www.americastestkitchen.com/logind.asp" in the internal browser, entered my login, and that takes me to this page "http://www.americastestkitchen.com/logind.asp?New=1". At this point, I set this URL as the starting URL, set "level limit=2", "download all files", "load files from all servers", and "load files from all directories". After download has completed, selecting the project takes me again to the login screen. So, I opened the downloaded page file to see what it contained. It has the following "header". I`m not sure what this does, but my guess is that it always loads the login page if it doesn`t find the cookie it is looking for. All of the downloaded pages, seem to actually contain the content I`m trying to download, but browsing doesn`t work, instead I`m always presented with the login page. What am I doing wrong? Again, thanks.

Steve

Here`s the header:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<link href="verdana3.css" rel="stylesheet" type="text/css">
<title>America`s Test Kitchen</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="750" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top"><table width="750" border="0" cellspacing="0" cellpadding="0">
<tr>
<td> <table width="750" border="0" cellspacing="0" cellpadding="0">
<tr>
<td rowspan="2" valign="bottom"><a href="default.htm"><img src="images/newbanners/atkbanner_r1_c1.gif" width="577" height="132" border="0"></a></td>
<td align="right"> <SCRIPT LANGUAGE="JavaScript">
<!--//
var login=getCookie("atk");
if (!login)



{
document.write(`<a href="logind.asp"><img src="images/newbanners/atkbanner_r1_c10.gif" width=42 height=24 border=0 ></a>`);
}
else
{
document.write(`<a href="logout.htm"><img src="images/atknew/atkbannerthree_logoutbutton.gif" width=42 height=24 border=0></a>`);

}
function getCookie(name) {
var dc = document.cookie;
var prefix = name + "=";
var begin = dc.indexOf("; " + prefix);
if (begin == -1) {
begin = dc.indexOf(prefix);
if (begin != 0) return null;
} else
begin += 2;
var end = document.cookie.indexOf(";", begin);
if (end == -1)
end = dc.length;
return unescape(dc.substring(begin + prefix.length, end));
}


// -->
</SCRIPT>
Steve 01/03/2004 10:22 pm
Hi Oleg,
I looked in some of the other downloaded pages, and found they started with this:
<SCRIPT LANGUAGE="JavaScript">
<!--//

var visits = getCookie("atk");


if (!visits)


{
document.location="../logind.asp";
}





function getCookie(name) {
var dc = document.cookie;
var prefix = name + "=";
var begin = dc.indexOf("; " + prefix);
if (begin == -1) {
begin = dc.indexOf(prefix);
if (begin != 0) return null;
} else
begin += 2;
var end = document.cookie.indexOf(";", begin);
if (end == -1)
end = dc.length;
return unescape(dc.substring(begin + prefix.length, end));
}


// -->
</SCRIPT>

If I remove this SCRIPT, the page displays correctly. Is there something that I need to set in OE browser to either ignore or "trick" this script?

I suppose the worst case is that I write a post-processor to remove this script from each of the files.

Regards,
Steve
Oleg Chernavin 01/04/2004 03:17 pm
Steve,

Thank you for the details. I am sorry, but it really looks like the only way is to remove all such scripts from all downloaded files. There is no such option in Offline Explorer yet, but I will think about adding it in future.

I have one idea, but I am not sure that it will workout. If you want to try, please write me directly to support@metaproducts.com to discuss it in details.

Oleg.