[DUG] web scraping using IHTMLDocument2

Alister Christie alister at salespartner.co.nz
Fri Jan 29 12:22:10 NZDT 2010


I'm trying to do some web page scraping using IHTMLDocument2, which is 
working fairly well and I can grab the second paragraph on a web page by 
doing something like:

p := iDoc.all.tags('P');
if p.Length >= 2 then
  result := p.Item(1).InnerText;

Where iDoc is an isnstance of IHTMLDocument2.

However say there there is an HTML element like

<div class="propertyInfo">Price: <span>Negotiation</span></div>

How would I be able to find the divs where class="propertyInfo"? (if 
anyone has much experience with IHTMLDocument2)

-- 
Alister Christie
Computers for People
Ph: 04 471 1849 Fax: 04 471 1266
http://www.salespartner.co.nz
PO Box 13085
Johnsonville
Wellington 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listserver.123.net.nz/pipermail/delphi/attachments/20100129/3612fb76/attachment.html 


More information about the Delphi mailing list