Open zytan89 opened 4 months ago
Yeah, since yesterday. This fixed it for me:
You might also have to be on Java 1.8 to set the user agent like that. I've tried a newer Java version once and it didn't work.
I tested on java 17 it seem to work fine. You are my savior.
@code-monkey-101 Bless you 🙏
Hi All,
My JDK is 1.8, and I have filled in the "User-Agent" value. But, with the debugger, I see a responseCode of -1 downstream of the new call
redirectableRequest.openConnection(requestProperties);
Any advice?
Yeah, since yesterday. This fixed it for me:
You might also have to be on Java 1.8 to set the user agent like that. I've tried a newer Java version once and it didn't work.
Caused by: java.io.IOException: Server returned HTTP response code: 503 for URL: https://finance.yahoo.com/quote/%5EGSPC/options at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source) at java.net.HttpURLConnection.getResponseCode(Unknown Source) at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(Unknown Source) at yahoofinance.util.RedirectableRequest.openConnection(RedirectableRequest.java:54) at yahoofinance.util.RedirectableRequest.openConnection(RedirectableRequest.java:34) at yahoofinance.histquotes2.CrumbManager.setCookie(CrumbManager.java:52)
I am currently getting error 503 when getting request. Anyone facing similar issue?