https://www.youtube.com/watch?v=pxRQN9XzLQ0&list=PLAdQRRy4vtQREMg7H7-zFPSOYS6xF1gIL&index=29
from bs4 import BeautifulSoup
html="""
<html>
<table>
<tr>
<td class='first'>"시작가"</td>
<td>"고가"</td>
</tr>
<tr>
<td>"저가"</td>
<td>"종가"</td>
</tr>
</table>
</html>
"""
bs_obj=BeautifulSoup(html,"html.parser")
# td_first=bs_obj.find("td",{"class":"first"})
table=bs_obj.find("table")
tr=table.findAll("tr")[1]
tds=tr.findAll("td")[1].text
print(tds)
'컴퓨터 > Python' 카테고리의 다른 글
matplotlib 그래프 (0) | 2019.07.14 |
---|---|
네이버 금융 시고저종 (0) | 2019.06.24 |
여러종목 주가 가져오기-python dictionary (0) | 2019.06.23 |
네이버금융 주식종목 가격가져오기 (0) | 2019.06.23 |
naverAPI simple code (0) | 2019.06.23 |