Skip to content

Commit

Permalink
Fixing bye weeks for DST for espn scrape
Browse files Browse the repository at this point in the history
  • Loading branch information
atungate committed Oct 8, 2023
1 parent c51808e commit cf3ef6f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions R/source_scrapes.R
Original file line number Diff line number Diff line change
Expand Up @@ -1195,6 +1195,11 @@ scrape_espn = function(pos = c("QB", "RB", "WR", "TE", "K", "DST"), season = NUL

for(i in seq_along(espn_json)) {

# Checking for empty stats (bye weeks)
if(length(espn_json[[i]]$player$stats) == 0L) {
next
}

# Player stats (only those on)
l_players[[i]] = espn_json[[i]]$player$stats[[1]]$stats
l_players[[i]] = l_players[[i]][names(l_players[[i]]) %in% names(espn_columns)]
Expand Down

0 comments on commit cf3ef6f

Please sign in to comment.