Last active
October 12, 2018 09:46
-
-
Save kadaliao/0d1234e8259f877661496a1587010ea6 to your computer and use it in GitHub Desktop.
selenium运行phantomjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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