Jsoup+FastJson制作新闻数据接口-Demo
经常用到 编写出来直接拿来用 这个适合在服务端结合servlet来做接口:需要下载jsoup+fastjson两个包 Jsoup使用手册:http://www.open-open.com/jsoup/selector-syntax.htm fastJson使用手册:https://www.w3cschool.cn/fastjson/fastjson-ex2.html 在这里我就不重复写了,看官方API最靠谱! package com.zyzpp.jsoup; import java.io.IOException; import java.util.ArrayList; import java.util.List; import org.jsoup.Jsoup; import org.jsoup.nodes.Document; import org.jsoup.nodes.Element; import org.jsoup.select.Elements; import com.alibaba.fastjson.JSON; public class JsoupTest { /** * J...