title: Extract image from HTML/JS canvas with Python (convert)
body: <p>I am making a discord bot with Python for a game community I am in, and right now I am making a command that returns the status of the games (using <a href="https://downdetector.com/status/world-of-tanks/" rel="nofollow noreferrer">this</a> website). Full code for that command is <a href="https://mystb.in/UnusualTraditionalMidnight.python" rel="nofollow noreferrer">here</a>.</p>
  <p>Now that shows only this:</p>
  <p><a href="https://i.stack.imgur.com/UxgkI.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/UxgkI.png" alt="enter image description here" /></a></p>
  <p>However I want to add the graph that you can find on <a href="https://downdetector.com/status/world-of-tanks/" rel="nofollow noreferrer">the website</a> as well, I use BeautifulSoup to get the other values, and getting an image would also be easy. <strong>However the graph is not an image</strong>, it is a <a href="https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API" rel="nofollow noreferrer">canvas</a> object used in JavaScript/HTML. I don't know how the math works, but I can 'convert' it to an image locally very easily by just right clicking, and then copying the image.</p>
  <p>My question is: <strong>How can I retrieve this canvas object as an image in my Python code?</strong></p>
  <p>When I google this question I mostly get results for Tkinter, and nothing helpful really.</p>
  <ul>
  <li><a href="https://imgur.com/a/qWpvB3v" rel="nofollow noreferrer">How I want it to look like</a></li>
  <li><a href="https://hastebin.com/noseqageci.html" rel="nofollow noreferrer">Website code for the graph</a></li>
  <li><a href="https://imgur.com/a/56k3rCv" rel="nofollow noreferrer">What the graph looks like</a></li>
  </ul>