in reply to extract data from website

Could you give the URL of (one of) the page(s) you are trying to extract data from? It would help us to give you some useful pointers how to tackle this problem.

CountZero

A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James