IMDb

GRATIS CON POSSIBILITÀ DI UPGRADE
Da Api Dojo | Aggiornamento vor 9 Stunden | News, Media
Popolarità

9.9 / 10

Latenza

1,173ms

Livello di servizio

100%

Health Check

N/A

Torna a tutte le discussioni

Response UTF-8/Unicode encoding

Rapid account: Paul 666
paul666
7 months ago

Endpoint: /title/get-seasons
iMDB ID: 10206890
iMDB site episode: Hvem finder først dyrene? - https://www.imdb.com/title/tt12378588/?ref_=ttep_ep1
Endpoint result (on RapidAPI website): Hvem finder først dyrene?
Endpoint result (in my script): Hvem finder først dyrene?

My script, AutoIt language:

Func Get_Series($ID)
$oHTTP = ObjCreate(“winhttp.winhttprequest.5.1”)
$oHTTP.Open(“GET”, ‘https://imdb8.p.rapidapi.com/title/get-seasons?tconst=tt’ & $ID)
$oHTTP.SetRequestHeader(“User-Agent”, “Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/117.0”)
$oHTTP.SetRequestHeader(“Accept-Language”, “en”)

$oHTTP.SetRequestHeader(“X-Rapidapi-Key”, “xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx”)
$oHTTP.SetRequestHeader(“X-Rapidapi-Host”, “imdb8.p.rapidapi.com”)
$oHTTP.SetRequestHeader(“Host”, “imdb8.p.rapidapi.com”)

$oHTTP.Send()

Return $oHTTP.ResponseText
EndFunc ;==>Get_Series

If I add this header:

$oHTTP.SetRequestHeader(“Content-type”, “text/html; charset=utf-8”)
I get error: HTTP 415 Unsupported Media Type

Rapid account: Paul 666
paul666 Commented 7 months ago

I’m not sure it’s an AutoIt problem.
I use the exact same function to get iMDB pages and it’s reading all characters correctly.
Anyway, I just realised I only need the iMDB ID codes, so… thanks, I guess problems solved.

Rapid account: Apidojo
apidojo Commented 7 months ago

I am not familiar with the tool you are using, Google may help you how to use it properly.

Regards.

Rapid account: Paul 666
paul666 Commented 7 months ago

If I ignore it completely or pass it as $oHTTP.SetRequestHeader(“Content-type”, “application/json; charset=utf-8”) , I get this episode title: Hvem finder først dyrene? - which is still wrong.

Rapid account: Apidojo
apidojo Commented 7 months ago

Content-type must be “application/json” OR simply ignore passing it.

Regards.

Partecipa alla discussione - aggiungi un commento di seguito:

Accedi/Iscriviti per pubblicare nuovi commenti