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

Unable to get Remote data source #95

Open
1991jhf opened this issue Jan 27, 2024 · 0 comments
Open

Unable to get Remote data source #95

1991jhf opened this issue Jan 27, 2024 · 0 comments

Comments

@1991jhf
Copy link

1991jhf commented Jan 27, 2024

julia> yahoo(:INTC)
ERROR: HTTP.Exceptions.StatusError(403, "GET", "/v7/finance/download/INTC?period1=34819200&period2=1706370811&interval=1d&events=history", HTTP.Messages.Response:
"""
HTTP/1.1 403 Forbidden
Date: Sat, 27 Jan 2024 07:53:36 GMT
Connection: close
Strict-Transport-Security: max-age=31536000
Server: ATS
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
Content-Length: 3369
Content-Type: text/html

<title>Yahoo</title> <style> html { height: 100%; } body { background: #fafafc url(https://s.yimg.com/nn/img/sad-panda-201402200631.png) 50% 50%; background-size: cover; height: 100%; text-align: center; font: 300 16px "helvetica neue", helvetica, verdana, tahoma, arial, sans-serif; } #message { text-align: left; font-weight: 400; color: #1A1A1A; } #message a { padding: 0 3px; } #container { position: absolute; top: 50%; left: 50%; padding: 0 30px; margin-right: -50%; transform: translate(-50%, -50%); max-width: 40em; _width: 40em; } #container img { width: 174px; height: auto; } #switcher a { font-weight: 400; } #switcher a.active { color: #000; text-decoration: none; cursor: default; } </style>


3369-byte body
""")
Stacktrace:
[1] (::HTTP.ConnectionRequest.var"#connections#4"{…})(req::HTTP.Messages.Request; proxy::Nothing, socket_type::Type, socket_type_tls::Type, readtimeout::Int64, connect_timeout::Int64, logerrors::Bool, logtag::Nothing, kw::@kwargs{…})
@ HTTP.ConnectionRequest C:\Users\Admin.julia\packages\HTTP\bDoga\src\clientlayers\ConnectionRequest.jl:144
[2] (::Base.var"#96#98"{…})(args::HTTP.Messages.Request; kwargs::@kwargs{…})
@ Base .\error.jl:308
[3] (::HTTP.RetryRequest.var"#manageretries#3"{…})(req::HTTP.Messages.Request; retry::Bool, retries::Int64, retry_delays::ExponentialBackOff, retry_check::Function, retry_non_idempotent::Bool, kw::@kwargs{…})
@ HTTP.RetryRequest C:\Users\Admin.julia\packages\HTTP\bDoga\src\clientlayers\RetryRequest.jl:75
[4] manageretries
@ C:\Users\Admin.julia\packages\HTTP\bDoga\src\clientlayers\RetryRequest.jl:30 [inlined]
[5] (::HTTP.CookieRequest.var"#managecookies#4"{…})(req::HTTP.Messages.Request; cookies::Bool, cookiejar::HTTP.Cookies.CookieJar, kw::@kwargs{…})
@ HTTP.CookieRequest C:\Users\Admin.julia\packages\HTTP\bDoga\src\clientlayers\CookieRequest.jl:42
[6] managecookies
@ C:\Users\Admin.julia\packages\HTTP\bDoga\src\clientlayers\CookieRequest.jl:19 [inlined]
[7] (::HTTP.HeadersRequest.var"#defaultheaders#2"{…})(req::HTTP.Messages.Request; iofunction::Nothing, decompress::Nothing, basicauth::Bool, detect_content_type::Bool, canonicalize_headers::Bool, kw::@kwargs{…})
@ HTTP.HeadersRequest C:\Users\Admin.julia\packages\HTTP\bDoga\src\clientlayers\HeadersRequest.jl:71
[8] defaultheaders
@ C:\Users\Admin.julia\packages\HTTP\bDoga\src\clientlayers\HeadersRequest.jl:14 [inlined]
[9] (::HTTP.RedirectRequest.var"#redirects#3"{…})(req::HTTP.Messages.Request; redirect::Bool, redirect_limit::Int64, redirect_method::Nothing, forwardheaders::Bool, response_stream::Nothing, kw::@kwargs{…})
@ HTTP.RedirectRequest C:\Users\Admin.julia\packages\HTTP\bDoga\src\clientlayers\RedirectRequest.jl:25
[10] redirects
@ C:\Users\Admin.julia\packages\HTTP\bDoga\src\clientlayers\RedirectRequest.jl:14 [inlined]
[11] (::HTTP.MessageRequest.var"#makerequest#3"{…})(method::String, url::URIs.URI, headers::Nothing, body::Vector{…}; copyheaders::Bool, response_stream::Nothing, http_version::HTTP.Strings.HTTPVersion, verbose::Int64, kw::@kwargs{})
@ HTTP.MessageRequest C:\Users\Admin.julia\packages\HTTP\bDoga\src\clientlayers\MessageRequest.jl:35
[12] makerequest
@ C:\Users\Admin.julia\packages\HTTP\bDoga\src\clientlayers\MessageRequest.jl:24 [inlined]
[13] request(stack::HTTP.MessageRequest.var"#makerequest#3"{…}, method::String, url::String, h::Nothing, b::Vector{…}, q::YahooOpt; headers::Nothing, body::Vector{…}, query::YahooOpt, kw::@kwargs{})
@ HTTP C:\Users\Admin.julia\packages\HTTP\bDoga\src\HTTP.jl:457
[14] request(stack::Function, method::String, url::String, h::Nothing, b::Vector{UInt8}, q::YahooOpt)
@ HTTP C:\Users\Admin.julia\packages\HTTP\bDoga\src\HTTP.jl:455
[15] #request#20
@ C:\Users\Admin.julia\packages\HTTP\bDoga\src\HTTP.jl:315 [inlined]
[16] request(stack::Function, method::String, url::String, h::Nothing, b::Vector{UInt8}, q::YahooOpt) (repeats 2 times)
@ HTTP C:\Users\Admin.julia\packages\HTTP\bDoga\src\HTTP.jl:313 [inlined]
[17] get
@ C:\Users\Admin.julia\packages\HTTP\bDoga\src\HTTP.jl:518 [inlined]
[18] yahoo(sym::String, opt::YahooOpt)
@ MarketData C:\Users\Admin.julia\packages\MarketData\Imzq1\src\downloads.jl:95
[19] yahoo(sym::String, opt::YahooOpt)
@ MarketData C:\Users\Admin.julia\packages\MarketData\Imzq1\src\downloads.jl:102 [inlined]
[20] yahoo(s::Symbol)
@ MarketData C:\Users\Admin.julia\packages\MarketData\Imzq1\src\downloads.jl:102
[21] top-level scope
@ REPL[7]:1

caused by: HTTP.Exceptions.StatusError(403, "GET", "/v7/finance/download/INTC?period1=34819200&period2=1706370811&interval=1d&events=history", HTTP.Messages.Response:
"""
HTTP/1.1 403 Forbidden
Date: Sat, 27 Jan 2024 07:53:36 GMT
Connection: close
Strict-Transport-Security: max-age=31536000
Server: ATS
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
Content-Length: 3369
Content-Type: text/html

<title>Yahoo</title> <style> html { height: 100%; } body { background: #fafafc url(https://s.yimg.com/nn/img/sad-panda-201402200631.png) 50% 50%; background-size: cover; height: 100%; text-align: center; font: 300 16px "helvetica neue", helvetica, verdana, tahoma, arial, sans-serif; } #message { text-align: left; font-weight: 400; color: #1A1A1A; } #message a { padding: 0 3px; } #container { position: absolute; top: 50%; left: 50%; padding: 0 30px; margin-right: -50%; transform: translate(-50%, -50%); max-width: 40em; _width: 40em; } #container img { width: 174px; height: auto; } #switcher a { font-weight: 400; } #switcher a.active { color: #000; text-decoration: none; cursor: default; } </style>


3369-byte body
""")
Stacktrace:
[1] (::HTTP.ExceptionRequest.var"#exceptions#2"{…})(stream::HTTP.Streams.Stream{…}; status_exception::Bool, timedout::Nothing, logerrors::Bool, logtag::Nothing,
kw::@kwargs{…})
@ HTTP.ExceptionRequest C:\Users\Admin.julia\packages\HTTP\bDoga\src\clientlayers\ExceptionRequest.jl:19
[2] exceptions
@ C:\Users\Admin.julia\packages\HTTP\bDoga\src\clientlayers\ExceptionRequest.jl:13 [inlined]
[3] (::HTTP.TimeoutRequest.var"#timeouts#3"{…})(stream::HTTP.Streams.Stream{…}; readtimeout::Int64, logerrors::Bool, logtag::Nothing, kw::@kwargs{…})
@ HTTP.TimeoutRequest C:\Users\Admin.julia\packages\HTTP\bDoga\src\clientlayers\TimeoutRequest.jl:18
[4] (::HTTP.ConnectionRequest.var"#connections#4"{…})(req::HTTP.Messages.Request; proxy::Nothing, socket_type::Type, socket_type_tls::Type, readtimeout::Int64, connect_timeout::Int64, logerrors::Bool, logtag::Nothing, kw::@kwargs{…})
@ HTTP.ConnectionRequest C:\Users\Admin.julia\packages\HTTP\bDoga\src\clientlayers\ConnectionRequest.jl:120
[5] (::Base.var"#96#98"{…})(args::HTTP.Messages.Request; kwargs::@kwargs{…})
@ Base .\error.jl:308
[6] (::HTTP.RetryRequest.var"#manageretries#3"{…})(req::HTTP.Messages.Request; retry::Bool, retries::Int64, retry_delays::ExponentialBackOff, retry_check::Function, retry_non_idempotent::Bool, kw::@kwargs{…})
@ HTTP.RetryRequest C:\Users\Admin.julia\packages\HTTP\bDoga\src\clientlayers\RetryRequest.jl:75
[7] manageretries
@ C:\Users\Admin.julia\packages\HTTP\bDoga\src\clientlayers\RetryRequest.jl:30 [inlined]
[8] (::HTTP.CookieRequest.var"#managecookies#4"{…})(req::HTTP.Messages.Request; cookies::Bool, cookiejar::HTTP.Cookies.CookieJar, kw::@kwargs{…})
@ HTTP.CookieRequest C:\Users\Admin.julia\packages\HTTP\bDoga\src\clientlayers\CookieRequest.jl:42
[9] managecookies
@ C:\Users\Admin.julia\packages\HTTP\bDoga\src\clientlayers\CookieRequest.jl:19 [inlined]
[10] (::HTTP.HeadersRequest.var"#defaultheaders#2"{…})(req::HTTP.Messages.Request; iofunction::Nothing, decompress::Nothing, basicauth::Bool, detect_content_type::Bool, canonicalize_headers::Bool, kw::@kwargs{…})
@ HTTP.HeadersRequest C:\Users\Admin.julia\packages\HTTP\bDoga\src\clientlayers\HeadersRequest.jl:71
[11] defaultheaders
@ C:\Users\Admin.julia\packages\HTTP\bDoga\src\clientlayers\HeadersRequest.jl:14 [inlined]
[12] (::HTTP.RedirectRequest.var"#redirects#3"{…})(req::HTTP.Messages.Request; redirect::Bool, redirect_limit::Int64, redirect_method::Nothing, forwardheaders::Bool, response_stream::Nothing, kw::@kwargs{…})
@ HTTP.RedirectRequest C:\Users\Admin.julia\packages\HTTP\bDoga\src\clientlayers\RedirectRequest.jl:25
[13] redirects
@ C:\Users\Admin.julia\packages\HTTP\bDoga\src\clientlayers\RedirectRequest.jl:14 [inlined]
[14] (::HTTP.MessageRequest.var"#makerequest#3"{…})(method::String, url::URIs.URI, headers::Nothing, body::Vector{…}; copyheaders::Bool, response_stream::Nothing, http_version::HTTP.Strings.HTTPVersion, verbose::Int64, kw::@kwargs{})
@ HTTP.MessageRequest C:\Users\Admin.julia\packages\HTTP\bDoga\src\clientlayers\MessageRequest.jl:35
[15] makerequest
@ C:\Users\Admin.julia\packages\HTTP\bDoga\src\clientlayers\MessageRequest.jl:24 [inlined]
[16] request(stack::HTTP.MessageRequest.var"#makerequest#3"{…}, method::String, url::String, h::Nothing, b::Vector{…}, q::YahooOpt; headers::Nothing, body::Vector{…}, query::YahooOpt, kw::@kwargs{})
@ HTTP C:\Users\Admin.julia\packages\HTTP\bDoga\src\HTTP.jl:457
[17] request(stack::Function, method::String, url::String, h::Nothing, b::Vector{UInt8}, q::YahooOpt)
@ HTTP C:\Users\Admin.julia\packages\HTTP\bDoga\src\HTTP.jl:455
[18] #request#20
@ C:\Users\Admin.julia\packages\HTTP\bDoga\src\HTTP.jl:315 [inlined]
[19] request(stack::Function, method::String, url::String, h::Nothing, b::Vector{UInt8}, q::YahooOpt) (repeats 2 times)
@ HTTP C:\Users\Admin.julia\packages\HTTP\bDoga\src\HTTP.jl:313 [inlined]
[20] get
@ C:\Users\Admin.julia\packages\HTTP\bDoga\src\HTTP.jl:518 [inlined]
[21] yahoo(sym::String, opt::YahooOpt)
@ MarketData C:\Users\Admin.julia\packages\MarketData\Imzq1\src\downloads.jl:95
[22] yahoo(sym::String, opt::YahooOpt)
@ MarketData C:\Users\Admin.julia\packages\MarketData\Imzq1\src\downloads.jl:102 [inlined]
[23] yahoo(s::Symbol)
@ MarketData C:\Users\Admin.julia\packages\MarketData\Imzq1\src\downloads.jl:102
[24] top-level scope
@ REPL[7]:1
Some type information was truncated. Use show(err) to see complete types.

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

1 participant