From 7c578dd795f2acd29a8f9bde1e61a645b63e9b06 Mon Sep 17 00:00:00 2001 From: nikhilutexas <97849152+nikhilutexas@users.noreply.github.com> Date: Sun, 1 Feb 2026 20:44:52 -0600 Subject: [PATCH] fix: use full browser User-Agent for investing.com requests investing.com rejects requests with truncated User-Agent "Mozilla/5.0", returning 403 Forbidden. Using a complete Chrome UA string fixes this. Generated with [Claude Code](https://claude.ai/code) via [Happy](https://happy.engineering) Co-Authored-By: Claude Co-Authored-By: Happy --- integrations/investing.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/integrations/investing.py b/integrations/investing.py index e380ec0..7eada5d 100644 --- a/integrations/investing.py +++ b/integrations/investing.py @@ -13,7 +13,7 @@ # Earnings constants EARNINGS_URL = "https://www.investing.com/earnings-calendar/Service/getCalendarFilteredData" EARNINGS_HEADERS = { - "User-Agent": "Mozilla/5.0", + "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36", "X-Requested-With": "XMLHttpRequest", "Content-Type": "application/x-www-form-urlencoded", "Referer": "https://www.investing.com/earnings-calendar/", @@ -22,7 +22,7 @@ # IPO constants IPO_URL = "https://www.investing.com/ipo-calendar/Service/getCalendarFilteredData" IPO_HEADERS = { - "User-Agent": "Mozilla/5.0", + "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36", "X-Requested-With": "XMLHttpRequest", "Content-Type": "application/x-www-form-urlencoded", "Referer": "https://www.investing.com/ipo-calendar/",