from selenium import webdriver
driver = webdriver.PhantomJS()
print (driver.get_window_size())
driver.get("https://toster.ru")
driver.save_screenshot("screenshot1.png")
driver.set_window_size(1920, 1080)
print (driver.get_window_size())
driver.get("https://toster.ru")
driver.save_screenshot("screenshot2.png")
driver.close()