It looks like you need http://www.seleniumhq.org/ – it can download source of the page and you can programmatically click on links and perform other interactions with the page
Also you can download web pages with Apache HTTP Client library – http://hc.apache.org/httpcomponents-client-ga/index.html
0
solved How can I auto import html from web site? [closed]