爬虫
来源:互联网 发布:常用的几个linux命令 编辑:程序博客网 时间:2024/04/29 18:03
package cn.edu.hfut.dmic.contentextractor;
import java.io.IOException;
import org.jsoup.Connection;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
public class jsouptest {
public static void main(String[] args) throws Exception {
Connection.Response loginForm = Jsoup
.connect(
"http://www.noah-fund.com/fundtools/FundDaQuanQuery.do?method=initDaQuan")
.method(Connection.Method.GET).execute();
for(int i=1;i<134;i++){
Document document = Jsoup
.connect(
"http://www.noah-fund.com/fundtools/FundDaQuanQuery.do?method=initDaQuan")
.data("cookieexists", "false").data("pageNum", String.valueOf(i))
.cookies(loginForm.cookies()).post();
System.out.println(document);
}
}
}
import java.io.IOException;
import org.jsoup.Connection;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
public class jsouptest {
public static void main(String[] args) throws Exception {
Connection.Response loginForm = Jsoup
.connect(
"http://www.noah-fund.com/fundtools/FundDaQuanQuery.do?method=initDaQuan")
.method(Connection.Method.GET).execute();
for(int i=1;i<134;i++){
Document document = Jsoup
.connect(
"http://www.noah-fund.com/fundtools/FundDaQuanQuery.do?method=initDaQuan")
.data("cookieexists", "false").data("pageNum", String.valueOf(i))
.cookies(loginForm.cookies()).post();
System.out.println(document);
}
}
}
0 0
- 爬虫
- 爬虫
- 爬虫
- 爬虫
- 爬虫
- 爬虫
- 爬虫
- 爬虫
- 爬虫
- 爬虫
- 爬虫
- 爬虫
- 爬虫
- 爬虫
- 爬虫
- 爬虫
- 爬虫
- 爬虫
- JPA学习笔记(1)——什么是JPA
- Maven 实战系列之在Windows上安装Maven
- Postfixadmin 图文配置详解及常见错误排除
- 基本数据结构:树(tree)
- 初识电脑,踏入IT路
- 爬虫
- Python命令行参数大全
- hdu 1021 Fibonacci Again
- iostream.h和iostream 区别
- ios的AutoresizingMask
- 博客搬家啦!!!!
- 在UI线程(主线程)外实现UI更新
- hdoj 5095 Linearization of the kernel functions in SVM 【模拟】
- 解决\windows\system32\DRIVERS\nvpciflt.sys出现错误,电脑无法开机的状况