v20 TheSportsDB Python Scraper (for Nexus and Later)
#16
(2023-04-29, 02:20)Bakadori Wrote: Also, I understand that the database doesn't offer info for Practice or qualifying sessions either for this or F1, but is there a way to let those rogue files to show within the series? Or do I need to switch to file browser for those?

Thanks!
Anyone can add the practice and qualifying events to TheSportsDB.

Just check Formula 1 for examples.
Reply
#17
What would a good example of the folder and naming convention of and Australian National Rugby League game?

Currently I have:

F:/SPORTS/Australian National Rugby League/Season 2023/Australian National Rugby League.20230513.Raiders vs Eels.special.mkv

Id love to be able to use rounds if possible. As it is now, it is scraping the show. But no episodes populate.
Reply
#18
I added hyphens in between the dates, periods instead of all spaces. And I added the city names to the teams. So... :

F:/SPORTS/Australian National Rugby League/Season 2023/Australian.National.Rugby.League.2023-05-13.Canberra.Raiders.vs.Parramatta.Eels.mkv

It is populating a game now. But it's the wrong game. I think it's from the same date but a different game with different teams.
Reply
#19
With assiduously added to the filename it still adds the same incorrect game.

F:/SPORTS/Australian National Rugby League/Season 2023/Australian.National.Rugby.League.2023-05-13.Canberra.Raiders.vs.Parramatta.Eels.mkv
Reply
#20
With special added to the filename it still adds the same incorrect game.

F:/SPORTS/Australian National Rugby League/Season 2023/Australian.National.Rugby.League.2023-05-13.Canberra.Raiders.vs.Parramatta.Eels.special.mkv
Reply
#21
(2023-05-15, 23:44)mjc_cox Wrote: What would a good example of the folder and naming convention of and Australian National Rugby League game?

Currently I have:

F:/SPORTS/Australian National Rugby League/Season 2023/Australian National Rugby League.20230513.Raiders vs Eels.special.mkv

Id love to be able to use rounds if possible. As it is now, it is scraping the show. But no episodes populate.
Of your attempts, this was the closet one.  Looking at the data for that game, I think the name needs to be:

Australian National Rugby League.20230513.Canberra Raider vs Parramatta Eels.special.mkv

The game name must match the data from the site pretty close.  The example in the first post only has team names because that's what Premiere League has.  For yours, the names I provided are from the site.  If that doesn't work, I'd need to see a full debug log.
Reply
#22
Yep... That did it. I was so close! Cheers!
Reply
#23
I'm writing a script to rename files to work with these naming conventions. Is there any way to use the rounds instead of the date in sportsdb? I noticed that there are rounds "r11" on the site. I am currently adding the CreationTime in yyyyMMdd format. But if I'm adding something from the past it will still add this date to it as that's the date the file was created. All told this is my first time trying anything like this. OpenAI is helping. If you'd like to see the script I'd be happy to upload.
Reply
#24
(2023-05-18, 17:19)mjc_cox Wrote: I'm writing a script to rename files to work with these naming conventions. Is there any way to use the rounds instead of the date in sportsdb? I noticed that there are rounds "r11" on the site. I am currently adding the CreationTime in yyyyMMdd format. But if I'm adding something from the past it will still add this date to it as that's the date the file was created. All told this is my first time trying anything like this. OpenAI is helping. If you'd like to see the script I'd be happy to upload.
It depends.  You can use "season" and "episode numbers, but they have to match the data in the json response from the site API, and I don't think that's necessarily visible on the site anywhere, and it probably doesn't correspond to rounds.  A season is an entire year.  Each episode in the season is a game.  We're trying to do a little bit of a square peg, round hole here, because for things to get scraped as a TV show they have to have seasons and episodes.  I think the only option for the sport you are doing is really the date with team names.

I'm not really in a position to do support for one-off scripts for renaming, so there's no need to upload it.
Reply
#25
sounds good. also, are there some outdated information on thesportsdb site? Following what's written here: (https://github.com/TralahM/thesportsdb/b...ettings.py) I have tried entering the URLs into a web browser and get 404 errors for everything. For example (https://www.thesportsdb.com/api/v1/json/...hp?id=4416). Is there a more updated version somewhere? OR am I just doing something horribly wrong?
Reply
#26
(2023-05-19, 03:09)mjc_cox Wrote: sounds good. also, are there some outdated information on thesportsdb site? Following what's written here: (https://github.com/TralahM/thesportsdb/b...ettings.py) I have tried entering the URLs into a web browser and get 404 errors for everything. For example (https://www.thesportsdb.com/api/v1/json/...hp?id=4416). Is there a more updated version somewhere? OR am I just doing something horribly wrong?
I have no idea what that is.  That isn't the scraper that I wrote.  The one I wrote (and the one this thread discusses) is in the official Kodi repo for Kodi Nexus or later.  You can also find the code on my GitHub repo at:

https://github.com/pkscout/metadata.tvsh...sdb.python
Reply
#27
(2023-05-19, 03:09)mjc_cox Wrote: sounds good. also, are there some outdated information on thesportsdb site? Following what's written here: (https://github.com/TralahM/thesportsdb/b...ettings.py) I have tried entering the URLs into a web browser and get 404 errors for everything. For example (https://www.thesportsdb.com/api/v1/json/...hp?id=4416). Is there a more updated version somewhere? OR am I just doing something horribly wrong?
Thats the 3rd party python module, not the scraper Smile
Reply
#28
For anyone wishing to discuss filenames or content we have a discord channel here:

https://discord.gg/w4M2JAZk

It has a specific section for the Kodi and Plex scrapers now.

Also you can scroll down on any event and click "Show Filenames" to see an example filename for each scraper:

https://www.thesportsdb.com/event/1744367?fn=1#fn
Reply
#29
I have an issues with scraping MMA events using the scraper.  The issue is having multiple events on the same day (hello special tag!) that are not listed on the scraper (I know I can add them). Specifically UFC/Bellator that have separate fils for Prelims, Early Prelims, Main card. The scraper just lists the event once. All files will get scrapped correctly, but in Kodi I see 3 entries fo the same event. Stacking in Kodi settings does nothing here.  I have to add 'e' 'p' 'ppv' to the end of the file name so that Kodi list them in order.
Any suggestions on how to handle this?
Reply
#30
(2023-06-27, 19:23)htpc-mac Wrote: I have an issues with scraping MMA events using the scraper.  The issue is having multiple events on the same day (hello special tag!) that are not listed on the scraper (I know I can add them). Specifically UFC/Bellator that have separate fils for Prelims, Early Prelims, Main card. The scraper just lists the event once. All files will get scrapped correctly, but in Kodi I see 3 entries fo the same event. Stacking in Kodi settings does nothing here.  I have to add 'e' 'p' 'ppv' to the end of the file name so that Kodi list them in order.
Any suggestions on how to handle this?

Yeh thats a difficult one. Do you have exact examples?
Reply

Logout Mark Read Team Forum Stats Members Help
TheSportsDB Python Scraper (for Nexus and Later)0