GithubHelp home page GithubHelp logo

codeezer / livescore-cli Goto Github PK

View Code? Open in Web Editor NEW
72.0 8.0 12.0 1.41 MB

command-line football (soccer) livescore and *news for linux/mac user

Python 97.37% Shell 2.63%
livescore-cli livescore soccer-cli football bpl laliga linux command-line-tool epl soccer

livescore-cli's Introduction

livescore-cli - enjoy football scores live right from the linux terminal.

Sample Run

DEPENDENCIES

1. BeautifulSoup (python-bs4)

2. Requests (python-requests)

INSTALLATION

git clone https://github.com/codeezer/livescore-cli.git

cd livescore-cli

./setup (unix)

livescore -t bpl 

Description

livescore-cli is a small commandline program to watch scores, tables and fixtures of football(soccer) from the commandline. It requires the python version 3. It uses the data from the website livescore.com and some other websites. It is essentially built for the busy people that are passionate about football.

Features

    1. Real Time Livescore
    2. Game Time in Local Time 
    3. League Table with division

USAGE

usage: livescore.py [-h] [-v] [-t] [-s] [-ts] LEAGUE [LEAGUE ...]

A simple livescore tool. Currently works only for the Limited Leagues.

positional arguments:
  LEAGUE          The league for which the details have to be displayed.
                               Allowed values are [bundesliga, ligue1, seriea, bpl,
                               portugal, laliga]. For multiple choices, separate each
                               league name by a space.

optional arguments:
  -h, --help      show this help message and exit
  -v, --verbose   Display verbose output
  -t, --table     Display the League Table
  -s, --score     Display the Score
  -ts, --scorers  Display the Top Scorers

Sample uses: python livescore.py -s bpl
             python livescore.py -t laliga

For Comments and Suggestions: [email protected]

livescore-cli's People

Contributors

anujgtm1 avatar codeezer avatar sinecode avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

livescore-cli's Issues

setup command dont work

any help? argument linux is no accepted:

MikeDuxxi@linux:> git clone https://github.com/codeezer/livescore-cli.git
Cloning into 'livescore-cli'...
remote: Counting objects: 975, done.
remote: Total 975 (delta 0), reused 0 (delta 0), pack-reused 975
Receiving objects: 100% (975/975), 1.39 MiB | 671.00 KiB/s, done.
Resolving deltas: 100% (598/598), done.
MikeDuxxi@linux:
> cd livescore-cli
MikeDuxxi@linux:/livescore-cli> ./setup (linux)
bash: syntax error near unexpected token `linux'
MikeDuxxi@linux:
/livescore-cli> ll
total 24
drwxr-xr-x 2 MikeDuxxi users 156 Feb 4 17:28 lib
-rwxr-xr-x 1 MikeDuxxi users 1711 Feb 4 17:28 livescore.py
-rwxr-xr-x 1 MikeDuxxi users 6963 Feb 4 17:28 logo.png
-rwxr-xr-x 1 MikeDuxxi users 515 Feb 4 17:28 mac_setup
-rwxr-xr-x 1 MikeDuxxi users 2195 Feb 4 17:28 README.md
-rwxr-xr-x 1 MikeDuxxi users 176 Feb 4 17:28 setup
MikeDuxxi@linux:~/livescore-cli> ./setup
./setup: line 7: pip2: command not found

Hi everyone. Got the traceback problem again.

    Hi everyone. Got the traceback problem again. 
Traceback (most recent call last):
  File "/usr/local/bin/livescore", line 60, in <module>
    main()
  File "/usr/local/bin/livescore", line 33, in main
    lsprint.table(lsweb.get_table(URL[k][1]), k)
  File "/opt/livescore-cli/lib/lsprint.py", line 129, in table
    team_name = each_row[1]
IndexError: string index out of range

Originally posted by @johnpiers in #14 (comment)

Just wondering if this project is dead in the water or if it's going to be continued. I posted about this issue 5 months ago and no one seems to be responding. Anyway thanks all the same.

Traceback when trying to run livescore

I'm not really a boffin when it comes to this sort of thing, somebody could please help me out?

... Fetching information from www.livescore.com ... Displaying Table for Barclay's Premier League Traceback (most recent call last): File "/usr/local/bin/livescore", line 66, in <module> main() File "/usr/local/bin/livescore", line 32, in main lsprint.table(lsweb.get_table(URL[k][1]), k) File "/opt/livescore-cli/lib/lsweb.py", line 66, in get_table content = get_content_ts(url) File "/opt/livescore-cli/lib/lsweb.py", line 45, in get_content_ts [content] = soup.select('body > div.wrapper > div.content') ValueError: not enough values to unpack (expected 1, got 0)

Notifications

Show notification for today's matches.
Also notify "Match {team1} Vs {team2} started"

Hi everyone. Got the traceback problem again.

Hi everyone. Got the traceback problem again.

Traceback (most recent call last):
  File "/usr/local/bin/livescore", line 60, in <module>
    main()
  File "/usr/local/bin/livescore", line 33, in main
    lsprint.table(lsweb.get_table(URL[k][1]), k)
  File "/opt/livescore-cli/lib/lsprint.py", line 129, in table
    team_name = each_row[1]
IndexError: string index out of range

Originally posted by @johnpiers in #14 (comment)

Many minor bugs in the program

  1. There is some error in displaying the top-scorers for all 5 leagues. The error seems easily resolvable but I do not know the how.
    TRY: >>>python3 livescore.py -ts bpl
  2. You seem to have separated the team names in the score with space. So there seems to exist a problem if the team name has some symbol in between like in Saint-Etienne.
    TRY: >>>python3 livescore.py -s ligue1
  3. You seem to have specified the color in the league table(Champions League, Europa League and Relegation teams) by counting the number of rows. That seems to work for BPL but it does not work for all the other teams.(I figured we'd like to extend this to other leagues too).
    TRY: >>>python3 livescore.py -t portugal

The instruction to use the program can be seen in its help.
TRY: >>>python3 livescore.py --help

I'm getting: AttributeError: 'NoneType' object has no attribute 'find'

File "/home/peter/livescore-cli/livescore.py", line 50, in
main()
File "/home/peter/livescore-cli/livescore.py", line 24, in main
games = get_games(cname, event_type)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/peter/livescore-cli/lib/lsweb.py", line 101, in get_games
games = parse_games(soup)
^^^^^^^^^^^^^^^^^
File "/home/peter/livescore-cli/lib/lsweb.py", line 65, in parse_games
sp = soup.find('div', attrs={'data-testid': 'match_rows-root'}).find_all('div', recursive=False)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'find_all'

On Fedora 39.

Error during ./setup

Hi, when i try to install this program in my minimal debian installation i get a “this enviroment is externay managed” error, i have pip and python installed, and honestly i don’t know what to do since i tried every single thing but nothing worked.

Idea

I would be more than happy to add more leagues to this project. i love it:)

Traceback when trying to run livescore

Is this thing still relevant? I've never got it to work, all I get is this. Thanks.

Traceback (most recent call last):
File "/usr/local/bin/livescore", line 50, in
main()
File "/usr/local/bin/livescore", line 32, in main
table = get_table(cname, event_type)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/johnpiers/.livescore-cli/lib/lsweb.py", line 133, in get_table
table = parse_table(soup)
^^^^^^^^^^^^^^^^^
File "/home/johnpiers/.livescore-cli/lib/lsweb.py", line 117, in parse_table
body = lt.find('tbody')
^^^^^^^
AttributeError: 'NoneType' object has no attribute 'find'

Error in Score table

Command: python3 ./livescore.py -s seriea

Error :
Get the SCORES + this error

Traceback (most recent call last):
 File "./livescore.py", line 58, in <module>
   main()
 File "./livescore.py", line 35, in main
   lsprint.scores(lsweb.get_score(URL[k][1]), k)
 File "/home/user/livescore-cli/lib/lsprint.py", line 54, in scores
   away_team = each_row[3].strip()
IndexError: list index out of range

Bundesliga Table (numbers mixed up)

Hi! Love the livescore-cli! Thanks for the work! Just an issue to report; Some German clubs end with numbers (Schalke 04, Mainz 05, Hannover 96). The script interprets these numbers as GP, which then mixes up their league table data. Well, see screenshot :)

table

Python3 compatibility error

The displays seem to be a little incompatible with python3 but works perfectly fine for python2.

The decoration dashes seem to displaying one for each line only.
screenshot from 2016-03-19 17 48 46

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.