selenium-chromedriver 相关问题

ChromeDriver是与Chromium团队合作开发的,是一个实现WebDriver线路协议的独立服务器。

可以在没有无头模式的情况下在Amazon EC2实例上运行硒?

我想使用硒在不使用无头模式的情况下在Amazon EC2实例上加载PDF页面,因为我想加载PDF。由于此处描述的问题(https://github.com/puppeteer/puppeteer/issues/

回答 1 投票 0

对ERR_HTTP2_PROTOCOL_ERROR进行零食,当Web用Python Selenium Chromedriver刮擦时,但相同的请求与Curl

我有一个相当基本的刮板设置,可以通过homes.com上的房地产经纪人资料列表进行循环。我的刮板工作了几个月,但随后开始零星

回答 0 投票 0



无法下载Chromedriver版本高于114

我无法获得Chromedriver版本133。有人可以帮助我找到可以下载它的链接。预先感谢

回答 1 投票 0

无法下载Chromedriver版本133

我无法获得Chromedriver版本133。有人可以帮助我找到可以下载它的链接。预先感谢

回答 1 投票 0




使用硒和Chromedriver

规格: Intellidea在Nobara Linux上使用Python(基于Fedora的41) Flatpak方法。 问题: 我一直在尝试制作一个脚本来检查社交媒体网站上的某些文件。 我开始使用

回答 0 投票 0

子Chromedriver“ get”不可靠地加载@Importfonts

@导入URL(https://fonts.googleapis.com/css?family = droid+serif:400,700, 我有一些html页面: </desc><code>&lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;meta charset=&#34;utf-8&#34;&gt; &lt;style&gt;@import url(https://fonts.googleapis.com/css?family=Droid+Serif:400,700,400italic); body { font-family: &#39;Droid Serif&#39;; }&lt;/style&gt; &lt;/head&gt; ... </code><question vote="4"> <p>用硒加载页面时:</p> <pre><code>from selenium import webdriver chrome_options = webdriver.ChromeOptions() chrome_options.add_argument(&#39;--kiosk-printing&#39;) browser = webdriver.Chrome(r&#34;chromedriver.exe&#34;, options=chrome_options) browser.get(&#34;http://www.example.com/&#34;) </code></pre> <p>到达:</p> <pre> </pre>50%的时间,字体不会加载(页面上显示默认的serif字体(时代新罗马))<p> </p>50%的时间,字体已加载<ul> <li> </li><li>如何使字体加载使用硒更可靠? </li>第二次重新加载页面</ul><code>time.sleep(2); browser.get(...)</code><p>没有帮助100%的时间。 <strong> </strong> </p>i偶然发现了upoun这个web api(<p>https://developer.mozilla.org/en-us/docs/web/api/fontfaceset<pre>)。 </pre>步调此代码:</p> </question><code> from selenium import webdriver import time u = &#39;https://fonts.google.com/&#39; driver = webdriver.Chrome(executable_path=r&#34;chromedriver.exe&#34;) driver.maximize_window() driver.get(u) while True: script = &#39;&#39;&#39;return document.fonts.status;&#39;&#39;&#39; loaded = driver.execute_script(script) if loaded == &#39;loaded&#39;: print(&#39;All fonts loaded&#39;) break print(&#39;Fonts still loading&#39;) time.sleep(.5) </code><answer tick="false" vote="2"> <p>必须说,就我而言,铬只有在页面满载(包括字体)时将控件返回到硒。 也许您可以提供最低限度的例子来测试您的50-50场景<a href="https://developer.mozilla.org/en-US/docs/Web/API/FontFaceSet" rel="nofollow noreferrer"> </a> </p> <p>我正面临着同样的问题,什么也不会裁员。 这是我的情况:</p> <pre><code>html_string = render_to_string(self.template_name, ctx) html_string = html_string.encode(&#39;utf-8&#39;).decode(&#39;utf-8&#39;) temp_file = &#34;/tmp/temp.html&#34; [...] driver = webdriver.Chrome(options=options) driver.get(&#34;file://&#34; + temp_file) [...] </code></pre> <p>没有任何东西会使字体加载。因此,我将它们复制到</p><code>/tmp</code></answer>目录中,以与<answer tick="false" vote="0"><code>.html</code><p></p>一起使用 <p><code># create directory in /tmp temp_fonts = Path(&#34;/tmp/fonts/&#34;) temp_fonts.mkdir(exist_ok=True) # loop through the fonts I am using in the .html for font in [&#39;georgia-semibold.ttf&#39;, &#39;Nunito-Bold.ttf&#39;, &#39;Nunito-Regular.ttf&#39;]: with open(temp_fonts / font, &#34;wb&#34;) as f: font_path = Path(settings.BASE_DIR) / &#34;static&#34; / &#34;fonts&#34; / font # copy the font into the /tmp/font directory f.write(open(font_path, &#34;rb&#34;).read()) </code></p> <pre>现在参考文献无瑕 </pre> <p><pre>

回答 0 投票 0

不得下载使用SeleniumChromedriver

IM试图使用PERFS方法更改Chrome中的下载目录,尽管目录更改,但下载失败了,说明了错误。这是Python中使用的以下代码。 chrome_options =

回答 1 投票 0

Pythonselenium:如何无需src属性访问iframe源?

有一个网页,我想访问iframe源以下载文件。 问题是,IFRAME或其HTML中没有SRC属性,它在#document内部。 我如何获得链接

回答 1 投票 0





Python:如何在硒中隐藏输出铬消息?

我想做什么: 我想使用Selenium ChromeDriver打开Chrome浏览器,而无需将输出输出到控制台。 我做了什么: 来自Selenium Import Webdriver 驱动程序= webdri ...

回答 2 投票 0

seleenium webdriver chromedriver-是否可以将P12证书作为Chromeoption(SSL-Client-Certificate-File)

测试站点,需要通过P12证书进行身份验证。打开页面后,在Chrome中显示证书选择弹出窗口。 我知道

回答 0 投票 0

Why does ExecuteCdpCommand not work with WebDriver

We have a regression suite which we run on Chrome with code created in Visual Studio/C# and Selenium. Part of the startup code is shown below protected static ChromeDriver? Driver { get;放; } = n...

回答 1 投票 0

最新问题
© www.soinside.com 2019 - 2025. All rights reserved.