public static void setImagesDomain1() throws DocumentException, IOException{
String str="D:/4.24/T00385101.html";
org.jsoup.nodes.Document doc = Jsoup.parse(new File(str), "utf-8");
Elements srcs = doc.select("link");
for (Element element : srcs) {
if (element.attr("href")!=null) {
element.attr("href","aaaaaaaa");
System.out.println(element.attr("href"));
}
}
//搞了大半天,就糾結了這句話
FileOutputStream fos = new FileOutputStream("D:/"+new File(str).getName(), true);
fos.write(doc.toString().getBytes());
fos.close();
}