Solved XBMC not scraping url if result empty?
#1
EDIT: I'm so sorry! It actually turned out that it wasn't because of TMDB returning 0 results. It was my regex pattern! I feel so stupid...

Hello,

I'm working on a scraper that scrapes a swedish site for content and then scrapes TMDB for art. So I'm executing a url function that fetches TMDB results. However, I'm experiencing a weird issue when scraping TMDB and results are empty. The XBMC log then says "ERROR: Run: Unable to parse web site" and it seems it doesn't continue with the function.

At first I thought it was some encoding issue, but I realized soon that it can't be. I noticed this behavior when scraping a movie that contained some swedish characters (ä & ö) and a year that didn't match the one on TMDB - consequently the results were none. If I just changed the year to the correct one, everything worked fine. The characters were still there so they were not causing the problem.

I then tried to just force my scraper to search for some weird name (only ASCII characters though) that I knew would gain zero results - there the error was again: "ERROR: Run: Unable to parse web site".

So it seems that, whenever TMDB returns no results, XBMC is unable to parse the website. Now, inside my url function I have a regex that checks whether results where found or not, but obviously this doesn't work since the function isn't executed at all.

Has anyone else noticed this? What would be the best way to get around it?

Thanks!
Reply

Logout Mark Read Team Forum Stats Members Help
XBMC not scraping url if result empty?0