gadicc / node-yahoo-finance2

Unofficial API for Yahoo Finance
https://www.npmjs.com/package/yahoo-finance2
MIT License
353 stars 58 forks source link

Warning message expecting a redirect to guce.yahoo.com #778

Closed Emre4x0 closed 4 weeks ago

Emre4x0 commented 4 weeks ago

Validation Error

Minimal Reproduction

await yahooFinance.quote('AAPL')

Error Message

We expected a redirect to guce.yahoo.com, but got https://finance.yahoo.com/quote/AAPL/
We'll try to continue anyway - you can safely ignore this if the request succeeds

Environment

Browser or Node: Node Library version (e.g. 1.10.1): 2.11.3

Additional Context

Hello, when I use β€œquote” in version 2.11.3, the above message appears in my console.

How can I turn off this message?

arochaa commented 4 weeks ago

The same issue here. [Nest] 53911 - 05/31/2024, 11:07:57 AM ERROR [ExceptionsHandler] Unsupported redirect to https://finance.yahoo.com/quote/AAPL/, please report. Error: Unsupported redirect to https://finance.yahoo.com/quote/AAPL/, please report.

Langsdorf commented 4 weeks ago

updating to 2.11.3 solved the problem

check https://github.com/gadicc/node-yahoo-finance2/releases/tag/v2.11.3

Langsdorf commented 4 weeks ago

@Emre4x0 sorry, i was referring to @arochaa problem,

seems that you can't disable those messages:

https://github.com/gadicc/node-yahoo-finance2/blob/2e4c0b4fc127f53387d3b2c35f29a5d2b893ef24/src/lib/getCrumb.ts#L226

image

Emre4x0 commented 4 weeks ago

@Emre4x0 sorry, i was referring to @arochaa problem,

seems that you can't disable those messages:

https://github.com/gadicc/node-yahoo-finance2/blob/2e4c0b4fc127f53387d3b2c35f29a5d2b893ef24/src/lib/getCrumb.ts#L226

image

excuse me, thank you for your response.

gadicc commented 4 weeks ago

You can override the logger as per the docs:

https://github.com/gadicc/node-yahoo-finance2/blob/devel/docs/other/setGlobalConfig.md#logger

what's logged by default will be improved in the future, we've just had bigger fish to fry until now (i.e. keeping the library working every time Yahoo changes something πŸ˜…).

Emre4x0 commented 4 weeks ago

You can override the logger as per the docs:

https://github.com/gadicc/node-yahoo-finance2/blob/devel/docs/other/setGlobalConfig.md#logger

what's logged by default will be improved in the future, we've just had bigger fish to fry until now (i.e. keeping the library working every time Yahoo changes something πŸ˜…).

i got it, thank you for work and response. the module saves my life. have a nice weekend. πŸ˜‡

gadicc commented 4 weeks ago

thanks for the kind words. you too 😁 πŸ™