捕获用户正在浏览器中查看的 https 网页
我正在开发一个桌面应用程序,允许用户捕获网络浏览器中加载的网页内容。我从浏览器获取 URL,然后将内容加载到我的 WebView 中,然后从中创建图像。它与 http URL 一起工作得很好。当我必须捕获 https URL 内容时,问题就出现了。
假设我有一个登录页面,浏览器中显示了 https URL,我从浏览器获取此 URL 并尝试将其加载到我的 Web 视图中。我收到以下错误:
<块引用>该服务器的证书无效。您可能正在连接到一个冒充“
”的服务器这可能会使您的机密信息面临风险。 如果用户已登录网页并在 Safari 浏览器中查看某些内容。现在,如果他想捕获整个网页,他会返回到我的应用程序。但是,我的应用程序无法捕获这些内容。原因是,一旦用户登录到网站,cookie 就会被写入他的系统中,这是特定于浏览器的。因此,我的网页视图无法直接进入用户在浏览器中查看的页面。
尽管从技术上讲这听起来是正确的,但用户不会接受我的应用程序中的这种行为。
我该如何解决这个问题?是否有其他方法可以捕获用户在浏览器中查看的整个网页?
I am developing a Desktop application that allows the user to capture the contents of a web page loaded in web-browser. I take the URL from the browser, then load the contents into my WebView and then create image out of it. It works fine with http URLs. The problem comes when I have to capture https URL contents.
Suppose I have a login page with https URL displayed in the browser, I get this URL from the browser and try to load it in my web view. I get the following error:
The certificate for this server is invalid. You might be connecting to a server that is pretending to be “<url>” which could put your confidential information at risk.
If user has logged in to a web page and viewing some contents in Safari browser. Now, if he wants to capture the entire web page, he comes back to my app. But, my app is not able to capture these contents. The reason is that, once user logs into a site, cookies are written into his system and this is browser specific. Hence, my web view is not able to directly enter into the page that user is viewing in the browser.
Even though technically it sounds right, user will not accept this behavior in my app.
How do I solve this? Is there any alternative method to capture the entire web page that user is viewing in the browser?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以研究使您的应用程序成为目标平台上这些浏览器的浏览器插件。
You could investigate making your application a browser plugin for those browsers on your target platform.