http://stackoverflow.com/questions/5882005/how-to-download-image-from-any-web-page-in-java
See
And you may then want to save the image so do:
|
|||||
|
up vote6down vote |
You are looking for a web crawler. You can use JSoup to do this, here is basic example
|
||
add a comment |
up vote5down vote |
It works for me)
|
|||
add a comment |
up vote3down vote |
If you want to save the image and you know its URL you can do this:
You will also need to handle the
|
||
add a comment |
up vote0down vote |
The following code downloads an image from a direct link to the disk into the project directory. Also note that it uses
|
时间: 2024-10-18 18:39:03