Trying to write an Sports Scraper
#1
Hi all,

I'm trying to modify Sports Database scraper (https://forum.kodi.tv/showthread.php?tid...pid2807166) 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.
Reply
#2
Can you link to the NBA s1718 page on the site.
My Signature
Links to : Official:Forum rules (wiki) | Official:Forum rules/Banned add-ons (wiki) | Debug Log (wiki)
Links to : HOW-TO:Create Music Library (wiki) | HOW-TO:Create_Video_Library (wiki)  ||  Artwork (wiki) | Basic controls (wiki) | Import-export library (wiki) | Movie sets (wiki) | Movie universe (wiki) | NFO files (wiki) | Quick start guide (wiki)
Reply
#3
Yep, the URL I'm building is https://www.thesportsdb.com/api/v1/json/...9&language=$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.
Reply
#4
Create the advancedsettings.xml with content like this (maybe even higher log level):

xml:
<advancedsettings>
    <loglevel>1</loglevel>
    <debug>
        <extralogging>false</extralogging>
        <setextraloglevel>64,1024, 16384</setextraloglevel>
        <showloginfo>true</showloginfo>
    </debug>
</advancedsettings>
Reply
#5
Thanks, and where should I write this file?
Reply
#6
Search the forum.
Reply
#7
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: ''
Reply
#8
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!!
Reply

Logout Mark Read Team Forum Stats Members Help
Trying to write an Sports Scraper0