mirror of
https://git.mirrors.martin98.com/https://github.com/mendableai/firecrawl
synced 2025-08-11 20:58:59 +08:00
fix(scrapeURL/fire-engine): screenshot broken hotfix
This commit is contained in:
parent
b0534d0767
commit
5c4021e8cf
@ -98,7 +98,7 @@ describe("Scrape tests", () => {
|
||||
});
|
||||
|
||||
expectScrapeToSucceed(response);
|
||||
expect(response.body.data.screenshot).toBeTruthy();
|
||||
expect(typeof response.body.data.screenshot).toBe("string");
|
||||
}, 15000);
|
||||
|
||||
it.concurrent("screenshot@fullPage format works", async () => {
|
||||
@ -108,7 +108,7 @@ describe("Scrape tests", () => {
|
||||
});
|
||||
|
||||
expectScrapeToSucceed(response);
|
||||
expect(response.body.data.screenshot).toBeTruthy();
|
||||
expect(typeof response.body.data.screenshot).toBe("string");
|
||||
}, 15000);
|
||||
})
|
||||
});
|
||||
|
@ -229,7 +229,7 @@ export async function scrapeURLWithFireEngineChromeCDP(
|
||||
{ screenshots: response.screenshots },
|
||||
);
|
||||
if (response.screenshots) {
|
||||
response.screenshot = response.screenshots.slice(-1, 0)[0];
|
||||
response.screenshot = response.screenshots.slice(-1)[0];
|
||||
response.screenshots = response.screenshots.slice(0, -1);
|
||||
}
|
||||
meta.logger.debug("Screenshot transformation done", {
|
||||
|
Loading…
x
Reference in New Issue
Block a user