简体   繁体   English

Python 使用 Webbot,不确定如何单击 chrome PDF 查看器的按钮

[英]Python with Webbot, not sure how to click the button of the chrome PDF viewer

I have a Python app navigating through a website using Webbot.我有一个 Python 应用程序使用 Webbot 浏览网站。 On the final page, it renders and streams a PDF to the browser (without an endpoint URL).在最后一页上,它呈现 PDF 并将其流式传输到浏览器(没有端点 URL)。 This is displayed in the chrome PDF viewer but I need to download this.这显示在 chrome PDF 查看器中,但我需要下载它。

I am unsure of how to go about activating the download here or obtaining this file through the normal method of request.get()我不确定如何 go 在这里激活下载或通过 request.get() 的正常方法获取此文件

The URL is generic: www.website.com/generatePDF URL 是通用的: www.website.com/generatePDF

chrome viewer showing download button chrome 查看器显示下载按钮

I can navigate to this page, I'm just not sure how to go about getting the actual PDF downloaded.我可以导航到此页面,我只是不确定如何 go 下载实际的 PDF。 Because everything uses scripting on the backend, I need to navigate button clicks (URL's are hidden).因为一切都在后端使用脚本,所以我需要导航按钮点击(隐藏 URL)。

Thoughts?想法?

Have you consider sending CTRL+S command?您是否考虑发送 CTRL+S 命令? It should send the save command and then click on SAVE button.它应该发送保存命令,然后单击保存按钮。 Never tried but could do the job.从未尝试过,但可以胜任。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM