1. <legend id='QsSFs'><style id='QsSFs'><dir id='QsSFs'><q id='QsSFs'></q></dir></style></legend>

      1. <tfoot id='QsSFs'></tfoot>
      2. <small id='QsSFs'></small><noframes id='QsSFs'>

        <i id='QsSFs'><tr id='QsSFs'><dt id='QsSFs'><q id='QsSFs'><span id='QsSFs'><b id='QsSFs'><form id='QsSFs'><ins id='QsSFs'></ins><ul id='QsSFs'></ul><sub id='QsSFs'></sub></form><legend id='QsSFs'></legend><bdo id='QsSFs'><pre id='QsSFs'><center id='QsSFs'></center></pre></bdo></b><th id='QsSFs'></th></span></q></dt></tr></i><div id='QsSFs'><tfoot id='QsSFs'></tfoot><dl id='QsSFs'><fieldset id='QsSFs'></fieldset></dl></div>
          <bdo id='QsSFs'></bdo><ul id='QsSFs'></ul>

        拒绝访问 您无权访问“站点";通过 Selenium Python 在此服务器上使用 ChromeDriver

        Access Denied You don#39;t have permission to access quot;sitequot; on this server using ChromeDriver and Chrome through Selenium Python(拒绝访问 您无权访问“站点;通过 Selenium Python 在此服务器上使用 ChromeDriver 和 Chrome) - IT屋-程序员
        <i id='0PA7e'><tr id='0PA7e'><dt id='0PA7e'><q id='0PA7e'><span id='0PA7e'><b id='0PA7e'><form id='0PA7e'><ins id='0PA7e'></ins><ul id='0PA7e'></ul><sub id='0PA7e'></sub></form><legend id='0PA7e'></legend><bdo id='0PA7e'><pre id='0PA7e'><center id='0PA7e'></center></pre></bdo></b><th id='0PA7e'></th></span></q></dt></tr></i><div id='0PA7e'><tfoot id='0PA7e'></tfoot><dl id='0PA7e'><fieldset id='0PA7e'></fieldset></dl></div>

            <small id='0PA7e'></small><noframes id='0PA7e'>

            • <tfoot id='0PA7e'></tfoot>

              <legend id='0PA7e'><style id='0PA7e'><dir id='0PA7e'><q id='0PA7e'></q></dir></style></legend>

                <tbody id='0PA7e'></tbody>
                • <bdo id='0PA7e'></bdo><ul id='0PA7e'></ul>
                • 本文介绍了拒绝访问 您无权访问“站点";通过 Selenium Python 在此服务器上使用 ChromeDriver 和 Chrome的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我一直在使用 selenium 和 chrome,我一直在尝试访问一个网站,但我一直收到以下错误消息:

                  I've been using selenium with chrome and I've been trying to access a website but I keep receiving this error message:

                  Access Denied You don't have permission to access "website" on this server.
                  

                  该网站在我的常规 chrome 浏览器上运行良好,但通过 selenium 打开时我收到此错误消息.

                  The website works fine on my regular chrome browser, but when opened through selenium I receive this error message.

                  我已尝试对错误进行常规故障排除,但没有帮助,我已尝试安装 firefox 但导致另一个错误:消息:无法找到匹配的功能集"

                  I've tried the regular troubleshooting for the error but it didn't help, I've tried installing firefox but that resulted in another error: "Message: Unable to find a matching set of capabilities"

                  browser = webdriver.Chrome('C:\UsersFerdinandDownloadschromedriver_win32chromedriver.exe')
                  browser.get('https://www.vitacost.com/MyAccount/Login.aspx')
                  

                  我完全卡在这里了,我在另一台电脑上试了一下,结果还是一样.

                  I'm completely stuck here, I tried it another computer and still the same result.

                  推荐答案

                  如果你的尝试有 Headless 选项,我认为它可能与用户代理有关.因为有些网站用 Headless 屏蔽了用户代理.

                  If your trying has Headless option, I think it might be related to user-agent. Because some web site block the user-agent with Headless.

                  所以,去 https://www.whatsmyua.info/ 找到您的用户代理可以在您的常规 chrome 浏览器中使用,然后再试一次.

                  So, go to https://www.whatsmyua.info/ to find your user-agent which works in your regular chrome browser and try again with this.

                  ChromeOptions options = new ChromeOptions();
                  String userAget = "YOUR USER AGENT";
                  options.addArguments(String.format("user-agent=%s", userAgent));
                  

                  这是一个 java 代码,但我相信在 python 中有完全相同的方式.

                  This is a java code but I believe there is an exactly same way in python.

                  这篇关于拒绝访问 您无权访问“站点";通过 Selenium Python 在此服务器上使用 ChromeDriver 和 Chrome的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  env: python: No such file or directory(env: python: 没有这样的文件或目录)
                  How to evaluate environment variables into a string in Python?(如何在 Python 中将环境变量评估为字符串?)
                  Python - temporarily modify the current process#39;s environment(Python - 临时修改当前进程的环境)
                  Change current process environment#39;s LD_LIBRARY_PATH(更改当前进程环境的 LD_LIBRARY_PATH)
                  Reading and writing environment variables in Python?(在 Python 中读写环境变量?)
                  When to use sys.path.append and when modifying %PYTHONPATH% is enough(何时使用 sys.path.append 以及何时修改 %PYTHONPATH% 就足够了)

                        <bdo id='a0DD1'></bdo><ul id='a0DD1'></ul>
                        <tfoot id='a0DD1'></tfoot>

                        <small id='a0DD1'></small><noframes id='a0DD1'>

                          <tbody id='a0DD1'></tbody>
                          <i id='a0DD1'><tr id='a0DD1'><dt id='a0DD1'><q id='a0DD1'><span id='a0DD1'><b id='a0DD1'><form id='a0DD1'><ins id='a0DD1'></ins><ul id='a0DD1'></ul><sub id='a0DD1'></sub></form><legend id='a0DD1'></legend><bdo id='a0DD1'><pre id='a0DD1'><center id='a0DD1'></center></pre></bdo></b><th id='a0DD1'></th></span></q></dt></tr></i><div id='a0DD1'><tfoot id='a0DD1'></tfoot><dl id='a0DD1'><fieldset id='a0DD1'></fieldset></dl></div>

                            <legend id='a0DD1'><style id='a0DD1'><dir id='a0DD1'><q id='a0DD1'></q></dir></style></legend>