Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/340.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 有没有办法在浏览器中调试phantomjs或在selenium之外设置代理?_Python_Selenium_Phantomjs - Fatal编程技术网

Python 有没有办法在浏览器中调试phantomjs或在selenium之外设置代理?

Python 有没有办法在浏览器中调试phantomjs或在selenium之外设置代理?,python,selenium,phantomjs,Python,Selenium,Phantomjs,我有一个问题,我需要将私有代理与user:pass授权一起使用。如果你像我在selenium做的那样环顾四周,这几乎是不可能的 我可以轻松地在phantomjs中设置代理,然后selenium使用它们。我需要调试我的phantomjs项目,并且需要在调试时激活代理。所以现在我不能两全其美。使用浏览器但不使用代理进行调试,或者使用无头代理且不使用浏览器。保存屏幕截图还不够好,因为错误通常来自元素的某些位置错误,只有在查看浏览器活动时才清楚 那么,有没有其他方法可以类似地在selenium之外设置代

我有一个问题,我需要将私有代理与
user:pass
授权一起使用。如果你像我在selenium做的那样环顾四周,这几乎是不可能的

我可以轻松地在phantomjs中设置代理,然后selenium使用它们。我需要调试我的phantomjs项目,并且需要在调试时激活代理。所以现在我不能两全其美。使用浏览器但不使用代理进行调试,或者使用无头代理且不使用浏览器。保存屏幕截图还不够好,因为错误通常来自元素的某些位置错误,只有在查看浏览器活动时才清楚

那么,有没有其他方法可以类似地在selenium之外设置代理以供使用呢。或者,在我调试时,当phantomjs运行时,以某种方式主动查看浏览器