20 Nov 2019 - TVDB Scraper v3.2.0 is now available which reinstates scraping. TVDB are still in the process of fixing a number of bugs so there may still be further breakages. See this post. 2901570 (post)

Trying to write an Sports Scraper
#1
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.
Reply
#2
Can you link to the NBA s1718 page on the site.
My Signature
Links to : Forum rules (wiki) | 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/...=$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):

<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
 
Thread Rating:
  • 0 Vote(s) - 0 Average



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