Skip to content

Commit 9f9b7b2

Browse files
committed
minor cleanup
1 parent bc27737 commit 9f9b7b2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

R/getQuote.R

+2-2
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ function(Symbols,src='yahoo',what, ...) {
4545
#get a crumb so that downstream callers dont have to handle invalid sessions.
4646
#this is a network hop, but very lightweight payload
4747
n <- if (unclass(Sys.time()) %% 1L >= 0.5) 1L else 2L
48-
query.srv <- paste0("https://query", n, ".finance.yahoo.com/", "v1/test/getcrumb")
48+
query.srv <- paste0("https://query", n, ".finance.yahoo.com/v1/test/getcrumb")
4949
r <- curl::curl_fetch_memory(query.srv, handle = ses$h)
50-
if (r$status_code == 200) {
50+
if ((r$status_code == 200) && (length(r$content) > 0)) {
5151
ses$crumb = rawToChar(r$content)
5252
} else {
5353
if (!force.new) ses <- .yahooSession(TRUE) else stop("Unbale to get yahoo crumb")

0 commit comments

Comments
 (0)