Kodi Community Forum

Full Version: Trying to write an Sports Scraper
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi all,

I'm trying to modify Sports Database scraper (2807166 (post)) to make it work for NBA games. I've tested it with Scraper XML Editor and it works but after deploying it in Kodi it doesn't. I'm getting this error, but can't see what the scraper is returning:
Quote:10:22:05.575 T:5896 DEBUG: ADDON::CScraper::FindMovie: Searching for 'NBA s1718' using The Sports Database scraper (path: 'C:\Users\XX\AppData\Roaming\Kodi\addons\metadata.thesportsdb.com', content: 'tvshows', version: '0.9.4')
10:22:05.579 T:5896 ERROR: ADDON::CScraper::Run: Unable to parse web site

Is there a way to have more info in the log file?

Thanks in advance.
Can you link to the NBA s1718 page on the site.
Yep, the URL I'm building is https://www.thesportsdb.com/api/v1/json/...=$INFO[language] and it works. But I think that Kodi is not even calling CreateSearchURL since the call doesn't appear in the log. I've seen other logs in the forum and all of them include something like "DEBUG: scraper: CreateSearchUrl returned <url>" and tha's not my case.
Create the advancedsettings.xml with content like this (maybe even higher log level):

        <setextraloglevel>64,1024, 16384</setextraloglevel>
Thanks, and where should I write this file?
Search the forum.
Eventually I found out where to place advancedsettings.xml. It's not easy at all in Windows 10. I've been making some advances but still need help. I'm using the following naming: NBA 2017-12-20 Los Angeles Lakers vs Houston Rockets

But I see CVideoInfoScanner is not considering the title of the match, only the date. Is it possible to configure it to take both? Can I modify this Regular Expression?
Quote:17:57:17.424 T:14612   DEBUG: VideoInfoScanner: Found date based match NBA/NBA s1718/NBA 2017-11-18 Philadelphia 76ers vs Golden State Warriors.18 11 720p EN 60fps NBCS.mkv (11/18/2017) [([0-9]{4})[\.-]([0-9]{2})[\.-]([0-9]{2})]17:57:18.342 T:14612   DEBUG: VideoInfoScanner: No NFO file found. Using title search for 'NBA/NBA s1718/NBA 2017-11-18 Philadelphia 76ers vs Golden State Warriors.18 11 720p EN 60fps NBCS.mkv'
17:57:18.342 T:14612   DEBUG: VIDEO::CVideoInfoScanner::OnProcessSeriesFolder - no match for show: 'NBA', season: -1, episode: -1.0, airdate: '11/18/2017', title: ''
I keep moving forward, I've finished a mod for The Sports DB scraper working fine for NBA games. Now I'd like to improve it with information from other web sites, for doing that I need to convert the sports db team's ID to team's short name. Is there an smart way to have a key value table in an scraper?

Thanks in advance!!