Closed eddelbuettel closed 11 months ago
can you try this branch: remotes::install_github("ethanbsmith/quantmod@fix_404_handle_getquote_gdpr_errors")
Works like a charm after a quick (command-line, via littler
)
installGithub.r ethanbsmith/quantmod@fix_404_handle_getquote_gdpr_errors
(which of course wraps the remotes
call). All good so suggest to merge.
And just for completeness as I use this in a loop storing in Redis (details on my blog / in package dang
/ happy to expand): Behavior change apparently commenced at 23:00h Central yesterday or 00:00h Eastern.
I can confirm this fix is working for me as well.
This seems to be caused by a missing "User-Agent" in the current request header. Ethan's patch added a user-agent in addition to improving the error message.
And it's not good enough for the user-agent to be set to something. It needs to be a value the server considers valid, like it is in Ethan's patch. I tried setting it to "R (4.3.1, x86_64-pc-linux-gnu, x86_64, linux-gnu)"
but the request still failed.
this is the second change yahoo has made in the last few months that treats scripting differently than actual browsers. i fear this api is not long for this world. just my .02
Description
getQuote()
is no longer working.Expected behavior
getQuote("SPY")
etc worked but no longer doesMinimal, reproducible example
Session Info