2

With chrome, if I open a website, I can inspect the Sources and find the target image and then copy it as data URI. like data:image/png;base64,iVBORw0KGg...

Now I want to do that with selenium headless browser, how can I get the data URI of an image if I can locate it through XPath selector?

(the URL in "src" attribute is inaccessible, don't have privilege)

Thanks!

vividlau
  • 21
  • 2
  • You may need to rephrase that term: when you have a data-url, you don't need to "download" anything, as the data is already in that url, base64 encoded – Hans Kesting Oct 01 '19 at 11:30

0 Answers0