option = webdriver.ChromeOptions()
option.add_argument('--start-maximized') # 最大化
option.add_argument('--headless') # 无界面
self.driver = webdriver.Chrome(chrome_options=option)
self.driver.get("https://www.qichacha.com/")
time.sleep(5)
response=self.driver.page_source.encode("utf-8")
print(response)
self.driver.find_element_by_id('searchkey').send_keys("baidu")
self.driver.find_element_by_id('V3_Search_bt').click()
print("asdadsad")
为啥这里返回的内容是一个网址呢?我用有头浏览器就可以正常返回!