Daum에서 제공하는 코스피/코스닥 전 종목의 정보를 가져오는 코드입니다.

실행결과

[INFO|fetch_symbol_daum.py:12] 2016-09-10 10:11:33,284 > Starting to fetch stocks from daum (pid:5528)
[DEBUG|fetch_symbol_daum.py:27] 2016-09-10 10:11:33,285 > Preparing 4 tasks for event loop
[DEBUG|fetch_symbol_daum.py:57] 2016-09-10 10:11:33,286 > Fetching task
[DEBUG|fetch_symbol_daum.py:65] 2016-09-10 10:11:33,286 > Requesting http://finance.daum.net/xml/xmlallpanel.daum?stype=P&type=S
[DEBUG|fetch_symbol_daum.py:57] 2016-09-10 10:11:33,294 > Fetching task
[DEBUG|fetch_symbol_daum.py:65] 2016-09-10 10:11:33,294 > Requesting http://finance.daum.net/xml/xmlallpanel.daum?stype=Q&type=S
[DEBUG|fetch_symbol_daum.py:57] 2016-09-10 10:11:33,296 > Fetching task
[DEBUG|fetch_symbol_daum.py:65] 2016-09-10 10:11:33,296 > Requesting http://finance.daum.net/xml/xmlallpanel.daum?stype=P&type=U
[DEBUG|fetch_symbol_daum.py:57] 2016-09-10 10:11:33,299 > Fetching task
[DEBUG|fetch_symbol_daum.py:65] 2016-09-10 10:11:33,299 > Requesting http://finance.daum.net/xml/xmlallpanel.daum?stype=Q&type=U
[DEBUG|fetch_symbol_daum.py:81] 2016-09-10 10:11:33,372 > Parsing 92,007 bytes
[DEBUG|fetch_symbol_daum.py:81] 2016-09-10 10:11:33,413 > Parsing 101,119 bytes
[DEBUG|fetch_symbol_daum.py:81] 2016-09-10 10:11:33,429 > Parsing 75,204 bytes
[DEBUG|fetch_symbol_daum.py:81] 2016-09-10 10:11:33,585 > Parsing 214,035 bytes
[INFO|fetch_symbol_daum.py:31] 2016-09-10 10:11:33,614 > 2,438 stocks were parsed
{"095570": ["AJ네트웍스", "KOSPI", "서비스업"], "068400": ["AJ렌터카", "KOSPI", "서비스업"], "006840": ["AK홀딩스", "KOSPI", "서비스업"], .......................
[Finished in 0.8s]

소스코드