This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import puppeteer from 'puppeteer'; | |
function getTitle() { | |
if (document.querySelector('meta[property="og:title"]')) { | |
return document.querySelector('meta[property="og:title"]').content; | |
} | |
if (document.querySelector('[itemprop="name"]')) { | |
return document.querySelector('[itemprop="name"]').text; | |
} | |
if (document.querySelector('title')) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const puppeteer = require('puppeteer'); | |
const merge = require('merge-img'); | |
const pageUrl = ''; // REPLACE ME | |
const pageElement = '#svgcanvas'; // REPLACE ME | |
(async() => { | |
const browser = await puppeteer.launch(); | |
const page = await browser.newPage(); | |
await page.goto(pageUrl); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/70.0.3508.0 Safari/537.36", | |
"lighthouseVersion": "3.0.3", | |
"fetchTime": "2018-09-06T16:55:02.940Z", | |
"requestedUrl": "https://www.chromestatus.com/features", | |
"finalUrl": "https://www.chromestatus.com/features", | |
"runWarnings": [], | |
"audits": { | |
"is-on-https": { | |
"id": "is-on-https", |
OlderNewer