Skip to content

A Reddit bot that generates and posts discussion threads for League of Ireland matches. It grabs match fixtures and the current league table using API-Football and formats them into a Reddit post.

Notifications You must be signed in to change notification settings

ryandeering/league-of-ireland-matchbot

Repository files navigation

Matchbot for League of Ireland Subreddit

image

Features

  • Grabs the current gameweek and match fixtures using the football-data API from API-FOOTBALL.
  • Grabs the league table.
  • Generates a formatted Reddit post including match fixtures, kickoff times, grounds, and league table.
  • Submits the generated post to the League of Ireland subreddit.

I've wrote the code to not be too tightly coupled with the League of Ireland. However, this is my project, and ultimately I just need it to do what I need it to do so there's stuff that can be improved like the welcome message being hardcoded. If you wish to make the code more league-agnostic, be my guest, however it should be pretty easy to switch it out for a new league if need be.

Configuration

To use this script, you will need to edit the matchbot_config.py file with the necessary credentials gotten from Reddit like the client_id and client_secret.

Usage

You need Python 3.6 or higher.

You can run pip install -r requirements.txt for quick installation of the dependencies.

To run one of the scripts, simply execute the following command: python premier_division.py

Matchbot will then automatically generate and post the discussion thread for the current gameweek's matches in the League of Ireland subreddit (or whichever you've configured it to.)

Acknowledgements

Contributing

Any suggestions or improvements? Please feel free to create an issue or submit a pull request on the GitHub repository. I'd appreciate any effort to make the code more decoupled from the league.

About

A Reddit bot that generates and posts discussion threads for League of Ireland matches. It grabs match fixtures and the current league table using API-Football and formats them into a Reddit post.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages