Get all Images from WebPage Program | Java
问题 Currently I need a program that given a URL, returns a list of all the images on the webpage. ie: logo.png gallery1.jpg test.gif Is there any open source software available before I try and code something? Language should be java. Thanks Philip 回答1: HtmlUnit has HtmlPage.getElementsByTagName("img"), which will probably suit you. (read the short Get started guide to see how to obtain the correct HtmlPage object) 回答2: Just use a simple HTML parser, like jTidy, and then get all elements by tag