Hello.
I am attempting to write a "scraper" to download information from a
commercial web site. Oddly enough, they don't want to make this easy for me!
Their pages include plenty of Javascript, and more than a few redirects.
One that is stumping me is a small page that includes a document object
redirect in the <body> tag's onload() event. Like this:
<body
onload='javascr ipt:document.lo cation.replace(http://www.new_domain_goes_here.org);
The redirect does not work.
There are two <script> blocks located after the closing </HTML> tag. The
first block sets some variables. The second block inserts a .JS file
containing some _very_ convoluted Javascript code which uses some of the
variables from the first script block.
My question is:
Since this scripting is located outside of the HTML document, would the
browser run these scripts before the document onload() event is executed? If
this is the case, then perhaps this code is overriding the onload() event or
rewriting it in some way.
Thanks
-Mark