We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 169c6ad commit 198feccCopy full SHA for 198fecc
index.js
@@ -10,6 +10,7 @@ async function text (url, opts = {}) {
10
await page.goto(url, opts)
11
const text = page.plainText()
12
browser.close()
13
+
14
return text
15
}
16
@@ -19,6 +20,7 @@ async function html (url, opts = {}) {
19
20
21
const content = await page.content()
22
23
24
return content
25
26
@@ -53,6 +55,7 @@ async function pdf (url, opts = {}) {
53
55
await page.goto(url, { waitUntil: 'networkidle' })
54
56
await page.emulateMedia(media)
57
await page.pdf(Object.assign({ path }, opts))
58
+ browser.close()
59
60
return Promise.resolve(tempFile)
61
0 commit comments