@11ways/specter 中文文档教程
Specter
无头浏览器包装器
Installation
npm install @11ways/specter
Usage
const Specter = require('@11ways/specter');
let browser = new Specter.Browser(),
tab = browser.createTab();
await tab.goto('https://stad.gent/');
let url = await tab.evaluate(function() {
let img = document.querySelector('img');
return img.src;
});
Specter
Headless browser wrapper
Installation
npm install @11ways/specter
Usage
const Specter = require('@11ways/specter');
let browser = new Specter.Browser(),
tab = browser.createTab();
await tab.goto('https://stad.gent/');
let url = await tab.evaluate(function() {
let img = document.querySelector('img');
return img.src;
});