I have a page where an image is generated once some javascript is run. I can use splinter
to get to the point where I have the image but I am unable to save it.
The code I am using is really simple:
browser = Browser('firefox')
browser.visit(png_url)
browser.driver.save_screenshot(str(step+1) + '.png')
But the screenshot comes up empty...
The page is basically:
<body style="margin: 0px;">
<img style="-webkit-user-select: none" src="http://localhost:8000/x">
</body>
I can right click and save the image but am not sure how to automate that with splinter
.
Also, the image is an inline png, when I check the sources it reads as:
data:image/png;base64,iVBORw0KGgoAAAANSUhE
etc...
What can I do to automatically save this image? I am trying to generate a list of links and then iterate through them and save an image from each link.