看板 Python 關於我們 聯絡資訊
各位先進好,小弟最近看了一些爬蟲相關的影片 想說照著如法炮製,但遇到了抓取資料的問題 http://www.cnyes.com/graph/historyprice.asp 想要抓的是上面網頁每日的開高低收資料 用的是最近學到的bs4 開了google去抓,但是一直不知道開盤價下面那個數字欄位屬於哪個class 用了t10,t12好像都不對 想請版上大大指點迷津一下,謝謝 -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 111.250.201.21 ※ 文章網址: https://www.ptt.cc/bbs/Python/M.1470234057.A.BEF.html
zps: pre_p = soup.find(class_="t12", string="開盤").parent 08/03 22:50
zps: pre_p.next_sibling.find("td").string 08/03 22:50
blueandy: 謝謝 z大 我再試試 感恩 08/03 23:08
salmon12706: 工研院人工智慧課程推薦https://reurl.cc/4RDRaK 06/29 16:27