timeout 5초 추가

This commit is contained in:
dosang.yoon
2022-06-03 12:28:58 +09:00
parent c5848ebadc
commit 5774a6eaf0
8 changed files with 87 additions and 34 deletions

View File

@@ -10,7 +10,7 @@ class FnGuideCrawler:
def getStockInfo(self):
#code_df = pd.read_html('http://kind.krx.co.kr/corpgeneral/corpList.do?method=download&searchType=13', header=0)[0]
code_df = pd.read_html(requests.get('http://kind.krx.co.kr/corpgeneral/corpList.do?method=download&searchType=13', headers=self.header).text)[0]
code_df = pd.read_html(requests.get('http://kind.krx.co.kr/corpgeneral/corpList.do?method=download&searchType=13', headers=self.header, timeout=5).text)[0]
# code_df = pd.read_excel('../resources/stock/상장법인목록.xls')
# 종목코드가 6자리이기 때문에 6자리를 맞춰주기 위해 설정해줌