main.java
import java.util.ArrayList;
public class Main {
public static void main(String[] args) {
// 定义即将访问的链接
String url = "http://www.zhihu.com/explore/recommendations";
// 访问链接并获取页面内容
String content = Spider.SendGet(url);
// 获取编辑推荐
ArrayList<Zhihu> myZhihu = Spider.GetRecommendations(content);
// 打印结果
System.out.println(myZhihu);
}
}以上就是抓取知乎答案的全部记录,更多相关内容请关注PHP中文网(www.php.cn)!
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号