您的位置:首頁技術文章
文章詳情頁

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

瀏覽:85日期:2022-08-14 09:41:24

問題描述

代碼:

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 編程
国产综合久久一区二区三区