您的位置:首页技术文章
文章详情页

html - Python用beautifulsoup,find后内容不全

【字号: 日期:2022-08-14 09:41:24浏览:42作者:猪猪

问题描述

代码:

import urllibfrom urllib import requestfrom bs4 import BeautifulSoup import reurl=’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'})

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

html - Python用beautifulsoup,find后内容不全

实际的源代码是:

html - Python用beautifulsoup,find后内容不全

中间大量数据怎么提呢?

问题解答

回答1:

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

回答2:

直接再写 x.table 就拿到了

标签: Python 编程