from time import sleep from selenium import webdriver browser = webdriver.Chrome() url = "http://www.spbeen.com/tool/request_info/" browser.get(url) content = browser.page_source print(content)
requests 一次请求 数据有限,速度快
selenium 浏览器加载数据 数据大 速度慢
from time import sleep from selenium import webdriver browser = webdriver.Chrome() url = "http://www.spbeen.com/tool/request_info/" browser.get(url) content = browser.page_source print(content)
requests 一次请求 数据有限,速度快
selenium 浏览器加载数据 数据大 速度慢