我有一个类似的问题,这个问题,但在德语。当我在我的pc上使用Chrome浏览器时,我得到一个翻译(来自https://translate.google.com),但是使用Selenium (在无头模式下),我得到了一个不同的翻译。
作为一个例子,以下文本给出了两个不同的结果:
- "In the study room there is a soft murmur from the students and a somewhat louder hiss of the chemicals."- "In the study room there is a quiet marbles of the students and a slightly louder hiss of the chemicals."为什么使用Chrome浏览器翻译的德语"Murmeln“会被翻译成'murmur‘,而当使用Selenium访问同一页面时却被翻译成’弹珠‘呢?
发布于 2021-12-19 21:41:52
观察HTML,我能看到的唯一不同就是jsdata的值
使用手动铬浏览器:
jsdata="uqLsIf;_;$29"

使用硒驱动时,ChromeDriver启动了谷歌铬浏览上下文
jsdata="uqLsIf;_;$329"

深潜
适配器允许JSData连接到各种数据存储,如Firebase、MySql、RethinkDB、MongoDB、localStorage、Redis、REST等。
使用手动Chrome会话,您是以已知用户身份登录的,并且使用ChromeDriver是一个全新的配置文件。因此,您可以连接到不同的数据存储并观察不同的结果。
https://stackoverflow.com/questions/70414303
复制相似问题