Site
Home / Forum / General Discussion / Australian NPL Soccer

Australian NPL Soccer


Posted: 22 Jun 2021 03:48
cardinaldiehard25
Posts: 162
Joined: 2021-05-22

The NPL is spread across 8 divisions and contains 90 teams. Is there a reason there are only 13 currently listed in the league? I’ve stayed out of soccer as there seems to be plenty of automation and I don’t want to mess anything up with the live scores. Let me know if I can help out by adding some of the teams.

https://www.thesportsdb.com/league/4620-Australian-National-Premier-Leagues

Posted: 22 Jun 2021 07:15
curswine
Posts: 870
Joined: 2020-06-17

The NPLs have been a bit of a behemoth I've been meaning to tackle for some time, I've got the league logos in a folder actually. The teams you see have just been added when needed for a player's team history.

If you want to take a swing at it, be my guest. Are you aware of the API ID data we use?

cardinaldiehard25
Posted: 22 Jun 2021 08:31

zag
Posts: 3,331
Joined: 2020-03-23

Yes we can import players for soccer automatically, but the teams are a manual process and need to be linked to an API-football ID.

I've stayed away from the lower leagues as they can get complicated! But no reason not to do them.

cardinaldiehard25
Posted: 22 Jun 2021 13:20
cardinaldiehard25
Posts: 162
Joined: 2021-05-22

I think I have seen some google sheets with basketball and hockey IDs. Is there a source I can view that shows me the IDs for soccer? I gave the older pages on the forum a glance and didn't see it. I have also seen something about it auto-looking up IDs. For that does the name of the team have to be the same as the name in the API being used?

I could write a script that adds the team, fills in the API ID, and then uploads the logos that you guys already have saved. I could also just add the teams and the IDs and then start manually creating and uploading the badges.

Good to know that it is okay for me to add soccer teams in the future without messing things up. My site rates how exciting games are, so I will notice any teams missing on the site that way as I use Flashscore for all of my scores. I think at some point I will switch to this site for that.

Posted: 22 Jun 2021 13:50
curswine
Posts: 870
Joined: 2020-06-17

I think I have seen some google sheets with basketball and hockey IDs. Is there a source I can view that shows me the IDs for soccer? I gave the older pages on the forum a glance and didn't see it. I have also seen something about it auto-looking up IDs. For that does the name of the team have to be the same as the name in the API being used?

https://thesportsdb.com/sync_apifootball_leagues.php?c=Australia

You can navigate to other country's API IDs below the list of leagues, these are all 2020 leagues at the moment, Zag will probably do a refresh soon so that only 2021 league IDs show.

You can manually look at what leagues need their ID updating by using this url https://www.thesportsdb.com/sync_apifootball_leagues2.php?id= and adding the 4-digit number at the end, (3471 is currently the most recent addition).

You can name teams whatever you like, it doesn't have to follow what the API ID says, their names can sometimes be out of date, so use whatever the latest information you have available when it comes to that.

I could write a script that adds the team, fills in the API ID, and then uploads the logos that you guys already have saved. I could also just add the teams and the IDs and then start manually creating and uploading the badges.

When I said I had logos, I meant only logos for the leagues themselves. They were hard to find in good quality until I found a PDF I could rip them from.

Good to know that it is okay for me to add soccer teams in the future without messing things up. My site rates how exciting games are, so I will notice any teams missing on the site that way as I use Flashscore for all of my scores. I think at some point I will switch to this site for that.

You're doing great work, I always love seeing more leagues added, so please be my guest.

I was hoping to get all of the second tiers in Europe and South America added and then tackling the big ones like the Australian NPLs, German Oberligas, and Brazilian Serie D, but time restraints got in the way a little bit for me.




cardinaldiehard25
Posted: 22 Jun 2021 16:04
cardinaldiehard25
Posts: 162
Joined: 2021-05-22

All of the teams have been added with their API IDs, Year Established, Stadium Name, Stadium Location, and Team Wiki Description.

All of the teams are now matched to IDs if we can refresh the schedule (don't know if that is something I can do). I don't know if we want to split the league up into the multiple divisions or not before adding schedules.

We should add FFA Cup at some point whenever that gets close to starting again.
https://en.wikipedia.org/wiki/FFA_Cup

Update: All badges done! Lots of high quality badges from the club Facebook pages just had to make the background transparent.

Posted: 22 Jun 2021 21:52
curswine
Posts: 870
Joined: 2020-06-17

All of the teams have been added with their API IDs, Year Established, Stadium Name, Stadium Location, and Team Wiki Description.

All of the teams are now matched to IDs if we can refresh the schedule (don't know if that is something I can do). I don't know if we want to split the league up into the multiple divisions or not before adding schedules.

We should add FFA Cup at some point whenever that gets close to starting again.
https://en.wikipedia.org/wiki/FFA_Cup

Update: All badges done! Lots of high quality badges from the club Facebook pages just had to make the background transparent.


FFA Cup would be great to add now with all NPL teams you've added, hopefully there will be an API ID for it, not there according to the 2020 list but maybe will be for 2021.

I'll update whatever logos I can find better versions of, but I think you've done another great job here.

Just a side query, could you say approximately how much work you did manually and how much was automated?

Posted: 22 Jun 2021 22:29
cardinaldiehard25
Posts: 162
Joined: 2021-05-22

Just a side query, could you say approximately how much work you did manually and how much was automated?

I manually collected all of the information and automated the entry of that information to the site. I copied all of the NPL teams that didn't have an API ID in the link you provided and found the wiki pages for each. Thank you for telling me to double check names as a sizable chunk of the API football id names were not unique enough or outdated. Badges were all completely manual, I do have a function that pads the images for me though if it doesn't come as a square.

Overall, adding teams was very quick given how many there were, and it is always fun to watch the Chrome browser when the code kicks off fill everything out for you. Let me know if you want help with any of the other soccer leagues you mentioned above. Of the leagues you mention Brazil Serie D is probably of most interest to me as you can stream the games on myCujoo (now known as Eleven Sports) in the US. I try to track any league that is televised or streamed in the US on my site.

This was the function I used to add the teams: https://github.com/BlakeDuncan25/TheSportsDB-Contribution-Functions/blob/021c931362eabc8bdb6200408c9a8b4b5320bcc1/TheSportsDBFunctions.py#L273-L321

I also created a basic version of that function when I updated Women's World Handball Championship which required me to create 26 new teams in order to add past events.


Posted: 22 Jun 2021 22:49
curswine
Posts: 870
Joined: 2020-06-17

Just a side query, could you say approximately how much work you did manually and how much was automated?

I manually collected all of the information and automated the entry of that information to the site. I copied all of the NPL teams that didn't have an API ID in the link you provided and found the wiki pages for each. Thank you for telling me to double check names as a sizable chunk of the API football id names were not unique enough or outdated. Badges were all completely manual, I do have a function that pads the images for me though if it doesn't come as a square.

Overall, adding teams was very quick given how many there were, and it is always fun to watch the Chrome browser when the code kicks off fill everything out for you. Let me know if you want help with any of the other soccer leagues you mentioned above. Of the leagues you mention Brazil Serie D is probably of most interest to me as you can stream the games on myCujoo (now known as Eleven Sports) in the US. I try to track any league that is televised or streamed in the US on my site.

This was the function I used to add the teams: https://github.com/BlakeDuncan25/TheSportsDB-Contribution-Functions/blob/021c931362eabc8bdb6200408c9a8b4b5320bcc1/TheSportsDBFunctions.py#L273-L321

I also created a basic version of that function when I updated Women's World Handball Championship which required me to create 26 new teams in order to add past events.


It sounds like you do it in a similar fashion to me, although your way seems to be a lot more efficient.

I too love the satisfaction of watching a script run and adding teams with Selenium.

I'll take a look at your scripts later, do you mind if I adapt any of your code into my own, as you seem far more proficient than I am.

Please add anything you like, if there isn't a league for it then it can always be added to https://thesportsdb.com/league/4834-_No-League-Soccer until Zag creates the relevant league for the team.

I had to brute force my way into finding the most recent API IDs for each league, but I did spot a few teams missing:
Logan Lightning - 11180 - https://en.wikipedia.org/wiki/Logan_Lightning_FC
South Adelaide Panthers - 3795 - https://en.wikipedia.org/wiki/South_Adelaide_Panthers_FC
Sturt Lions - 12866 - https://en.wikipedia.org/wiki/Sturt_Lions_FC

cardinaldiehard25
Posted: 22 Jun 2021 23:45
cardinaldiehard25
Posts: 162
Joined: 2021-05-22

Yes, you should be able to clone the repo and start using the functions. You can also create GitHub issues in the repo for some functions you think I should write. Let me know if you run into permission issues. I believe I abstracted the functions to where you should be able to use them out of the box, would just need to change code to where your Chrome driver is located.

I can also make a README with examples of how I actually use the functions as it can probably be overwhelming/confusing just reading the functions.

Also added the 3 additional Australian teams.

Posted: 23 Jun 2021 11:38

zag
Posts: 3,331
Joined: 2020-03-23

Yey! Go team

I will create the separate NPL leagues so we can sync the events properly.

https://www.thesportsdb.com/league/4620-Australian-National-Premier-Leagues
https://www.thesportsdb.com/league/5013-Australia-Brisbane-Premier-League
https://www.thesportsdb.com/league/5011-Australia-New-South-Wales-NPL
https://www.thesportsdb.com/league/5010-Australia-Northern-NSW-NPL
https://www.thesportsdb.com/league/5017-Australia-Northern-Territory-Premier-League
https://www.thesportsdb.com/league/5014-Australia-Queensland-NPL
https://www.thesportsdb.com/league/5012-Australia-Victoria-NPL

cardinaldiehard25, curswine
Posted: 23 Jun 2021 15:31
curswine
Posts: 870
Joined: 2020-06-17

Thanks Zag, just missing Tasmania ...

Australia Tasmania NPL (3064)

And https://www.thesportsdb.com/league/4620-Australian-National-Premier-Leagues should be renamed Australia ACT NPL.

cardinaldiehard25, zag
Posted: 23 Jun 2021 15:35
cardinaldiehard25
Posts: 162
Joined: 2021-05-22

Thanks Zag, just missing Tasmania ...

Australia Tasmania NPL (3064)

And https://www.thesportsdb.com/league/4620-Australian-National-Premier-Leagues should be renamed Australia ACT NPL.


Additionally,

I added the teams to Brisbane Premier League and Northern Territory

Can you please move Brisbane Premier League to Division 4?

From wiki:
The Brisbane Premier League (BPL), also known as the Flight Centre Premier League, is the first tier of senior soccer in Brisbane, Queensland (third tier in Queensland and fourth overall in Australia). It is run and administered by Football Brisbane. Twelve teams play a twenty-two match regular season, with the team at the top of the table designated as 'Premiers', and the top four teams qualifying for a finals series.


Posted: 23 Jun 2021 18:38

zag
Posts: 3,331
Joined: 2020-03-23

done!

cardinaldiehard25, curswine

Who is Online?

In total there are 68 users online :: 3 registered, 0 hidden and 65 guests (based on users active over the past 5 minutes) Most users ever online was 424 on Fri Nov 10, 2017 9:02 pm

About Us

Discussion forum for TheSportsDB.com site and related topics

Rules

- Be Polite
- Respect other users
- Always post log files with issues
- Try to be helpful
- No Piracy discussion

Showing 0 to 14 (Total: 14)