Skip to content

Commit 03d9356

Browse files
committed
misc updates for fanduel scrape
1 parent 39a9eea commit 03d9356

3 files changed

Lines changed: 23 additions & 19 deletions

File tree

DESCRIPTION

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,17 @@ Package: ffanalytics
22
Type: Package
33
Title: Scrape Data For Fantasy Football
44
Version: 3.1.8.0000
5-
Authors@R: c(person("Dennis", "Andersen",
5+
Authors@R: c(person("Andrew", "Tungate",
6+
role = c("aut", cre"),
7+
email = "atungate@gmail.com"),
8+
person("Dennis", "Andersen",
69
email = "andersen.dennis@outlook.com",
710
role = c("aut")),
8-
person("Isaac", "Petersen",
11+
person("Isaac", "Petersen",
912
role = c("aut")),
10-
person("Andrew", "Tungate",
11-
role = "cre",
12-
email = "atungate@gmail.com"),
13-
person("Graham", "Seacat",
13+
person("Jesse", "Kartes",
14+
role = "ctb"),
15+
person("Graham", "Seacat",
1416
role = "ctb"))
1517
Author: Dennis Andersen
1618
Maintainer: Andrew Tungate <atungate@gmail.com>

R/calc_projections.R

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -102,42 +102,42 @@ wilcox.loc <- function(vec, na.rm = FALSE, w = NULL){
102102
#' FFToday = 0.379, NumberFire = 0.322, FantasyPros = 0.000,
103103
#' FantasySharks = 0.327, FantasyFootballNerd = 0.000,
104104
#' Walterfootball = 0.281, RTSports = 0.330,
105-
#' FantasyData = 0.428, Fleaflicker = 0.428)}
105+
#' FantasyData = 0.428, Fleaflicker = 0.428, FanDuel = 0.322)}
106106
default_weights <- c(CBS = 0.344, Yahoo = 0.400, ESPN = 0.329, NFL = 0.329,
107107
FFToday = 0.379, NumberFire = 0.322, FantasyPros = 0.000,
108108
FantasySharks= 0.327, FantasyFootballNerd = 0.000,
109109
WalterFootball = 0.281, RTSports= 0.330,
110-
FantasyData= 0.428, FleaFlicker = 0.428)
110+
FantasyData= 0.428, FleaFlicker = 0.428, FanDuel = 0.322)
111111

112112
#' Default Weights for Projection Sources
113113
#'
114114
#' Object with default weights for each position by source
115115
default_weights_by_src = list(
116-
QB = c(CBS = 0.5, Yahoo = 0.5, ESPN = 0.5, NFL = 0.5, FFToday = 0.5,
116+
QB = c(CBS = 0.5, Yahoo = 0.5, ESPN = 0.5, NFL = 0.5, FFToday = 0.5, FanDuel = 0.5,
117117
NumberFire = 0.5, FantasyPros = 0.5, FantasySharks = 0.5, FantasyFootballNerd = 0.5,
118118
WalterFootball = 0.5, RTSports = 0.5, FantasyData = 0.5, FleaFlicker = 0.5),
119-
RB = c(CBS = 0.5, Yahoo = 0.5, ESPN = 0.5, NFL = 0.5, FFToday = 0.5,
119+
RB = c(CBS = 0.5, Yahoo = 0.5, ESPN = 0.5, NFL = 0.5, FFToday = 0.5, FanDuel = 0.5,
120120
NumberFire = 0.5, FantasyPros = 0.5, FantasySharks = 0.5, FantasyFootballNerd = 0.5,
121121
WalterFootball = 0.5, RTSports = 0.5, FantasyData = 0.5, FleaFlicker = 0.5),
122-
WR = c(CBS = 0.5, Yahoo = 0.5, ESPN = 0.5, NFL = 0.5, FFToday = 0.5,
122+
WR = c(CBS = 0.5, Yahoo = 0.5, ESPN = 0.5, NFL = 0.5, FFToday = 0.5, FanDuel = 0.5,
123123
NumberFire = 0.5, FantasyPros = 0.5, FantasySharks = 0.5, FantasyFootballNerd = 0.5,
124124
WalterFootball = 0.5, RTSports = 0.5, FantasyData = 0.5, FleaFlicker = 0.5),
125-
TE = c(CBS = 0.5, Yahoo = 0.5, ESPN = 0.5, NFL = 0.5, FFToday = 0.5,
125+
TE = c(CBS = 0.5, Yahoo = 0.5, ESPN = 0.5, NFL = 0.5, FFToday = 0.5, FanDuel = 0.5,
126126
NumberFire = 0.5, FantasyPros = 0.5, FantasySharks = 0.5, FantasyFootballNerd = 0.5,
127127
WalterFootball = 0.5, RTSports = 0.5, FantasyData = 0.5, FleaFlicker = 0.5),
128-
DST = c(CBS = 0.5, Yahoo = 0.5, ESPN = 0.5, NFL = 0.5, FFToday = 0.5,
128+
DST = c(CBS = 0.5, Yahoo = 0.5, ESPN = 0.5, NFL = 0.5, FFToday = 0.5, FanDuel = 0.5,
129129
NumberFire = 0.5, FantasyPros = 0.5, FantasySharks = 0.5, FantasyFootballNerd = 0.5,
130130
WalterFootball = 0.5, RTSports = 0.5, FantasyData = 0.5, FleaFlicker = 0.5),
131-
K = c(CBS = 0.5, Yahoo = 0.5, ESPN = 0.5, NFL = 0.5, FFToday = 0.5,
131+
K = c(CBS = 0.5, Yahoo = 0.5, ESPN = 0.5, NFL = 0.5, FFToday = 0.5, FanDuel = 0.5,
132132
NumberFire = 0.5, FantasyPros = 0.5, FantasySharks = 0.5, FantasyFootballNerd = 0.5,
133133
WalterFootball = 0.5, RTSports = 0.5, FantasyData = 0.5, FleaFlicker = 0.5),
134-
DB = c(CBS = 0.5, Yahoo = 0.5, ESPN = 0.5, NFL = 0.5, FFToday = 0.5,
134+
DB = c(CBS = 0.5, Yahoo = 0.5, ESPN = 0.5, NFL = 0.5, FFToday = 0.5, FanDuel = 0.5,
135135
NumberFire = 0.5, FantasyPros = 0.5, FantasySharks = 0.5, FantasyFootballNerd = 0.5,
136136
WalterFootball = 0.5, RTSports = 0.5, FantasyData = 0.5, FleaFlicker = 0.5),
137-
DL = c(CBS = 0.5, Yahoo = 0.5, ESPN = 0.5, NFL = 0.5, FFToday = 0.5,
137+
DL = c(CBS = 0.5, Yahoo = 0.5, ESPN = 0.5, NFL = 0.5, FFToday = 0.5, FanDuel = 0.5,
138138
NumberFire = 0.5, FantasyPros = 0.5, FantasySharks = 0.5, FantasyFootballNerd = 0.5,
139139
WalterFootball = 0.5, RTSports = 0.5, FantasyData = 0.5, FleaFlicker = 0.5),
140-
LB = c(CBS = 0.5, Yahoo = 0.5, ESPN = 0.5, NFL = 0.5, FFToday = 0.5,
140+
LB = c(CBS = 0.5, Yahoo = 0.5, ESPN = 0.5, NFL = 0.5, FFToday = 0.5, FanDuel = 0.5,
141141
NumberFire = 0.5, FantasyPros = 0.5, FantasySharks = 0.5, FantasyFootballNerd = 0.5,
142142
WalterFootball = 0.5, RTSports = 0.5, FantasyData = 0.5, FleaFlicker = 0.5)
143143
)

R/source_scrapes.R

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1485,9 +1485,11 @@ scrape_fanduel <- function(pos = c("QB", "RB", "WR", "TE", "K", "DST"),
14851485
"Sec-Fetch-Dest" = "empty",
14861486
"Accept-Language" = "en-US,en;q=0.9",
14871487
"Sec-Fetch-Mode" = "cors",
1488-
"User-Agent" = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.3.1 Safari/605.1.15",
14891488
"Accept-Encoding" = "gzip, deflate, br"
1490-
)
1489+
) %>%
1490+
httr2::req_user_agent(
1491+
"ffanalytics R package (https://github.com/FantasyFootballAnalytics/ffanalytics)"
1492+
)
14911493

14921494
position_groups <- list(
14931495
NFL_SKILL = c("QB","RB","WR","TE"),

0 commit comments

Comments
 (0)