danabrey/espn-ncaa-stats-scraper

PHP package for scraping college football player stats from ESPN

1.0.0 2019-11-23 12:10 UTC

This package is auto-updated.

Last update: 2024-04-23 21:34:30 UTC


README

This PHP package scrapes stats for a college football player from ESPN. Based off of the equivalent CBS scraper.

Build Status

Installation

Via Composer:

composer require danabrey/espn-ncaa-stats-scraper

Usage

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.

Disclaimer

Scraping from websites without permission may be against Terms of Service. Use this package at your own discretion.

Contributing/Contact

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.

License

License