Commit e30d8b32 by win 10

去除新浪财经头条历史文章数据的cookie

parent 95287efd
......@@ -18,19 +18,19 @@ import com.zhiwei.tools.timeparse.TimeParse;
import okhttp3.Response;
public class WeiBoCaiJing {
public class XinLangCaiJing {
private WeiBoCaiJing() {
throw new IllegalStateException("WeiBoCaiJing class");
private XinLangCaiJing() {
throw new IllegalStateException("XinLangCaiJing class");
}
private static Logger logger = LoggerFactory.getLogger(WeiBoCaiJing.class);
private static Logger logger = LoggerFactory.getLogger(XinLangCaiJing.class);
private static HttpBoot httpBoot = new HttpBoot.Builder().retryTimes(2).build();
public static List<Map<String, Object>> getWeiBoCaiJingHistory(String uid, String startTime, ProxyHolder proxy, String cookie) {
public static List<Map<String, Object>> getXinLangCaiJingHistory(String uid, String startTime, ProxyHolder proxy) {
List<Map<String, Object>> dataList = new ArrayList<Map<String,Object>>();
int page = 1;//从第一页开始
int page = 1;
boolean nextPage = true;//是否有下一页
while(nextPage) {
String jsonUrl = "https://cj.sina.com.cn/k/api/article/lists_by_author?uid=" + uid + "&page=" + page + "&count=20";
......@@ -78,9 +78,8 @@ public class WeiBoCaiJing {
}else {
nextPage = false;
}
} catch (Exception e) {
logger.error("获取微博财经头条数据失败 {}", e);
logger.error("获取新浪财经头条数据失败 {}", e);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment