Playwright在Python上能运行Tor浏览器吗?

huangapple go评论98阅读模式
英文:

Can Playwright on Python run the Tor browser?

问题

我想使用Python上的Playwright自动化Tor浏览器。我的问题是,“在Playwright API中,哪段代码可以运行一个不同于默认Web驱动程序的浏览器?”总体上,但更具体地说,“获取Playwright运行Tor浏览器的代码是什么?”在Stack Overflow上有使用Selenium执行此操作的类似问题。我正在询问如何使用Playwright进行此操作。

英文:

I'd like to automate the Tor Browser using Playwright on Python. My question is "What code in the Playwright API runs a different browser than the default web drivers?" overall but more specifically "What is the code to get Playwright to run the Tor browser?"

There are similar questions on Stack Overflow for doing this with Selenium. I'm asking about how to do it with Playwright.

答案1

得分: 2

Playwright支持Firefox,但它使用了一个经过修补的Firefox版本,带有一些定制内容,以支持自动化。因此,您不能将Playwright版本的Firefox替换为另一个Firefox构建(如Tor浏览器),而不应用这些补丁。请参见相关答案

英文:

Playwright supports Firefox, but it uses a patched version of Firefox with some customisations to allow for its automation. Because of this, you can't swap out the Playwright version of Firefox with another Firefox build (like the Tor browser) without applying those patches. See related answer

huangapple
  • 本文由 发表于 2023年6月29日 07:12:26
  • 转载请务必保留本文链接:https://go.coder-hub.com/76577210.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定