mirror of
https://git.mirrors.martin98.com/https://github.com/mendableai/firecrawl
synced 2025-08-06 05:47:19 +08:00
fix: rawHtml for v0
This commit is contained in:
parent
f8323f9b11
commit
7eefaffe48
@ -56,6 +56,19 @@ export async function crawlStatusController(req: Request, res: Response) {
|
||||
|
||||
const data = jobs.map(x => Array.isArray(x.returnvalue) ? x.returnvalue[0] : x.returnvalue);
|
||||
|
||||
if (
|
||||
jobs.length > 0 &&
|
||||
jobs[0].data &&
|
||||
jobs[0].data.pageOptions &&
|
||||
!jobs[0].data.pageOptions.includeRawHtml
|
||||
) {
|
||||
data.forEach(item => {
|
||||
if (item) {
|
||||
delete item.rawHtml;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
res.json({
|
||||
status: jobStatus,
|
||||
current: jobStatuses.filter(x => x === "completed" || x === "failed").length,
|
||||
|
Loading…
x
Reference in New Issue
Block a user