2015-01-17, 03:20
Just wondering if anyone can explain under what circumstances imdb.com will respond with 403 Forbidden when requesting actor thumbnails (and possibly other artwork, however actor thumbs are the only remote artwork I have in my library so the only artwork type where I'm seeing this issue).
Sometimes it will work, but quite often the request - whether initiated via JSON or a scraper - will receive a 403 Forbidden response.
For example - this actor, when requesting the URL via JSON:
results in the following JSON error:
and the Kodi curl request/response:
It's the same with scrapers - some actor thumb requests work, a lot don't, receiving the same 403 Forbidden response.
Is imdb.com employing some sort of anti-abuse counter measure, such as only so many requests allowed per second/minute/hour etc.? If we understood what the limits are then it might be possible to avoid hammering imdb.com when we're guaranteed to get an error response.
Sometimes it will work, but quite often the request - whether initiated via JSON or a scraper - will receive a 403 Forbidden response.
For example - this actor, when requesting the URL via JSON:
Code:
curl --data-binary '{"jsonrpc": "2.0", "params": {"path": "image://http%3a%2f%2fia.media-imdb.com%2fimages%2fM%2fMV5BMTMyMTQzMzYyMl5BMl5BanBnXkFtZTcwMTgyNjk4Ng%40%40._V1._SY275_SX400_.jpg/"}, "method": "Files.PrepareDownload", "id": "preparedl"}' -H 'content-type:application/json;' 'http://192.168.0.8:8080/jsonrpc'
results in the following JSON error:
Code:
{"error":{"code":-32602,"data":{"details":null},"message":"Invalid params."},"id":"preparedl","jsonrpc":"2.0"}
and the Kodi curl request/response:
Code:
00:49:03 28725.927734 T:2785047616 DEBUG: webserver: request received for /jsonrpc
00:49:03 28725.927734 T:2785047616 DEBUG: JSONRPC: Incoming request: {"jsonrpc": "2.0", "params": {"path": "image://http%3a%2f%2fia.media-imdb.com%2fimages%2fM%2fMV5BMTMyMTQzMzYyMl5BMl5BanBnXkFtZTcwMTgyNjk4Ng%40%40._V1._SY275_SX400_.jpg/"}, "method": "Files.PrepareDownload", "id": "preparedl"}
00:49:03 28725.931641 T:2785047616 INFO: easy_aquire - Created session to http://ia.media-imdb.com
00:49:03 28725.994141 T:2785047616 DEBUG: Curl::Debug - TEXT: Trying 23.62.53.72...
00:49:03 28726.017578 T:2785047616 DEBUG: Curl::Debug - TEXT: Connected to ia.media-imdb.com (23.62.53.72) port 80 (#0)
00:49:03 28726.017578 T:2785047616 DEBUG: Curl::Debug - HEADER_OUT: HEAD /images/M/MV5BMTMyMTQzMzYyMl5BMl5BanBnXkFtZTcwMTgyNjk4Ng@@._V1._SY275_SX400_.jpg HTTP/1.1
00:49:03 28726.017578 T:2785047616 DEBUG: Curl::Debug - HEADER_OUT: User-Agent: Kodi/15.0-ALPHA1 (X11; Linux armv6l) OpenELEC/5.0 HW_RaspberryPi/1.0 App_Bitness/32 Version/15.0-ALPHA1-Git:0dedc4b
00:49:03 28726.017578 T:2785047616 DEBUG: Curl::Debug - HEADER_OUT: Host: ia.media-imdb.com
00:49:03 28726.017578 T:2785047616 DEBUG: Curl::Debug - HEADER_OUT: Accept: */*
00:49:03 28726.017578 T:2785047616 DEBUG: Curl::Debug - HEADER_OUT: Accept-Charset: UTF-8,*;q=0.8
00:49:03 28726.144531 T:2785047616 DEBUG: Curl::Debug - TEXT: The requested URL returned error: 403 Forbidden
00:49:03 28726.144531 T:2785047616 DEBUG: Curl::Debug - TEXT: Closing connection 0
00:49:33 28756.498047 T:3041611776 INFO: CheckIdle - Closing session to http://ia.media-imdb.com (easy=0xa8700018, multi=(nil))
It's the same with scrapers - some actor thumb requests work, a lot don't, receiving the same 403 Forbidden response.
Is imdb.com employing some sort of anti-abuse counter measure, such as only so many requests allowed per second/minute/hour etc.? If we understood what the limits are then it might be possible to avoid hammering imdb.com when we're guaranteed to get an error response.