Skip to content

Commit 46cb904

Browse files
authored
[BugFix] Update get_user_agent Utility With Modern User Agent Strings (#7398)
* update get_user_agent utility with modern user agent strings and add explicit headers to svensson_yield_curve * no need to add step in svensson_yield_curve * remove the comment that is breaking codespell for some reason
1 parent 19f51d9 commit 46cb904

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

desktop/src/routes/api-keys.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ export default function ApiKeysPage() {
129129

130130
if (newKeys.length > 0) {
131131
setImportedKeys(newKeys);
132-
setSelectedKeys(new Set(newKeys.map((k) => k.key))); // Pre-select all
132+
setSelectedKeys(new Set(newKeys.map((k) => k.key)));
133133
setIsImportConfirmModalOpen(true);
134134
} else {
135135
setError("No new keys found in the imported file.");

openbb_platform/core/openbb_core/provider/utils/client.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@ def obfuscate(params: CIMultiDict[str] | MultiDict[str]) -> dict[str, Any]:
2626
def get_user_agent() -> str:
2727
"""Get a not very random user agent."""
2828
user_agent_strings = [
29-
"Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.10; rv:86.1) Gecko/20100101 Firefox/86.1",
30-
"Mozilla/5.0 (Windows NT 6.1; WOW64; rv:86.1) Gecko/20100101 Firefox/86.1",
31-
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:82.1) Gecko/20100101 Firefox/82.1",
32-
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:86.0) Gecko/20100101 Firefox/86.0",
33-
"Mozilla/5.0 (Windows NT 10.0; WOW64; rv:86.0) Gecko/20100101 Firefox/86.0",
34-
"Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.10; rv:83.0) Gecko/20100101 Firefox/83.0",
35-
"Mozilla/5.0 (Windows NT 6.1; WOW64; rv:84.0) Gecko/20100101 Firefox/84.0",
29+
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36", # noqa: E501 # pylint: disable=line-too-long
30+
"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", # noqa: E501 # pylint: disable=line-too-long
31+
"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:133.0) Gecko/20100101 Firefox/133.0", # noqa: E501 # pylint: disable=line-too-long
32+
"Mozilla/5.0 (Macintosh; Intel Mac OS X 14.7; rv:133.0) Gecko/20100101 Firefox/133.0", # noqa: E501 # pylint: disable=line-too-long
33+
"Mozilla/5.0 (Macintosh; Intel Mac OS X 14_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.2 Safari/605.1.15", # noqa: E501 # pylint: disable=line-too-long
34+
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 Edg/131.0.0.0", # noqa: E501 # pylint: disable=line-too-long
35+
"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36", # noqa: E501 # pylint: disable=line-too-long
3636
]
3737

3838
return random.choice(user_agent_strings) # nosec # noqa: S311

0 commit comments

Comments
 (0)