jsonp解析 html
生活随笔
收集整理的這篇文章主要介紹了
jsonp解析 html
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
https://jsoup.org/cookbook/ ?官網的教程, 很詳細!
?
<dependency><groupId>org.jsoup</groupId><artifactId>jsoup</artifactId><version>1.8.3</version></dependency> /*** 獲取html里 的img標簽* @param htmlStr* @return*/public static List<String> getImgSrc(String htmlStr) {List<String> pics = new ArrayList<String>();if(StringUtils.isEmpty(htmlStr)){return pics;}Document doc = Jsoup.parse(htmlStr);Elements imgs = doc.getElementsByTag("img");for (Element img : imgs){pics.add(img.attr("src"));}return pics;}?
轉載于:https://www.cnblogs.com/lishupeng/p/5913237.html
總結
以上是生活随笔為你收集整理的jsonp解析 html的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: [转] C# Winform 拦截关闭按
- 下一篇: [Angular2 Form] Styl