Based on your vague question this is all I can offer in the way of help:
Your question is rather vague. No one will be able to write your web crawler program for you. You need to break down the programming into steps then come back to StackOverflow and ask for how to solve ONE of those steps IF you are stuck. But you need to have a good go at it yourself FIRST.
Unless you want to code your web spider (do we need another one of those?) and "data extraction" application from scratch, you probably want to learn a framework which has already solved these problems for you.
Although I don't know of any that exist, probably because the only people who do this are highly specialised web search companies and spammers. Not mainstream enough to write a framework for it but I'll bet someone smarter than me knows of someone who has actually done it.