scraper.py 오류 수정
This commit is contained in:
@@ -139,15 +139,14 @@ def fetch_overseas_news() -> List[Dict[str, str]]:
|
||||
print(f"[StockLab] Overseas news failed: {e}")
|
||||
return []
|
||||
|
||||
except Exception as e:
|
||||
print(f"[StockLab] Scraping failed: {e}")
|
||||
return []
|
||||
|
||||
def fetch_major_indices() -> Dict[str, Any]:
|
||||
"""
|
||||
KOSPI, KOSDAQ, KOSPI200 등 주요 지표 (네이버 금융 홈)
|
||||
"""
|
||||
url = "https://finance.naver.com/"
|
||||
headers = {
|
||||
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko)"
|
||||
}
|
||||
try:
|
||||
targets = [
|
||||
{"key": "KOSPI", "selector": ".kospi_area", "url": "https://finance.naver.com/"},
|
||||
|
||||
Reference in New Issue
Block a user