Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid cookie for https://finance.yahoo.com/quote/%5EGSPC/options #176

Open
enkara opened this issue Apr 18, 2021 · 3 comments
Open

Invalid cookie for https://finance.yahoo.com/quote/%5EGSPC/options #176

enkara opened this issue Apr 18, 2021 · 3 comments

Comments

@enkara
Copy link

enkara commented Apr 18, 2021

Recently I got those messeages when downloading some data.

Apr. 18, 2021 11:16:37 AM java.net.CookieManager put
SEVERE: Invalid cookie for https://finance.yahoo.com/quote/%5EGSPC/options: $Domain=DELETE; Expires=Sun, 18 Apr 2021 09:06:36 GMT; Max-Age=0; Domain=yahoo.com; Path=; Secure; HttpOnly
Apr. 18, 2021 11:16:37 AM java.net.CookieManager put
SEVERE: Invalid cookie for https://finance.yahoo.com/quote/%5EGSPC/options: $Domain=DELETE; Expires=Sun, 18 Apr 2021 09:06:36 GMT; Max-Age=0; Domain=finance.yahoo.com; Path=; Secure; HttpOnly

Has anyone an idea what the cause might be and how to solve this issue?
Thanks!

@code-monkey-101
Copy link

Same here:

Jul 04, 2021 4:36:17 PM java.net.CookieManager put
SEVERE: Invalid cookie for https://finance.yahoo.com/quote/%5EGSPC/options: $Domain=DELETE; Expires=Sun, 4 Jul 2021 14:26:22 GMT; Max-Age=0; Domain=yahoo.com; Path=; Secure; HttpOnly
Jul 04, 2021 4:36:17 PM java.net.CookieManager put
SEVERE: Invalid cookie for https://finance.yahoo.com/quote/%5EGSPC/options: $Domain=DELETE; Expires=Sun, 4 Jul 2021 14:26:22 GMT; Max-Age=0; Domain=finance.yahoo.com; Path=; Secure; HttpOnly
Jul 04, 2021 4:36:17 PM java.net.CookieManager put
SEVERE: Invalid cookie for https://finance.yahoo.com/quote/%5EGSPC/options: $Path=DELETE; Expires=Sun, 4 Jul 2021 14:26:22 GMT; Max-Age=0; Domain=yahoo.com; Path=; Secure; HttpOnly
Jul 04, 2021 4:36:17 PM java.net.CookieManager put
SEVERE: Invalid cookie for https://finance.yahoo.com/quote/%5EGSPC/options: $Path=DELETE; Expires=Sun, 4 Jul 2021 14:26:22 GMT; Max-Age=0; Domain=finance.yahoo.com; Path=; Secure; HttpOnly
Jul 04, 2021 4:36:17 PM java.net.CookieManager put
SEVERE: Invalid cookie for https://finance.yahoo.com/quote/%5EGSPC/options: $Version=DELETE; Expires=Sun, 4 Jul 2021 14:26:22 GMT; Max-Age=0; Domain=yahoo.com; Path=; Secure; HttpOnly
Jul 04, 2021 4:36:17 PM java.net.CookieManager put
SEVERE: Invalid cookie for https://finance.yahoo.com/quote/%5EGSPC/options: $Version=DELETE; Expires=Sun, 4 Jul 2021 14:26:22 GMT; Max-Age=0; Domain=finance.yahoo.com; Path=; Secure; HttpOnly

I'm only getting it when I am in Germany, not in the US.

Maybe it has something to do with this popup:
cookies

@wsat
Copy link

wsat commented Sep 28, 2022

The issue seems to be the '$' character at the beginning of the key-names ($Domain, $Path, $Version). check out java.net.HttpCookie.class :
HttpCookie(String name, String value, String header, long creationTime) {
name = name.trim();
if (name.isEmpty() || !isToken(name) || name.charAt(0) == '$') {
throw new IllegalArgumentException("Illegal cookie name");
}
...
throws an IllegalArgumentException, if the cookie contains a $ character at index 0. Not sure what to do about this...

@wsat
Copy link

wsat commented Feb 23, 2023

Hi, has anybody found a solution for this problem? Am I understanding this correctly: Yahoo-Finance sends cookies with keys that have illegal characters (i.e. $). Any way to clean this up, manually?

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

No branches or pull requests

3 participants