From dce6b3e69268d42f9495253aa820ccaa5b1083fd Mon Sep 17 00:00:00 2001 From: gahusb Date: Mon, 26 Jan 2026 03:48:51 +0900 Subject: [PATCH] =?UTF-8?q?scraper.py=20=EC=98=A4=EB=A5=98=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- stock-lab/app/scraper.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/stock-lab/app/scraper.py b/stock-lab/app/scraper.py index 8c45ecc..ec8d6e6 100644 --- a/stock-lab/app/scraper.py +++ b/stock-lab/app/scraper.py @@ -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/"},