html - Python用beautifulsoup,find后内容不全
PHP中文网
PHP中文网 2017-04-18 10:30:04
0
2
827

代码:

import urllib
from urllib import request
from bs4 import BeautifulSoup 
import re

url='http://quote.eastmoney.com/center/BKList.html#notion_0_0?sortRule=0'
html=urllib.request.urlopen(url).read()
html=html.decode("GBK")

soup=BeautifulSoup(html)

x=soup.find_all("p",{"class":"mod-datas"})

但是只显示了标签没有内容。。

实际的源代码是:

中间大量数据怎么提呢?

PHP中文网
PHP中文网

认证高级PHP讲师

全部回复(2)
小葫芦

参考http://www.cnblogs.com/goosee...

刘奇

直接再写 x.table 就拿到了

热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责声明 Sitemap
PHP中文网:公益在线PHP培训,帮助PHP学习者快速成长!