The method below for DLSite browser viewer no longer works. It seems they changed the way of encrypting the images or something, as the images now appear as encrypted texts in the DevTools. This includes all the books I've purchased prior to such change.
QUOTE(Nalien @ Oct 11 2020, 22:59)

My guide was for DMM. I checked the DLSite browser viewer. There are 3 canvases for the current, previous and next pages, and the pages can be downloaded even while they aren't visible (unlike DMM). So you should execute
CODE
filename = 1
a = document.createElement('a')
function downloadCanvas() {
canvases = document.querySelectorAll('canvas')
for (canvas of [canvases[1], canvases[0], canvases[2]].filter(canvas => canvas)) {
a.href = canvas.toDataURL('image/jpeg')
a.download = filename++
a.click()
}
}
downloadCanvas()
after moving 1 page forward once, then
CODE
downloadCanvas()
every 3 pages. You will probably have to manually fix the numbers of the last pages if their count isn't a multiple of 3.