I am a newbie in python and building a scraper using webdriver. I am trying to take screenshots from a website. Its taking the screenshot fine but saving it in the root folder. My code is below
print ("step is === "+str(scrollStep))
for i in range(1, max_sreenshots):
driver.save_screenshot("./screenshot_"+str(i)+".png")
driver.execute_script("window.scrollTo("+str(scrollStart)+", "+str(scrollEnd)+");")
scrollStart = scrollStart + scrollStep
scrollEnd = scrollEnd + scrollStep
As you can see, its only creating files. I want it to save it in folder by date. How can I achieve that. Thank you