[英]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: 您需要将小写的
utf
替换为大写的UTF
即该行应为:
# -*- coding: UTF-8 -*-
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.