Fetch complete web page using java code

前端 未结 3 2016
予麋鹿
予麋鹿 2021-01-06 03:33

I want to implement a java method which takes URL as input and stores the entire webpage including css, images, js (all related resources) on my disk. I have used Jsoup html

3条回答
  •  [愿得一人]
    2021-01-06 04:28

    I have encountered the similar problem before couple of years where we have used exactly the same mechanism which you are planing. parse the html content and convert relative path to absolute path and also we have used multiple threads to run simultaneously and retrieve images, java script etc for performance optimization. I don't know it should done as we did or not but at the end it works for us.:-)

提交回复
热议问题