html – Download an image with node.js after it renders

It is a bit complex, what I currently do:

  1. I have an HTML-Page hosted on Github Pages
  2. I go to that page with a urlParameter
  3. The page parses it and renders a jpeg encoded with base64 (image.src=”…”)

What I want to do:

  1. I send some kind of request to the page from node.js, it will be inside a discord bot. I completely have no experience with that. Also please note, that I can’t use something like Selenium.
  2. Then I wait until the page loads/the jpeg image renders.
  3. I want to download this image and be able to attach it to a discord message (This part I will figure out myself).

Could anybody help?
If the question is not clear enough, I will explain more in detail.