Git Product home page Git Product logo

Comments (1)

amosbastian avatar amosbastian commented on May 27, 2024 1

Hey @Zatfer17 since the package is just scraping Understat's website it's not always possible to mimic their functionality. The filtering they do on the website is done on their backend so we can't do the same, but you can you can always filter it manually yourself (probably best) or by using any of the keys as shown in the documentation:

async def main():
    async with aiohttp.ClientSession() as session:
        understat = Understat(session)
        results = await understat.get_team_players(
            "Manchester United",
            2018,
            position="F S"
        )
        print(json.dumps(results))

loop = asyncio.get_event_loop()
loop.run_until_complete(main())
[
    {
        "id": "594",
        "player_name": "Romelu Lukaku",
        "games": "27",
        "time": "1768",
        "goals": "12",
        "xG": "12.054240763187408",
        "assists": "0",
        "xA": "1.6836179178208113",
        "shots": "50",
        "key_passes": "17",
        "yellow_cards": "4",
        "red_cards": "0",
        "position": "F S",
        "team_title": "Manchester United",
        "npg": "12",
        "npxG": "12.054240763187408",
        "xGChain": "12.832402393221855",
        "xGBuildup": "3.366600174456835"
    }
]

from understat.

Related Issues (17)

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.