When I try to get the Arabic translation from Google translate it show me this:
'charmap' codec can't encode characters in position 0-3: character maps to
The code is:
driver.get("https://translate.google.com/?hl=ar&sl=ar&tl=en&text=%D9%85%D8%B1%D8%AD%D8%A8%D8%A7&op=translate")
translated_text = driver.find_elements(By.CSS_SELECTOR, 'div[class="A3dMNc"]')
sleep(3)
for i in translated_text:
p=i.get_attribute("data-initial-text")
print(p.encode('cp850').decode('cp850'))