• 1
  • 6
  • 7
  • 8(current)
  • 9
  • 10
  • 11
Release [TSDB] - The Sports Database Video Scraper
I don't think so. For instance, if we use a workaround naming the folders "NBA S1516" and we pass through all the scraper the season, the scraper is not going to need the games of other seasons. Then we should call "Scan for new content" on every one of those folders, but I think it's going to work out.
Reply
@scudlee Can you explain how the TVShow scraper works(which this is based on)? Does the scraper need the whole episode list for the entire show before it can do lookups or is it possible to only make API requests by season one at a time?

Basically this scraper is very inefficient at the moment.

SOURCE: https://github.com/zag2me/metadata.thesp...r/tsdb.xml
Reply
Hi, the time I've been struggling with scraping NBA games I've seen there are some problems:
  • Trying to match by date doesn't work well since usually there are several games in the same date
  • Trying to match by round is impossible since NBA doesn't have rounds
  • TV Shows scrapers work retrieving all the episodes for the show in GetDetails, and this number in the NBA is huge

I've figured out a workaround looking at basketballreference.com. They identify every game by date and home team, that's to say 201810160BOS (https://www.basketball-reference.com/bo ... 60BOS.html). I think I can make it up if the Sports DB API returned the short name of the teams with the event. I've asked for it in the Sports DB Forum.

Any idea to the third point? I've tried to search by season but can't see how to deploy it, because Kodi way of work is supposed to retrieve ALL the episodes for the whole League.
Reply
Well, I can't find help with this, maybe I'm writing in the wrong place. Does anyone know any thread explaining in a detailed way how TV Show Scrapers work?
Reply
What you describe is expected behavior yes and it is a limitation of the scraper. But you can go to the TSDB site and change the "round" number to something unique and it should scrape. Thats what I do, its not ideal but it does work for team sports.

I like the idea of your workaround but I was waiting until Kodi v18 is released (should be very soon) then we can start looking at using the new python scraper feature for sports.

What really needs to happen is a core developer modifies TVShow functionality a bit to allow sports to be natively supported in Kodi.
Reply
But if I change the round in Sports DB other users will be affected!

I still don't understand very well how Kodi scans folders and files when they are TV Shows. I guess in the case of NBA files they are matched by date but then the scanner doesn't take the title. If this behaviour could be modified...

I've thought in another workaround dealing with team sports as movies and sagas as season, but I'm not very sure it'll work out.
Reply
(2019-01-28, 10:59)docwra Wrote: I like the idea of your workaround but I was waiting until Kodi v18 is released (should be very soon) then we can start looking at using the new python scraper feature for sports.
Hi @docwra , I got to make my workaround work. But now I'm facing that when calling GetEpisodeList I'm only retrieving episodes from the last season (and a few of the former season) because of the API's limitiation.

I guess it'll work if I get to pass, in any way, the season to GetDetails for building a call like https://www.thesportsdb.com/api/v1/json/...1&s=SEASON. Do you have any idea on that?

For instance:
  1. First scan NBA folder, matching last season episodes
  2. Then scan other season's folder (NBA\Season 1718)
Can I get this folder name to call the scraper with the season?
Reply
Please, take a look at this log, if I could take the season from folder name:
python:
11:14:38.353 T:2236   DEBUG: VideoInfoScanner: Rescanning dir 'smb://WDMYCLOUD/Public/Shared Videos/Partidos/NBA/Season 1718/' due to change (3f3376b4d737d2de7e0f9e7e85eda176 != 785650d4471bbe50359028fa212de370)
11:14:38.353 T:2236   DEBUG: VideoInfoScanner: Found episode match smb://WDMYCLOUD/Public/Shared Videos/Partidos/NBA/Season 1718/NBA S1718xE2017102674 (2017-10-26).Milwaukee Bucks vs Boston Celtics.720p.EN.60fps.TNT.mkv (s1718e2017102674) [s([0-9]+)[ ._x-]*e([0-9]+(?Sad?:[a-i]|\.[1-9])(?![0-9]))?)([^\\/]*)$]
11:14:38.354 T:2236   DEBUG: VideoInfoScanner: Found episode match smb://WDMYCLOUD/Public/Shared Videos/Partidos/NBA/Season 1718/NBA S1718xE2017102779 (2017-10-27) San Antonio Spurs vs Orlando Magic.EN 60fps Fox Sport.mkv (s1718e2017102779) [s([0-9]+)[ ._x-]*e([0-9]+(?Sad?:[a-i]|\.[1-9])(?![0-9]))?)([^\\/]*)$]
11:14:38.354 T:2236   DEBUG: VideoInfoScanner: Found episode match smb://WDMYCLOUD/Public/Shared Videos/Partidos/NBA/Season 1718/NBA S1718xE2017110774 (2017-11-07) Milwaukee Bucks vs Cleveland Cavaliers.EN 60fps Fox Sport.mkv (s1718e2017110774) [s([0-9]+)[ ._x-]*e([0-9]+(?Sad?:[a-i]|\.[1-9])(?![0-9]))?)([^\\/]*)$]
11:14:38.354 T:2236   DEBUG: VideoInfoScanner: Found episode match smb://WDMYCLOUD/Public/Shared Videos/Partidos/NBA/Season 1718/NBA S1718xE2017110777 (2017-11-07) Memhpis Grizzlies vs Portland Trail Blazers.720p EN 60fps.mkv (s1718e2017110777) [s([0-9]+)[ ._x-]*e([0-9]+(?Sad?:[a-i]|\.[1-9])(?![0-9]))?)([^\\/]*)$]
11:14:38.354 T:2236   DEBUG: VideoInfoScanner: Found episode match smb://WDMYCLOUD/Public/Shared Videos/Partidos/NBA/Season 1718/NBA S1718xE2017111863 (2017-11-18).Philadelphia 76ers vs Golden State Warriors.18 11 720p EN 60fps NBCS.mkv (s1718e2017111863) [s([0-9]+)[ ._x-]*e([0-9]+(?Sad?:[a-i]|\.[1-9])(?![0-9]))?)([^\\/]*)$]
11:14:38.354 T:2236   DEBUG: VideoInfoScanner: Found episode match smb://WDMYCLOUD/Public/Shared Videos/Partidos/NBA/Season 1718/NBA S1718xE2017122067 (2017-12-20).Los Angeles Lakers vs Houston Rockets.20 12 720p EN 30fps Away.mkv (s1718e2017122067) [s([0-9]+)[ ._x-]*e([0-9]+(?Sad?:[a-i]|\.[1-9])(?![0-9]))?)([^\\/]*)$]
11:14:38.355 T:2236   DEBUG: VideoInfoScanner: Found episode match smb://WDMYCLOUD/Public/Shared Videos/Partidos/NBA/Season 1718/NBA S1718xE2017122565 (2017-12-25) Golden State Warriors vs Cleveland Cavaliers.25 12 720p EN 60fps ESPN.mkv (s1718e2017122565) [s([0-9]+)[ ._x-]*e([0-9]+(?Sad?:[a-i]|\.[1-9])(?![0-9]))?)([^\\/]*)$]
11:14:38.355 T:2236   DEBUG: VideoInfoScanner: Found episode match smb://WDMYCLOUD/Public/Shared Videos/Partidos/NBA/Season 1718/NBA S1718xE2018012663 Philadelphia 76ers vs San Antonio Spurs 26 01 720p EN 30fps FoxS.mkv (s1718e2018012663) [s([0-9]+)[ ._x-]*e([0-9]+(?Sad?:[a-i]|\.[1-9])(?![0-9]))?)([^\\/]*)$]
11:14:38.355 T:2236   DEBUG: VideoInfoScanner: Found episode match smb://WDMYCLOUD/Public/Shared Videos/Partidos/NBA/Season 1718/NBA S1718xE2018032389.Utah Jazz vs San Antonio Spurs 23 03 1080p POL 25fps Sport+.ts (s1718e2018032389) [s([0-9]+)[ ._x-]*e([0-9]+(?Sad?:[a-i]|\.[1-9])(?![0-9]))?)([^\\/]*)$]
11:14:38.364 T:2236   DEBUG: ADDON::CScraper::GetEpisodeList: Searching 'https://www.thesportsdb.com/api/v1/json/8235861265252/eventsseason.php?id=4387&all=yes' using The Sports Database scraper (file: 'C:\Users\XXX\AppData\Roaming\Kodi\addons\metadata.thesportsdb.com', content: 'tvshows', version: '0.9.4')
11:14:38.378 T:2236   DEBUG: CurlFile::Open(0x159ca435030) https://www.thesportsdb.com/api/v1/json/...87&all=yes
Reply
(2019-02-01, 14:15)Mitico Wrote: Please, take a look at this log,
That is not a log file, but only a very small portion of a log file.
We very much prefer the full log file, via a pastebin website near you.
Reply
I know, it's only the part I'm asking about.
Reply
Yes I think I had to limit the the API to 1,500 events so it might restrict older seasons. I would test with the current season first then work on older events.
Reply
I've tested with lots of files from the current season and it works!! I keep fighting with the eventseason call, trying to figure out how to do a call per season. I've tried with nfo files, but I think it's not the way...
Reply
I personally only use it for WWE and UFC events at the moment and it works well because there are not many of them and they are all on different dates.
Reply
I did it!!!! It works for all my files whatever season it belongs!! I want to make some more improvements and I can publish it as a Mod or whatever...
Reply
Please do publish any improvements as the original author is long gone now. Maybe a new thread is needed.
Reply
  • 1
  • 6
  • 7
  • 8(current)
  • 9
  • 10
  • 11

Logout Mark Read Team Forum Stats Members Help
[TSDB] - The Sports Database Video Scraper3