fix: correct pykrx ETF module import path and method call
All checks were successful
Deploy to Production / deploy (push) Successful in 1m42s
All checks were successful
Deploy to Production / deploy (push) Successful in 1m42s
The pykrx library uses 'etx' not 'etf' as the module directory name, and fetch() is the proper method that returns a DataFrame. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
4261e9c777
commit
8b9fe7064c
@ -4,7 +4,7 @@ ETF master data collector from KRX.
|
||||
import logging
|
||||
|
||||
import pandas as pd
|
||||
from pykrx.website.krx.etf.core import ETF_전종목기본종목
|
||||
from pykrx.website.krx.etx.core import ETF_전종목기본종목
|
||||
|
||||
from sqlalchemy.orm import Session
|
||||
from sqlalchemy.dialects.postgresql import insert
|
||||
@ -42,7 +42,7 @@ class ETFCollector(BaseCollector):
|
||||
|
||||
def collect(self) -> int:
|
||||
"""Collect ETF master data."""
|
||||
df = ETF_전종목기본종목().read()
|
||||
df = ETF_전종목기본종목().fetch()
|
||||
|
||||
if df.empty:
|
||||
logger.warning("No ETF data returned from KRX.")
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user