Skip to content

Conversation

@nikhilutexas
Copy link
Contributor

@nikhilutexas nikhilutexas commented Feb 2, 2026

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 via Happy


Note

Low Risk
Low risk: only adjusts outbound request headers to a third-party service; main risk is potential fragility if Investing.com changes UA requirements.

Overview
Updates the Investing.com earnings/IPO calendar HTTP request headers to send a full Chrome browser User-Agent string (instead of a truncated Mozilla/5.0) to avoid 403 Forbidden responses when fetching calendar data.

Written by Cursor Bugbot for commit 7c578dd. This will update automatically on new commits. Configure here.

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 <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
@nikhilutexas nikhilutexas merged commit c23415b into Sync2Cal:main Feb 2, 2026
2 checks passed
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

This is the final PR Bugbot will review for you during this billing cycle

Your free Bugbot reviews will reset on March 6

Details

You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

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",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicate User-Agent string should be extracted to constant

Low Severity

The same 128-character User-Agent string is duplicated verbatim in EARNINGS_HEADERS (line 16) and IPO_HEADERS (line 25). Extract this to a single constant like CHROME_USER_AGENT and reference it in both header dictionaries.

Fix in Cursor Fix in Web

@nikhilutexas nikhilutexas deleted the fix/investing-user-agent branch February 2, 2026 02:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant