IMDb

フリーミアム
Verified
よって Api Dojo | 更新済み לפני 6 שעות | News, Media
人気

9.9 / 10

レイテンシー

1,122ms

サービスレベル

100%

Health Check

N/A

すべてのディスカッションに戻る

Response UTF-8/Unicode encoding

Rapid account: Paul 666
paul666
לפני 7 חודשים

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 חודשים

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 חודשים

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 חודשים

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 חודשים

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

Regards.

ディスカッションに参加しましょう-以下にコメントを追加してください:

ログイン/サインアップして新しいコメントを投稿