Skip to content

Commit 430babe

Browse files
committed
Fix - #20984 - removed path parameter from page.screenshot call so puppeteer does not try to call fs to store images
1 parent 1f62c31 commit 430babe

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/content/docs/browser-rendering/workers-binding-api/browser-rendering-with-DO.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ sidebar:
1515

1616
import { Render, PackageManagers, WranglerConfig } from "~/components";
1717

18-
By following this guide, you will create a Worker that uses the Browser Rendering API along with [Durable Objects](/durable-objects/) to take screenshots from web pages and store them in [R2](/r2/).
18+
By following this guide, you will create a Worker that uses the Browser Rendering API along with [Durable Objects](/durable-objects/) to scrape titles from web pages and store them in [R2](/r2/).
1919

2020
Using Durable Objects to persist browser sessions improves performance by eliminating the time that it takes to spin up a new browser session. Since Durable Objects re-uses sessions, it reduces the number of concurrent sessions needed.
2121

@@ -172,7 +172,7 @@ export class Browser {
172172
await page.setViewport({ width: width[i], height: height[i] });
173173
await page.goto("https://workers.cloudflare.com/");
174174
const fileName = "screenshot_" + width[i] + "x" + height[i];
175-
const sc = await page.screenshot({ path: fileName + ".jpg" });
175+
const sc = await page.screenshot();
176176

177177
await this.env.BUCKET.put(folder + "/" + fileName + ".jpg", sc);
178178
}

0 commit comments

Comments
 (0)