简体   繁体   中英

How to change selenium encoding to utf-8

While running code I am getting this error only if characters are in Georgian. In English I have no problem. How can this error can be fixed?

მობილური კავშირი having here Georgian letters is a problem, if there go English everything works fine.

from selenium import webdriver
 #-*- coding: utf-8 -*-
import time


driver  = webdriver.Chrome()

driver.get("https://tbcpay.ge/")
driver.find_element_by_link_text('მობილური კავშირი').click()

Seems you were almost there. You need to replace the lowercase utf to uppercase UTF ie the line would be:

# -*- coding: UTF-8 -*-

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM