需求分析 爬取凤凰网、网易、搜狐、今日头条。 除了今日头条,其他页面的数据都是静态的,很好爬取。 由于技术有限,对今日头条的详情页面爬取还是有点技术上的问题,待解决。 useHtmlUnit) { return Jsoup.connect(url) //模拟火狐浏览器 get(); } WebClient webClient = new WebClient(BrowserVersion.CHROME); //新建一个模拟谷歌Chrome浏览器的浏览器客户端对象 从标签中抽取信息,封装成 news HashSet<News> newsSet = new HashSet<>(); newA.forEach(a -> { 从标签中抽取基本信息,封装成 news HashSet<News> newsSet = new HashSet<>(); for (Element a : newsATags