danabrey / espn-ncaa-stats-scraper
PHP package for scraping college football player stats from ESPN
Requires
- php: ^7.1
- fabpot/goutte: ^3.2
- symfony/property-access: ^4.3
- symfony/serializer: ^4.3
Requires (Dev)
- phpunit/phpunit: ^7.0
This package is auto-updated.
Last update: 2024-10-23 22:33:12 UTC
README
This PHP package scrapes stats for a college football player from ESPN. Based off of the equivalent CBS scraper.
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
- MIT license
- Copyright 2019 © Dan Abrey