-
Notifications
You must be signed in to change notification settings - Fork 3
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
get_quoteSummary seems not to work #14
Comments
Hi @vsoler thanks for the bug report. Yahoo has unfortunately changed part of the API and as you rightfully pointed out in the particular the authentication (cookie and crumb). I am unfortunately at the moment very busy with work but hope to look into this soon. If of course you have a solution to the problem let me know. |
Thank you for your quick answer.
If I find a solution to this problem, I'll let you know.
Vicente Soler
Enviado desde Outlook para Android<https://aka.ms/AAb9ysg>
…________________________________
From: eohne ***@***.***>
Sent: Saturday, December 2, 2023 11:32:43 AM
To: eohne/YFinance.jl ***@***.***>
Cc: vsoler ***@***.***>; Mention ***@***.***>
Subject: Re: [eohne/YFinance.jl] get_quoteSummary seems not to work (Issue #14)
Hi @vsoler<https://github.com/vsoler> thanks for the bug report. Yahoo has unfortunately changed part of the API and as you rightfully pointed out in the particular the authentication (cookie and crumb).
I am unfortunately at the moment very busy with work but hope to look into this soon.
If of course you have a solution to the problem let me know.
—
Reply to this email directly, view it on GitHub<#14 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AE2Q5URB4HPZEB7ZTCV4MADYHL7UXAVCNFSM6AAAAABAD4T7EWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMZXGEYTINZZGU>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Hello, can you fix it? please |
I wish I knew how to fix it !!!
…________________________________
De: KingTurbo ***@***.***>
Enviado: sábado, 3 de febrero de 2024 22:58
Para: eohne/YFinance.jl ***@***.***>
Cc: vsoler ***@***.***>; Mention ***@***.***>
Asunto: Re: [eohne/YFinance.jl] get_quoteSummary seems not to work (Issue #14)
Hello, can you fix it? please
—
Reply to this email directly, view it on GitHub<#14 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AE2Q5UTGTN25SDXPPR5HPL3YR2XG3AVCNFSM6AAAAABAD4T7EWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMRVGQ3DKNRTGE>.
You are receiving this because you were mentioned.
|
Hi so it looks like I have a solution that seems to be working. I will try to implement it hopefully by tomorrow. |
I have just pushed a new version to the registry. Should be available in about 3 minutes. |
You really helped cutting the runtime in half. I used an unnoble way to solve this issue by using the python version of it. By just importing the temp csv dataframe into julia. Thanks for your altruism! |
There seems to be a problem with an authorisation. Could you please check what the problem is?
Many thanks
get_quoteSummary("AAPL") |> get_summary_detail
HTTP.Exceptions.StatusError(401, "GET", "/v10/finance/quoteSummary/AAPL?modules=assetProfile%2CbalanceSheetHistory%2CbalanceSheetHistoryQuarterly%2CcalendarEvents%2CcashflowStatementHistory%2CcashflowStatementHistoryQuarterly%2CdefaultKeyStatistics%2Cearnings%2CearningsHistory%2CearningsTrend%2CesgScores%2CfinancialData%2CfundOwnership%2CfundPerformance%2CfundProfile%2CincomeStatementHistory%2CincomeStatementHistoryQuarterly%2CindexTrend%2CindustryTrend%2CinsiderHolders%2CinsiderTransactions%2CinstitutionOwnership%2CmajorDirectHolders%2CmajorHoldersBreakdown%2CnetSharePurchaseActivity%2Cprice%2CquoteType%2CrecommendationTrend%2CsecFilings%2CsectorTrend%2CsummaryDetail%2CsummaryProfile%2CtopHoldings%2CupgradeDowngradeHistory&formatted=false", HTTP.Messages.Response:
"""
HTTP/1.1 401 Unauthorized
content-type: application/json;charset=utf-8
vary: Origin
content-length: 90
x-envoy-upstream-service-time: 2
date: Sat, 02 Dec 2023 09:50:59 GMT
server: ATS
x-envoy-decorator-operation: finance-company-fundamentals-api--mtls-production-ir2.finance-k8s.svc.yahoo.local:4080/*
Cache-Control: max-age=0, private
Expires: -1
Age: 0
Strict-Transport-Security: max-age=31536000
Referrer-Policy: no-referrer-when-downgrade
Connection: keep-alive
Expect-CT: max-age=31536000, report-uri="http://csp.yahoo.com/beacon/csp?src=yahoocom-expect-ct-report-only"
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
{"finance":{"result":null,"error":{"code":"Unauthorized","description":"Invalid Cookie"}}}""")
Stacktrace:
[1] (::HTTP.ConnectionRequest.var"#connections#4"{HTTP.ConnectionRequest.var"#connections#1#5"{HTTP.TimeoutRequest.var"#timeouts#3"{HTTP.TimeoutRequest.var"#timeouts#1#4"{HTTP.ExceptionRequest.var"#exceptions#2"{HTTP.ExceptionRequest.var"#exceptions#1#3"{typeof(HTTP.StreamRequest.streamlayer)}}}}}})(req::HTTP.Messages.Request; proxy::Nothing, socket_type::Type, socket_type_tls::Type, readtimeout::Int64, connect_timeout::Int64, logerrors::Bool, logtag::Nothing, kw::Base.Pairs{Symbol, Union{Nothing, Int64}, Tuple{Symbol, Symbol, Symbol}, NamedTuple{(:iofunction, :decompress, :verbose), Tuple{Nothing, Nothing, Int64}}})
@ HTTP.ConnectionRequest C:\Users\USUARIO.julia\packages\HTTP\SN7VW\src\clientlayers\ConnectionRequest.jl:144
[2] (::Base.var"#90#92"{Base.var"#90#91#93"{ExponentialBackOff, HTTP.RetryRequest.var"#2#5"{Int64, typeof(HTTP.RetryRequest.FALSE), HTTP.Messages.Request, Base.RefValue{Int64}}, HTTP.ConnectionRequest.var"#connections#4"{HTTP.ConnectionRequest.var"#connections#1#5"{HTTP.TimeoutRequest.var"#timeouts#3"{HTTP.TimeoutRequest.var"#timeouts#1#4"{HTTP.ExceptionRequest.var"#exceptions#2"{HTTP.ExceptionRequest.var"#exceptions#1#3"{typeof(HTTP.StreamRequest.streamlayer)}}}}}}}})(args::HTTP.Messages.Request; kwargs::Base.Pairs{Symbol, Union{Nothing, Int64}, NTuple{4, Symbol}, NamedTuple{(:iofunction, :decompress, :verbose, :proxy), Tuple{Nothing, Nothing, Int64, Nothing}}})
@ Base .\error.jl:296
[3] (::HTTP.RetryRequest.var"#manageretries#3"{HTTP.RetryRequest.var"#manageretries#1#4"{HTTP.ConnectionRequest.var"#connections#4"{HTTP.ConnectionRequest.var"#connections#1#5"{HTTP.TimeoutRequest.var"#timeouts#3"{HTTP.TimeoutRequest.var"#timeouts#1#4"{HTTP.ExceptionRequest.var"#exceptions#2"{HTTP.ExceptionRequest.var"#exceptions#1#3"{typeof(HTTP.StreamRequest.streamlayer)}}}}}}}})(req::HTTP.Messages.Request; retry::Bool, retries::Int64, retry_delays::ExponentialBackOff, retry_check::Function, retry_non_idempotent::Bool, kw::Base.Pairs{Symbol, Union{Nothing, Int64}, NTuple{4, Symbol}, NamedTuple{(:iofunction, :decompress, :verbose, :proxy), Tuple{Nothing, Nothing, Int64, Nothing}}})
@ HTTP.RetryRequest C:\Users\USUARIO.julia\packages\HTTP\SN7VW\src\clientlayers\RetryRequest.jl:75
[4] manageretries
@ C:\Users\USUARIO.julia\packages\HTTP\SN7VW\src\clientlayers\RetryRequest.jl:30 [inlined]
[5] (::HTTP.CookieRequest.var"#managecookies#4"{HTTP.CookieRequest.var"#managecookies#1#5"{HTTP.RetryRequest.var"#manageretries#3"{HTTP.RetryRequest.var"#manageretries#1#4"{HTTP.ConnectionRequest.var"#connections#4"{HTTP.ConnectionRequest.var"#connections#1#5"{HTTP.TimeoutRequest.var"#timeouts#3"{HTTP.TimeoutRequest.var"#timeouts#1#4"{HTTP.ExceptionRequest.var"#exceptions#2"{HTTP.ExceptionRequest.var"#exceptions#1#3"{typeof(HTTP.StreamRequest.streamlayer)}}}}}}}}}})(req::HTTP.Messages.Request; cookies::Bool, cookiejar::HTTP.Cookies.CookieJar, kw::Base.Pairs{Symbol, Union{Nothing, Int64}, NTuple{4, Symbol}, NamedTuple{(:iofunction, :decompress, :verbose, :proxy), Tuple{Nothing, Nothing, Int64, Nothing}}})
@ HTTP.CookieRequest C:\Users\USUARIO.julia\packages\HTTP\SN7VW\src\clientlayers\CookieRequest.jl:42
[6] managecookies
@ C:\Users\USUARIO.julia\packages\HTTP\SN7VW\src\clientlayers\CookieRequest.jl:19 [inlined]
[7] (::HTTP.HeadersRequest.var"#defaultheaders#2"{HTTP.HeadersRequest.var"#defaultheaders#1#3"{HTTP.CookieRequest.var"#managecookies#4"{HTTP.CookieRequest.var"#managecookies#1#5"{HTTP.RetryRequest.var"#manageretries#3"{HTTP.RetryRequest.var"#manageretries#1#4"{HTTP.ConnectionRequest.var"#connections#4"{HTTP.ConnectionRequest.var"#connections#1#5"{HTTP.TimeoutRequest.var"#timeouts#3"{HTTP.TimeoutRequest.var"#timeouts#1#4"{HTTP.ExceptionRequest.var"#exceptions#2"{HTTP.ExceptionRequest.var"#exceptions#1#3"{typeof(HTTP.StreamRequest.streamlayer)}}}}}}}}}}}})(req::HTTP.Messages.Request; iofunction::Nothing, decompress::Nothing, basicauth::Bool, detect_content_type::Bool, canonicalize_headers::Bool, kw::Base.Pairs{Symbol, Union{Nothing, Int64}, Tuple{Symbol, Symbol}, NamedTuple{(:verbose, :proxy), Tuple{Int64, Nothing}}})
@ HTTP.HeadersRequest C:\Users\USUARIO.julia\packages\HTTP\SN7VW\src\clientlayers\HeadersRequest.jl:71
[8] defaultheaders
@ C:\Users\USUARIO.julia\packages\HTTP\SN7VW\src\clientlayers\HeadersRequest.jl:14 [inlined]
[9] (::HTTP.RedirectRequest.var"#redirects#3"{HTTP.RedirectRequest.var"#redirects#1#4"{HTTP.HeadersRequest.var"#defaultheaders#2"{HTTP.HeadersRequest.var"#defaultheaders#1#3"{HTTP.CookieRequest.var"#managecookies#4"{HTTP.CookieRequest.var"#managecookies#1#5"{HTTP.RetryRequest.var"#manageretries#3"{HTTP.RetryRequest.var"#manageretries#1#4"{HTTP.ConnectionRequest.var"#connections#4"{HTTP.ConnectionRequest.var"#connections#1#5"{HTTP.TimeoutRequest.var"#timeouts#3"{HTTP.TimeoutRequest.var"#timeouts#1#4"{HTTP.ExceptionRequest.var"#exceptions#2"{HTTP.ExceptionRequest.var"#exceptions#1#3"{typeof(HTTP.StreamRequest.streamlayer)}}}}}}}}}}}}}})(req::HTTP.Messages.Request; redirect::Bool, redirect_limit::Int64, redirect_method::Nothing, forwardheaders::Bool, response_stream::Nothing, kw::Base.Pairs{Symbol, Union{Nothing, Int64}, Tuple{Symbol, Symbol}, NamedTuple{(:verbose, :proxy), Tuple{Int64, Nothing}}})
@ HTTP.RedirectRequest C:\Users\USUARIO.julia\packages\HTTP\SN7VW\src\clientlayers\RedirectRequest.jl:25
[10] redirects
@ C:\Users\USUARIO.julia\packages\HTTP\SN7VW\src\clientlayers\RedirectRequest.jl:14 [inlined]
[11] (::HTTP.MessageRequest.var"#makerequest#3"{HTTP.MessageRequest.var"#makerequest#1#4"{HTTP.RedirectRequest.var"#redirects#3"{HTTP.RedirectRequest.var"#redirects#1#4"{HTTP.HeadersRequest.var"#defaultheaders#2"{HTTP.HeadersRequest.var"#defaultheaders#1#3"{HTTP.CookieRequest.var"#managecookies#4"{HTTP.CookieRequest.var"#managecookies#1#5"{HTTP.RetryRequest.var"#manageretries#3"{HTTP.RetryRequest.var"#manageretries#1#4"{HTTP.ConnectionRequest.var"#connections#4"{HTTP.ConnectionRequest.var"#connections#1#5"{HTTP.TimeoutRequest.var"#timeouts#3"{HTTP.TimeoutRequest.var"#timeouts#1#4"{HTTP.ExceptionRequest.var"#exceptions#2"{HTTP.ExceptionRequest.var"#exceptions#1#3"{typeof(HTTP.StreamRequest.streamlayer)}}}}}}}}}}}}}}}})(method::String, url::URIs.URI, headers::Dict{Any, Any}, body::Vector{UInt8}; copyheaders::Bool, response_stream::Nothing, http_version::HTTP.Strings.HTTPVersion, verbose::Int64, kw::Base.Pairs{Symbol, Nothing, Tuple{Symbol}, NamedTuple{(:proxy,), Tuple{Nothing}}})
@ HTTP.MessageRequest C:\Users\USUARIO.julia\packages\HTTP\SN7VW\src\clientlayers\MessageRequest.jl:35
[12] makerequest
@ C:\Users\USUARIO.julia\packages\HTTP\SN7VW\src\clientlayers\MessageRequest.jl:24 [inlined]
[13] request(stack::HTTP.MessageRequest.var"#makerequest#3"{HTTP.MessageRequest.var"#makerequest#1#4"{HTTP.RedirectRequest.var"#redirects#3"{HTTP.RedirectRequest.var"#redirects#1#4"{HTTP.HeadersRequest.var"#defaultheaders#2"{HTTP.HeadersRequest.var"#defaultheaders#1#3"{HTTP.CookieRequest.var"#managecookies#4"{HTTP.CookieRequest.var"#managecookies#1#5"{HTTP.RetryRequest.var"#manageretries#3"{HTTP.RetryRequest.var"#manageretries#1#4"{HTTP.ConnectionRequest.var"#connections#4"{HTTP.ConnectionRequest.var"#connections#1#5"{HTTP.TimeoutRequest.var"#timeouts#3"{HTTP.TimeoutRequest.var"#timeouts#1#4"{HTTP.ExceptionRequest.var"#exceptions#2"{HTTP.ExceptionRequest.var"#exceptions#1#3"{typeof(HTTP.StreamRequest.streamlayer)}}}}}}}}}}}}}}}}, method::String, url::String, h::Dict{Any, Any}, b::Vector{UInt8}, q::Dict{String, String}; headers::Dict{Any, Any}, body::Vector{UInt8}, query::Dict{String, String}, kw::Base.Pairs{Symbol, Nothing, Tuple{Symbol}, NamedTuple{(:proxy,), Tuple{Nothing}}})
@ HTTP C:\Users\USUARIO.julia\packages\HTTP\SN7VW\src\HTTP.jl:457
[14] #request#20
@ C:\Users\USUARIO.julia\packages\HTTP\SN7VW\src\HTTP.jl:315 [inlined]
[15] request (repeats 2 times)
@ C:\Users\USUARIO.julia\packages\HTTP\SN7VW\src\HTTP.jl:313 [inlined]
[16] #get#38
@ C:\Users\USUARIO.julia\packages\HTTP\SN7VW\src\HTTP.jl:518 [inlined]
[17] get_quoteSummary(symbol::String; item::Nothing, throw_error::Bool)
@ YFinance C:\Users\USUARIO.julia\packages\YFinance\II1mO\src\QuoteSummary.jl:97
[18] get_quoteSummary(symbol::String)
@ YFinance C:\Users\USUARIO.julia\packages\YFinance\II1mO\src\QuoteSummary.jl:69
[19] top-level scope
@ In[20]:1
1
get_quoteSummary("AAPL")
The text was updated successfully, but these errors were encountered: