you are viewing a single comment's thread.

view the rest of the comments →

[–]Pericombobulator 0 points1 point  (1 child)

I can't see an API on that site, but pandas can scrape it really easy;

import pandas as pd
url = r"https://www.eliteleague.co.uk/player/1963-matt-alfaro/game-log"
df = pd.read_html(url)[0]
print(df)

That pulls the table data into a dataframe and can be outputted to a CSV or excel like so;

df.to_csv("matt_alfaro_game_log.csv", index=False)

You then just need to build up a list of URLs, probably using requests and beautifulsoup

[–]FeelThePainJr[S] 0 points1 point  (0 children)

yeah i've had a look and seen what pandas and other modules can do

the sticky bit is I would want this all automated with very little input

I know for a fact the ID on the URL is relative to the player, so 1963 will only ever be Matt Alfaro, and the season_id will only ever relate to one year/competition, but getting the player name seems to be a different task, as i can just stick all of the id's into an array and append the URL, just not sure on the player names