Skip to content

Instantly share code, notes, and snippets.

@kadaliao
Last active October 12, 2018 09:46
Show Gist options
  • Save kadaliao/0d1234e8259f877661496a1587010ea6 to your computer and use it in GitHub Desktop.
Save kadaliao/0d1234e8259f877661496a1587010ea6 to your computer and use it in GitHub Desktop.
selenium运行phantomjs
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
options = Options()
options.add_argument('--headless')
driver = webdriver.Chrome(options=options)
driver.get('http://baidu.com')
print(driver.current_url)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment