日韩无码专区无码一级三级片|91人人爱网站中日韩无码电影|厨房大战丰满熟妇|AV高清无码在线免费观看|另类AV日韩少妇熟女|中文日本大黄一级黄色片|色情在线视频免费|亚洲成人特黄a片|黄片wwwav色图欧美|欧亚乱色一区二区三区

RELATEED CONSULTING
相關咨詢
選擇下列產品馬上在線溝通
服務時間:8:30-17:00
你可能遇到了下面的問題
關閉右側工具欄

新聞中心

這里有您想知道的互聯網營銷解決方案
Jsuop進行鏈接提取
 
 
  1. // 檢索WebContent中的圖片和附件 
  2.  Document doc = Jsoup.parse(info.getWebc().getWebContent()); 
  3.  // 當前頁中的圖片 
  4.  Elements srcLinks = doc.select("img[src]"); 
  5.  String imagesPath = ""; 
  6.  for (Element link : srcLinks) { 
  7.  // 剔除標簽,只剩鏈接路徑 
  8.  String imagesPaths = link.attr("src"); 
  9.  String ht = imagesPaths.substring(0, 4); 
  10.  String htt = imagesPaths.substring(0, 1); 
  11.  if (!ht.equals("http") && htt.equals("/")) { 
  12.  imagesPath = imagesPaths.trim().replaceAll(ContextPath, ""); 
  13.  imagesPath = imagesPath.substring(imagesPath.lastIndexOf("/") + 1); 
  14.  } else { 
  15.  imagesPath = ""; 
  16.  } 
  17.  //System.out.println("---導入WebContent中的圖片---" + imagesPath); 
  18.  if (!imagesPath.equals("")) { 
  19.  importCopy("/html/"+strSiteID+"/"+strColumnID+"/"+keyID+"/"+imagesPath, path, strInfoID,"/html/"+strSiteID+"/"+strColumnID+"/"+keyID+"/"); 
  20.  } 
  21.  } 
  22.  // 提取所有的href連接 
  23.  String filePaths = ""; 
  24.  Elements linehrefs = doc.select("a[href]"); 
  25.  for (Element link : linehrefs) { 
  26.  filePaths = link.attr("href").trim().replaceAll(ContextPath, ""); 
  27.  filePaths = filePaths.substring(filePaths.lastIndexOf("/") + 1); 
  28.  //System.out.println("---導入WebContent中的文件---" + filePaths); 
  29.  if (!filePaths.equals("")) { 
  30.  importCopy("/html/"+strSiteID+"/"+strColumnID+"/"+keyID+"/"+filePaths, path, strInfoID,"/html/"+strSiteID+"/"+strColumnID+"/"+keyID+"/"); 
  31.  } 
  32.  } 

 【本文是專欄作者張勇波的原創(chuàng)文章,轉載請通過獲取作者授權】

創(chuàng)新互聯-專業(yè)網站定制、快速模板網站建設、高性價比洮北網站開發(fā)、企業(yè)建站全套包干低至880元,成熟完善的模板庫,直接使用。一站式洮北網站制作公司更省心,省錢,快速模板網站建設找我們,業(yè)務覆蓋洮北地區(qū)。費用合理售后完善,10年實體公司更值得信賴。


當前文章:Jsuop進行鏈接提取
文章鏈接:http://m.5511xx.com/article/djisggd.html