The urlresource class used by this program can be found here
Http://blog.csdn.net/laizhenhai88/article/details/7430844
Although the PS in the photo of passers-by is quite powerful, I wrote a very bad program to download it.
The idea is simple, and the program has poor versatility. First, retrieve the link addresses of the first to second phases from a Web page, and then retrieve the 50th pages to the last pages from each phase. Download the image and save it to the D: \ luren2 folder.
There is no reference program, but it can be used to download beautiful pictures. Haha.
Procedure:
1. Make sure that the D: \ luren2 folder
2. Run the program to save the image to the folder. About 3000 sheets
Import Java. util. arraylist; import Java. util. regEx. matcher; import Java. util. regEx. pattern; public class luren {public static void main (string [] ARGs) {try {// first find a link to download the address list string detail = urlresource from phase 1 to phase 2. geturldetail ("http://www.luren.cc/new_list/20120404/8056185.shtml", false); pattern Reg = pattern. compile ("<a target = \" _ blank \ "href = \" ([^ \ "] +) \"> "); matcher = reg. matcher (detail); int I = 0; ar Raylist <string> links = new arraylist <string> (); arraylist <string> links2 = new arraylist <string> (); While (matcher. find () {string q = matcher. group (1); If (Q. indexof ("new_list ")! =-1) {links. add (Q); I ++ ;}// judge the weight for (string S: links. toarray (New String [0]) {If (! Links2.contains (s) {links2.add (s); // system. out. println (s) ;}// system. out. println (links2.size (); string base = NULL; int imgnum = 1; int oldnum = 1; for (string URL: links2) {// string url = "http://www.luren.cc/new_list/20120217/46343.shtml "; base = URL. substring (0, URL. lastindexof ("/") + "/"; string d = urlresource. geturldetail (URL, true); // system. out. println (d); matcher m3 = pattern. compile ("<P style = \" Text-align: Center .? \ "> <A [^ h] * href = \" [^ \ "] + \"> "); matcher matcher2 = reg2.matcher (DM); While (matcher2.find ()) {string D2 = urlresource. geturldetail (base + matcher2.group (1), true); matcher M33 = pattern. compile ("<P style = \" text-align: Center .? \ "> <A [^ h] * href = \" [^ \ "] + \">