mirror of
https://github.com/mendableai/firecrawl.git
synced 2024-11-16 03:32:22 +08:00
Nick:
This commit is contained in:
parent
b0bd71a3a9
commit
6f68678b5d
|
@ -28,6 +28,7 @@ export async function mapController(
|
|||
|
||||
req.body = mapRequestSchema.parse(req.body);
|
||||
|
||||
|
||||
const limit = req.body.limit;
|
||||
const id = uuidv4();
|
||||
let links: string[] = [req.body.url];
|
||||
|
|
|
@ -27,6 +27,7 @@ const url = z.preprocess(
|
|||
.string()
|
||||
.url()
|
||||
.regex(/^https?:\/\//, "URL uses unsupported protocol")
|
||||
.regex(/\.[a-z]{2,}$/i, "URL must have a valid top-level domain")
|
||||
.refine(
|
||||
(x) => !isUrlBlocked(x),
|
||||
"Firecrawl currently does not support social media scraping due to policy restrictions. We're actively working on building support for it."
|
||||
|
@ -121,7 +122,7 @@ export const mapRequestSchema = crawlerOptions.extend({
|
|||
includeSubdomains: z.boolean().default(true),
|
||||
search: z.string().optional(),
|
||||
ignoreSitemap: z.boolean().default(false),
|
||||
limit: z.number().min(1).max(50).default(5000),
|
||||
limit: z.number().min(1).max(50).default(5000).optional(),
|
||||
}).strict(strictMessage);
|
||||
|
||||
// export type MapRequest = {
|
||||
|
|
Loading…
Reference in New Issue
Block a user