我正在用硒来治疗癌症
ChromeDriver
从一系列网页获取信息。每隔一段时间(没有押韵或理由),Chrome的自动实例就会挂起,我会看到控制台输出,例如:
[1220:8276:1106/115700.618:ERROR:persistent_memory_allocator.cc(843)] Corruption detected in shared-memory segment.
[1220:8276:1106/115700.623:ERROR:persistent_memory_allocator.cc(843)] Corruption detected in shared-memory segment.
[1220:1836:1106/115707.077:ERROR:persistent_memory_allocator.cc(843)] Corruption detected in shared-memory segment.
[1220:9800:1106/115708.149:ERROR:persistent_memory_allocator.cc(843)] Corruption detected in shared-memory segment.
[1220:10780:1106/115708.153:ERROR:persistent_memory_allocator.cc(843)] Corruption detected in shared-memory segment.
[1220:20872:1106/115714.815:ERROR:persistent_memory_allocator.cc(843)] Corruption detected in shared-memory segment.
[1220:2840:1106/115714.817:ERROR:persistent_memory_allocator.cc(843)] Corruption detected in shared-memory segment.
[1220:916:1106/115723.138:ERROR:persistent_memory_allocator.cc(843)] Corruption detected in shared-memory segment.
在这一点上,我显然无法再获取页面内容,但Selenium中也没有生成内部异常,因此我无法处理该问题。
我可以使用什么方法来检测何时出现此问题,并从头开始数据采集?