关于java 爬虫问题 数据总是爬的很奇怪

这是源代码。

URL url = new URL("http://quote.eastmoney.com/center/list.html#28003629_0_2");
BufferedReader bufin = new BufferedReader(new InputStreamReader(url.openStream()));
String line = null;
//创建规则
Pattern p = Pattern.compile("[0-9]+\.[0-9]+");
Matcher m = null;
//弄个存的list
List list = new ArrayList();
while((line = bufin.readLine())!=null){
m = p.matcher(line);
while(m.find()){
list.add(m.group());
}
}
for(String s : list){
System.out.println(s);
}

这是结果
1.0
2.0
2.0
4.0
2.5
12.1
12.1
12.1
12.1
12.1
12.2
12.2
14.1
14.1
14.1
14.2
14.2
14.3
14.3
24.1
24.1
24.1
24.2
24.2
24.3
24.3
2.0
2.0
2.0
2.0
2.0
2.0
2.0
1.0
0.25

这是目的网页
http://quote.eastmoney.com/center/list.html#28003629_0_2
原网页里可能上百个数字,,为什么我只爬出来这么几个,,刚才爬贴吧的帖子内的邮箱账户字段 。也爬不出来 室友说 可能有保护政策

看看你的正则表达式规则是否有漏了数据。然后就是服务器有做反扒虫,只返回部分数据给你

 while((line = bufin.readLine())!=null){
m = p.matcher(line);
while(m.find()){
list.add(m.group());
}
}

这个地方先输出line试试,先不要用正则表达式过滤.

服务器有做反扒虫,可能只返回某些数据

建议你在做请求的时候在http头中加上浏览器信息

仔细看看你写的爬虫的逻辑