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/"},