Skip to content

A tool to fetch the live scores from the football matches around the world

License

Notifications You must be signed in to change notification settings

InvincibleJuggernaut/Live-Football

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Live-Footabll logo

Live-Football

A tool to fetch the live scores from the football matches around the world.


Pre-requisites

First, you need to sign up here. Create an account and store your API key somewhere accessible. There are various plans depending on the usage while the free trial only supports two random leagues which don't seem to be random at all ! They are always the same two leagues with very limited audience. But, one can sign up for their best plan as on a trial basis with no credit card details or such. Once that plan expires, you could again sign up with a new account. Yeah, I agree that doesn't seem to be very convenient.

Installation

Once, you get your API key, you can proceed to the following.

Clone or download the repository in your preferred directory :

git clone https://github.com/InvincibleJuggernaut/Live-Football.git

Usage

  1. Open the local repository folder and open the file core_code.py and insert your API key in the code where its needed.

  2. Save the code and go back to the repository

  3. Now, open the terminal inside the repository folder

  4. Run the program using
  5. python core_code.py
    

This program makes use of All Sports API.

The standard API key for LIVE results is of the form :

https://allsportsapi.com/api/football/?met=Livescore&APIkey=<insert your API key here>

That said, the URL can be tweaked to get other statistics as well. If you want results from specific leagues, then append &leagueId= after ?met=Livescore followed by the actual id. For example, if you want to get scores from the English Premier League only, then your API call would look something like this :

https://allsportsapi.com/api/football/?met=Livescore&leagueId=148&APIkey=<insert your API key here>

Similarly, the results can be refined according to the user's needs. To know more details about how to get specific results, check this documentation.

For reference, I am adding the leagueId for the top 5 leagues:

English Premier League - #148 
Spanish LaLiga         - #468
Serie A                - #262
Bundesliga             - #195
Ligue 1                - #176

To check the league codes for specific leagues, check this link.

This repository also contains a file code_gui.py which does the same task but displays the scores in a GUI. The interface isn't that polished though, so I won't recommend using that one yet. But, if you still want to try it out, follow the same steps as above until III and in step IV, run the file using:

python code_gui.py

Running the program

Running the program

Future Plans

  • It would be better to give up the API itself and fetch the scores without using any API at all.
  • Having the scores displayed in a more user-friendly window would be more appealing instead of terminal.
  • Getting optional notifications when a major event occurs during a match i.e goal scored, a red card or an injury.

License

MIT License

About

A tool to fetch the live scores from the football matches around the world

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages