I just learned the selenium module and the video i watched is about 1 years ago. The example is
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
chrome_options = webdriver.ChromeOptions()
chrome_options.headless=True
path='/usr/bin/google-chrome'
chrome_options.binary_location = path
driver = webdriver.Chrome(executable_path=chrome_options.binary_location,options=chrome_options)
url="https://www.jd.com/?country=USA"
driver.get(url)
driver.save_screenshot("jingdong.png")
As a reuslt, errors occur.
Unexpected exception formatting exception. Falling back to standard exception ...
After searching for multiple documents, i discover that the arguments have changed a little bit. Therefor i would like to share my findings. And make some explanation on this post for newbies like me.