How to get a image using WebBrowser

孤者浪人 提交于 2020-01-17 13:57:30

问题


I have a component that uses the old WebBrowser control. The problem is that i use it to automate a process accessing a thirdy party page. The problem is that now i need to get a image, and this image is loaded by an extra GET request that i dont have control.

For example, i make a:

 webBrowser.Navigate("example.com");

And on the DocumentCompleted event i do some stuff. But when this event is fired, i see on fiddler that the browser make to extra GETs one to load a token and other to load a PNG. I need to get these two responses on the DocumentCompleted event. The image are like this on the html:

    <div id="container" data-url="exmple2Images.app"></div>

Ps: I cannot make another request by myself to exmple2Images.app because it refreshs the session and some cookies that are important.

Thanks.

来源:https://stackoverflow.com/questions/33172010/how-to-get-a-image-using-webbrowser

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!