| request_with_proxy | R Documentation |
httr2-based GET helper used by the NCAA (stats.ncaa.org) scrapers. Pass a
proxy through ... to route the request through a proxy, e.g.
ncaa_roster(team_id = 104, year = 2023, proxy = list(url = "http://HOST:PORT", username = "USER", password = "PASS"))
The stats.ncaa.org edge (Akamai) rate-limits and IP-bans aggressive
scrapers, so this helper sleeps 5 seconds after every request. Rotate proxies
across calls to spread load.
request_with_proxy(
url,
...,
headers = .ncaa_headers(),
proxy = getOption("baseballr.proxy")
)
url |
Request url |
... |
currently unused (kept for backwards compatibility) |
headers |
A named character vector of request headers. Defaults to
|
proxy |
Optional proxy. Either a URL string (e.g.
|
An httr2::response object.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.