Chrome webdriver 获取

admin2020-12-12  277

import console;
import chrome.driver;

var driver = chrome.driver(); 
var browser = driver.startBrowser();
$url='https://www.baidu.com';
browser.go($url);

var content=browser.querySelector("pre");
//获取正文内容
console.dump(content.innerText());

//获取网页源代码:
browser.source.get();

转载请注明原文地址: https://seopai.com/read-67.html
最新回复(1)