Saturday, 24 August 2013

Using selenium to save images from page

Using selenium to save images from page

I'm using Selenium & Google Chrome Driver to open pages programatically.
On each page there is a dynamically generated image which I'd like to
download. At the moment, I'm waiting for the page to finish loading, then
I grab the image URL and download it using System.Net.WebClient.
That works fine except I'm downloading the images twice - once in the
browser, once with WebClient. The problem is that each image is roughly
15MB and downloading twice adds up quickly.
So - is it possible to grab the image straight from Google Chrome?

No comments:

Post a Comment