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

代码:

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學習者快速成長!