IMDb

FREEMIUM
Verified
Durch Api Dojo | Aktualisiert il y a 12 heures | News, Media
Popularität

9.9 / 10

Latenz

1,101ms

Service Level

100%

Health Check

N/A

Zurück zu allen Diskussionen

Response UTF-8/Unicode encoding

Rapid account: Paul 666
paul666
il y a 7 mois

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 il y a 7 mois

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 il y a 7 mois

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 il y a 7 mois

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 il y a 7 mois

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

Regards.

Nehmen Sie an der Diskussion teil - fügen Sie unten einen Kommentar hinzu:

Anmelden / Registrieren, um neue Kommentare zu veröffentlichen