python selenium.webdriver returns result of 'The requested document was not found on this server'

Viewed 73

Hi I am trying to run the automated search and get results from a web database, i have the following codes:

chrome_options = webdriver.ChromeOptions() 
chrome_options.add_argument("--disable-popup-blocking")
driver = webdriver.Chrome(options=chrome_options) 

driver.get('http://www.ddfint.net/search.cfm/')
search_form=driver.find_element_by_name('compoundName')
search_form.send_keys('Acetylcarnitine')
search_form.submit()

It returns a not found result, I noticed that the web page has a alert: not secured, where the 'popups-redirect' was blocked, once I manually removed the block, I was able to get the result manually. What should I change in the code to make it work? The options I added does not change the default setting from 'blocking' to 'allow', thank you!

I have tried chrome_options.add_argument("--allow-insecure-localhost") and this did not resolve my issue either.

2 Answers

You could try adding a ChromeOption that ignores the SSL error:

chrome_options.add_argument("--allow-insecure-localhost")

Remove trailing slash from the url. You should use http://www.ddfint.net/search.cfm

You can read about here.

Related