Google News

ÜCRETSİZ PREMIUM
Taraf BFD | Güncelleyen एक महीने पहले | News, Media
Popülerlik

9.9 / 10

Gecikme

769ms

Hizmet Düzeyi

100%

Health Check

N/A

Tüm Tartışmalara Dön

PYTHON BUG CORRECTED: Supported Language & Settings

Rapid account: Theta 45 Com
theta45.com
10 महीने पहले

I tried the python code to get a json list of supported languages.

But I got this error:

UnicodeEncodeError: ‘charmap’ codec can’t encode character ‘\u010c’ in position 209: character maps to <undefined>

THE FIX:

import http.client

conn = http.client.HTTPSConnection(“google-news13.p.rapidapi.com”)

headers = {
‘X-RapidAPI-Key’: “YOUR KEY”
}

conn.request(“GET”, “/languageRegions”, headers=headers)

res = conn.getresponse()
data = res.read().decode(“utf-8”)

print(data.encode(“utf-8”))

Aşağıya yorum ekleyerek tartışmaya katılın:

Yeni yorumlar göndermek için giriş yapın / kaydolun