Now I am using selenium to save a web page to image.
from selenium import webdriver
browser = webdriver.Firefox()
browser.get("some url")
browser.save_screenshot(img)
browser.quit()
But there is a problem that each time it will popup a window.
Is there any way that can render a image directly to an image?