LiveScore-CLI provides the football league information. It is a command-line based program that fetches the data from the LiveScore website (https://www.livescore.com/en/) and presents the fixtures, tables, and real-time scores. LiveScore-CLI requires Python3 that comes pre-installed on Ubuntu 20.04.
Install and Use LiveScore-CLI on Ubuntu 20.04:
The LiveScore-CLI repository is placed on GitHub. In order to install and use LiveScore-CLI on Ubuntu 20.04, we need to clone the LiveScore-CLI repository using the git command.
First, update the apt repository using the command below:
$ sudo apt update
Now, install the git command:
$ sudo apt install git
Press 'y' to continue installing the git command.
The LiveScore-CLI requires a Python interpreter. Moreover, it is dependent on two Python libraries: BeautifulSoup and Requests.
The BeautifulSoup library will be installed while performing the LiveScore-CLI setup. On the other hand, the Requests library comes pre-installed with Python, therefore, there is a need to install it manually. And to install the BeautifulSoup library, we require the PIP3, which is a Python package installer. Write the below-given command to install PIP3:
$ sudo apt install python3-pip
Press 'y' to continue installing PIP3.
Next, clone the LiveScore-CLI using the appended git command:
$ git clone https://github.com/codeezer/livescore-cli.git
Navigate to the LiveScore-CLI directory using the below-given command:
$ cd livescore-cli
Now we have to run the setup file. While running the setup file, the BeautifulSoup library will be downloaded. Type the given command to run the setup file:
$ ./setup
The setup is completed.
Launch and use LiveScore-CLI:
With the LiveScore-CLI, you can see the results and data of different leagues like Barclay's Premier League (bpl), Laliga, Bundesliga, Seriea, Ligue1, and Portugal football league.
The syntax of the livescore command is as follows:
$ livescore [option][league-name]The below-given table presents the league names and their respective commands:
League name | Command |
Barclay's Premier League | bpl |
Laliga | laliga |
Bundesliga | bundeslig |
Seriea | seriea |
Ligue1 | ligue1 |
Portugese Primera Liga | portugal |
The following options can be used with the livescore command:
Option | Description |
-h | Shows the help |
-v | Shows the verbose output |
-t | Shows the League Table |
-s | Shows the Score |
-ts | Shows the Top Scorers |
Let's see the results and scores of Barclay's Premier League.
Once the setup is completed, execute the following command to launch LiveScore-CLI from the command line:
$ livescore -t bpl
The output shows the Barclay's Premier League table on the command-line.
To see the verbose output, type the command with the -v option:
$ livescore -v bpl
Use -s option with livescore command to view the scores:
$ livescore -s bpl
Conclusion:
The LiveScore-CLI is a command-line based program that provides the real-time scores, fixtures, and tables of football leagues. It requires Python3 and is dependent on BeautifulSoup and Requests library. This article explains the LiveScore-CLI installation and uses on Ubuntu 20.04.
About the author
Kamran Sattar Awaisi
I am a software engineer and a research scholar. I like to write article and make tutorial on various IT topics including Python, Cloud Computing, Fog Computing and Deep Learning. I love to use Linux based operating systems.
View all posts2 Comments
-
Thank You linuxhint. 🙂 🙂
Cheers…-
Anytime and good job also
-