Kodi Community Forum
OMDB API Unstable? - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Scrapers (https://forum.kodi.tv/forumdisplay.php?fid=60)
+--- Thread: OMDB API Unstable? (/showthread.php?tid=350938)



OMDB API Unstable? - smitchell6879 - 2020-01-13

I am playing around with the omdb api and i find that only 1 out of 10 request actually comeback usable. All request status_codes are 200 so i know the url is correct. Has anyone else experienced this as I would like to use the api but I want it be reliable. I have not donated yet, may that be the reason?


RE: OMDB API Unstable? - sualfred - 2020-01-14

It's working quite well, but sometimes the server aren't responding correctly. 

As workaround I've placed it in a loop with a timeout of 5s and 3 retries.

python:

for i in range(1,4): # loop if heavy server load
            log('OMDb call try %s/3' % str(i), force=RATING_DEBUG)
            try:
                request = requests.get(url, timeout=5)
                if not str(request.status_code).startswith('5'):
                    break

            except Exception:
                if i < 3:
                    xbmc.sleep(500)
                else:
                    log(error_msg + '408', WARNING)
                    return



RE: OMDB API Unstable? - smitchell6879 - 2020-01-14

(2020-01-14, 19:02)sualfred Wrote: It's working quite well, but sometimes the server aren't responding correctly. 

As workaround I've placed it in a loop with a timeout of 5s and 3 retries.

python:

for i in range(1,4): # loop if heavy server load
            log('OMDb call try %s/3' % str(i), force=RATING_DEBUG)
            try:
                request = requests.get(url, timeout=5)
                if not str(request.status_code).startswith('5'):
                    break

            except Exception:
                if i < 3:
                    xbmc.sleep(500)
                else:
                    log(error_msg + '408', WARNING)
                    return
Thanks had not even though about this.


RE: OMDB API Unstable? - chrissix666 - 2020-01-31

Working also quite well on my side. I just mentioned the awards tag isn't updated for plenty of movies since 2018. Some data filled, some not. Before 2018 in almost every case filled.
Also in summer and autumn 2019 the tomatometerallaudience wasn't responding data for a long time on really a lot of movies. But it's all fine again now. In most cases ratings votes are equal to the websites from original source.
I really hope Letterboxd ratings votes will find it's way into OMDB cause the API is out now and Letterboxd is getting from day to day more popular.


RE: OMDB API Unstable? - Edworld - 2020-07-24

(2020-01-31, 23:55)chrissix Wrote: Working also quite well on my side. I just mentioned the awards tag isn't updated for plenty of movies since 2018. Some data filled, some not. Before 2018 in almost every case filled.
Also in summer and autumn 2019 the tomatometerallaudience wasn't responding data for a long time on really a lot of movies. But it's all fine again now. In most cases ratings votes are equal to the websites from original source.
I really hope Letterboxd ratings votes will find it's way into OMDB cause the API is out now and Letterboxd is getting from day to day more popular.
I really like letterboxd, I hope it is added soon...