gary speaks wrote: > I need to be able to download just the data from the page into a text file to > parse later with a different program. I've used this syntax with other sites > and works perfect, but I've run into a program with one web site. > > Here's the site and the syntax I'm using: > WGET.EXE http://quotes.morningstar.com/fund/AAAAX/f?t=AAAAX -O AAAAX.TXT > --no-check-certificate -owebdata/logfile.txt > > This downloads the page but key data I need to see is not there. For example: > Expenses Turnover and status data is not there I know the script is using a > sub-program to produce the data but I know WGET is capable of just downloading > the output to a file, I'm just unclear what flag or option to set to make it > do it. > > I'm sure the WEB site uses a javascript to create the data and then processes > it, but isn't there a way to tell WGET to view the data and save to a file. > Basically like Video Capture Thanks
If you look at AAAAX.TXT, you will see lines like this near the bottom: loadHeader(); loadAward(); loadMorningstarTake(); Each of these are calls to a JavaScript function that in turn loads data from the Internet. I think the data you're after is retrieved by loadHeader using this URL: http://quotes.morningstar.com/fund/c-header?&t=AAAAX®ion=usa&culture=en-U S If that's what you need then retrieve that page directly with wget. If that's not what you need or if you need other bits and pieces too, explore inside AAAAX.TXT and look for ajaxSetup. The URL immediately before the call to ajaxSetup will tell you where the data is coming from and the text of the form '$("#msqt_summary)' that follows will tell you where the results are being inserted on the page. Hope that helps!
