Skip to content

multimeric/AflTablesScraper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AFL Tables Scraper

The AFL Tables Scraper is a Python package and command-line executable that downloads Australian Football League (AFL) match data from the fantastic database AFL Tables, and outputs it in a structured, machine-readable form.

Full documentation available on Github Pages

Installation

Note that this module requires python 3.5 and above

Install using:

pip install afl_tables

Python Usage

The AFL Tables module can be used to scrape matches as follows:

from afl_tables import MatchScraper

# Make a scraper for a particular year (2015)
rounds = MatchScraper.scrape(2015)

See the docs on Round for more information on how to use this object

CLI Usage

The AFL Tables module also creates a command-line script called afltables, which can be used to scrape data outside of a python script. Usage is as follows

usage: Scrapes the AFL Tables website and returns JSON data representing the matches
   [-h] year

positional arguments:
  year        The year to scrape

optional arguments:
  -h, --help  show this help message and exit

Changelog

0.0.2

  • Fix for missing fields in the attendees/date/venue part of the table, for example in 2020
  • Added some tests for the package

0.0.1

  • Initial release

About

A python scraper for the AFL Tables website

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages