Python调用Selenium爬取网页

2024-06-11阅读数:218
# coding=utf-8
from selenium import webdriver
 
if __name__ == '__main__':
url = 'http://www.example.com'
client = webdriver.Chrome()
client.get(url)
html = client.page_source
print(html)
client.quit()