Answer the question
In order to leave comments, you need to log in
How to use Java to download an html page and related resources, such as images under img tags?
Downloading the page is not a problem. Used the HTTPURLConnection class. Everything downloads great. The problem is downloading resources, because they mostly have relative paths. There was an idea to parse links to resources and if they are defined through absolute or relative paths, then add the protocol + url of the parent site to them. But it's crazy long. Have a smarter idea?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question