Google News

GRATIS CON POSSIBILITÀ DI UPGRADE
Da BFD | Aggiornamento il y a un mois | News, Media
Popolarità

9.9 / 10

Latenza

769ms

Livello di servizio

100%

Health Check

N/A

Torna a tutte le discussioni

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”))

Partecipa alla discussione - aggiungi un commento di seguito:

Accedi/Iscriviti per pubblicare nuovi commenti