C
chris_j_adams
Hi,
I'm slowly discovering the world of JavaScript, so I'm not sure I'm
attacking this problem in the right manner, thus if I'm in the wrong
newsgroup, my apologies.
What I'm trying to do is extract some news items from a web site. To
do this, I'm using Microsoft Word VBA and using the following bit of
script:
'// Open web site
IeApp.Navigate
"http://www.radioaustralia.net.au/francais/stories/s1776501.htm"
Do: Loop Until IeApp.ReadyState = READYSTATE_COMPLETE
'// Find text to extract
txtTitle = IeApp.Document.GetElementByID("a2title").innerhtml
txt = IeApp.Document.GetElementByID("a2copy").innerhtml
When extracting the text (ie. "txt") I seem to get more than just the
text of the body that I'm after, and the resulting junk is difficult to
remove. I've looked at the object model but not real sure what I
should be looking for, so wondering if anyone here can spare a bit of
time to provide a pointer. For example, is there a tag that would more
easily refer to the required text?
Many thanks in advance if you can share some advice or guidance.
Regards,
Chris Adams
I'm slowly discovering the world of JavaScript, so I'm not sure I'm
attacking this problem in the right manner, thus if I'm in the wrong
newsgroup, my apologies.
What I'm trying to do is extract some news items from a web site. To
do this, I'm using Microsoft Word VBA and using the following bit of
script:
'// Open web site
IeApp.Navigate
"http://www.radioaustralia.net.au/francais/stories/s1776501.htm"
Do: Loop Until IeApp.ReadyState = READYSTATE_COMPLETE
'// Find text to extract
txtTitle = IeApp.Document.GetElementByID("a2title").innerhtml
txt = IeApp.Document.GetElementByID("a2copy").innerhtml
When extracting the text (ie. "txt") I seem to get more than just the
text of the body that I'm after, and the resulting junk is difficult to
remove. I've looked at the object model but not real sure what I
should be looking for, so wondering if anyone here can spare a bit of
time to provide a pointer. For example, is there a tag that would more
easily refer to the required text?
Many thanks in advance if you can share some advice or guidance.
Regards,
Chris Adams