This PHP package scrapes stats for a college football player from ESPN. Based off of the equivalent CBS scraper.
Via Composer:
composer require danabrey/espn-ncaa-stats-scraper
Scrape a player's stats by passing their ESPN player ID (found in the URL e.g. https://www.espn.co.uk/college-football/player/stats/_/id/4241463/jerry-jeudy
)
$scraper = new DanAbrey\ESPNNCAAStatsScraper\Scraper();
$stats = $scraper->getPlayerStats(4241463);
The return from getPlayerStats
will be a Player
object, which includes their ID, name and a seasons
property which is an array of PlayerSeason
objects, containing the stats for the player that season.
Scraping from websites without permission may be against Terms of Service. Use this package at your own discretion.
Please feel free to raise issues or open pull requests with suggestions on how to improve this project. For any informal questions, find me on Twitter at @danabrey.
- MIT license
- Copyright 2019 © Dan Abrey