로딩
요청 처리 중입니다...

[ Python ] BeautifulSoup 이용하여, 네이버의 환율정보 가져오기. ( 소스코드 )

 [ Python ] BeautifulSoup 이용하여, 네이버의 환율정보 가져오기. ( 소스코드 )

Python [ Python ] BeautifulSoup 이용하여, 네이버의 환율정보 가져오기. ( 소스코드 ) 사진찍는 개발자 2018. 2. 19. 12:36 이웃추가 본문 기타 기능 http://finance.naver.com/marketindex/ 의 원 달러 환율 정보를 가져와 보겠습니다. from bs4 import BeautifulSoup import urllib.request as req # HTML 가져오기 url = "http://finance.naver.com/marketindex/" res = req.urlopen(url) # HTML 분석하기 soup = BeautifulSoup(res, "html.parser") #원하는 데이터 추출하기 price = soup.select_one("div.head_info > span.value").string print("usd/krw = ",price) 결과 화면...

# BeautifulSoup # BS4 # Python # 소스코드 # 크롤링 # 파이썬