我试图使用代码从HTML页面中获取希伯来文:
text = msg.find_element_by_class_name('selectable-text').text
只要我们处理英文文本,代码就会很有效。 经过一番搜索后,我尝试在顶部添加一个utf-8标签,但它没有做任何事情:
# This Python file uses the following encoding: utf-8
将随意的希伯来文本放入变量并用它做任何事情并没有引起任何问题,因此我怀疑问题可能出在Selenium上。
我收到的debug.log是:
[1210/131919:ERROR:process_reader_win.cc(114)] NtOpenThread: {Access Denied} A process has requested access to an object, but has not been granted those access rights. (0xc0000022)
[1210/131919:ERROR:exception_snapshot_win.cc(87)] thread ID 11172 not found in process
[1210/131919:WARNING:crash_report_exception_handler.cc(56)] ProcessSnapshotWin::Initialize failed
您怎么看?
我正在运行Python 3.5.2