I am trying to make a movie quote making bot and i have already made the random quote scraper from IMDB. But when I try to make the quote from www.quotescover.com, my selenium is giving errors
I have tried a lot to click implicitly, with time.sleep and even tried to use action chains as I have mentioned in my code
qt,mv = getQuote() #basically the quote and the movie name, it can be just any string like qt = 'foo';mv = 'bar'
url = 'https://quotescover.com/designs/wording?res=WTBTQ3FyR01aMEVOdTVCRVJxRFUwdz09'
options = webdriver.ChromeOptions()
options.add_argument('--ignore-certificate-errors')
options.add_argument("--test-type")
# options.add_argument("--headless")
options.add_experimental_option('excludeSwitches', ['enable-logging'])
prefs = {'download.default_directory' : os.getcwd()+'images\\'}
options.add_experimental_option('prefs', prefs)
driver = webdriver.Chrome(options=options)
driver.get(url)
quote = driver.find_element_by_id('quotes')
quote.clear()
quote.send_keys(qt)
movie = driver.find_element_by_id('author')
movie.clear()
movie.send_keys(mv)
submit = driver.find_element_by_id('template-contactform-submit')
submit.click()
download = WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.CLASS_NAME, 'button buttonDownload')))
for item in download:
ActionChains(driver).move_to_element(item).click().perform()
I thought it would work after using actionchains but it gives me the error element not intractable...also one time it didn't give me ANY error, just a blank exception :(