Mini web crawler

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,
I have a table in my DB with a list of URLs.
What I want to do is go to each URL and get a div tag with an ID
"ArticalTitle" and get the inner HTML of that div.

What would be the best way to do this? (I`m talking about the HTML Parsing
part, I got the DB stuff covered)

Thanks!
 
Use a Regular Expression:

(?i)(?s)id="ArticleTitle"[^>]*>([^<]*)

The InnerHtml will be in Groups[1]

--
HTH,

Kevin Spencer
Microsoft MVP

Printing Components, Email Components,
FTP Client Classes, Enhanced Data Controls, much more.
DSI PrintManager, Miradyne Component Libraries:
http://www.miradyne.net
 
Take a look at Simon Mourier's "HtmlAgilityPack". This provides XML DOM -
type XPATH access to the object model of a web page.
Peter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top