Skip to content

Commit f7e777a

Browse files
authored
하나은행 홈페이지 환율 크롤링
1 parent dc65169 commit f7e777a

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed

hanabank_exchange_rate.xlsx

7.26 KB
Binary file not shown.

hanabank_exchange_rate_crawling.py

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
#!/usr/bin/env python
2+
# coding: utf-8
3+
4+
# In[29]:
5+
6+
7+
get_ipython().system('pip install selenium==4.1.5')
8+
get_ipython().system('pip install webdriver_manager')
9+
10+
import selenium
11+
from selenium import webdriver
12+
from selenium.webdriver.chrome.service import Service # chromedriver 자동설치
13+
from webdriver_manager.chrome import ChromeDriverManager #chromedriver 자동설치
14+
from selenium.webdriver.common.by import By
15+
service = Service(executable_path=ChromeDriverManager().install())
16+
driver = webdriver.Chrome(service=service)
17+
18+
19+
# In[36]:
20+
21+
22+
# 인터넷 열기
23+
driver = webdriver.Chrome(service=service)
24+
25+
26+
# In[43]:
27+
28+
29+
# 원하는 사이트 접속
30+
driver.get('https://www.kebhana.com/cont/mall/mall15/mall1501/index.jsp?_menuNo=23100#//HanaBank')
31+
32+
33+
# In[46]:
34+
35+
36+
# 원하는 요소를 찾기
37+
driver.find_element(By.CLASS_NAME, "tblBasic.leftNone")
38+

0 commit comments

Comments
 (0)