mirror of
https://github.com/mendableai/firecrawl.git
synced 2025-06-27 00:41:33 +00:00
fix(search): respect parsePDF in pricing (#1690)
This commit is contained in:
parent
125e1ada45
commit
4b03ffca36
@ -270,8 +270,9 @@ export async function searchController(
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: This is horrid. Fix soon - mogery
|
||||
const credits_billed = responseData.data.reduce((a, x) => {
|
||||
if (x.metadata?.numPages !== undefined && x.metadata.numPages > 0) {
|
||||
if (x.metadata?.numPages !== undefined && x.metadata.numPages > 0 && req.body.scrapeOptions?.parsePDF !== false) {
|
||||
return a + x.metadata.numPages;
|
||||
} else {
|
||||
return a + 1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user