mirror of
https://github.com/mendableai/firecrawl.git
synced 2024-11-16 11:42:24 +08:00
Nick:
This commit is contained in:
parent
9e000ded03
commit
7cb14edec8
|
@ -185,7 +185,7 @@ describe("E2E Tests for API Routes", () => {
|
|||
);
|
||||
});
|
||||
|
||||
it("should return a successful response with a valid API key", async () => {
|
||||
it("should return a successful response with a valid API key for crawl", async () => {
|
||||
const response = await request(TEST_URL)
|
||||
.post("/v0/crawl")
|
||||
.set("Authorization", `Bearer ${process.env.TEST_API_KEY}`)
|
||||
|
@ -529,7 +529,7 @@ describe("E2E Tests for API Routes", () => {
|
|||
expect(response.statusCode).toBe(408);
|
||||
}, 3000);
|
||||
|
||||
it("should return a successful response with a valid API key", async () => {
|
||||
it("should return a successful response with a valid API key for crawlWebsitePreview", async () => {
|
||||
const response = await request(TEST_URL)
|
||||
.post("/v0/crawlWebsitePreview")
|
||||
.set("Authorization", `Bearer this_is_just_a_preview_token`)
|
||||
|
@ -558,7 +558,7 @@ describe("E2E Tests for API Routes", () => {
|
|||
expect(response.statusCode).toBe(401);
|
||||
});
|
||||
|
||||
it("should return a successful response with a valid API key", async () => {
|
||||
it("should return a successful response with a valid API key for search", async () => {
|
||||
const response = await request(TEST_URL)
|
||||
.post("/v0/search")
|
||||
.set("Authorization", `Bearer ${process.env.TEST_API_KEY}`)
|
||||
|
|
|
@ -3,7 +3,7 @@ import { fetchAndProcessPdf } from "../utils/pdfProcessor";
|
|||
export async function handleCustomScraping(
|
||||
text: string,
|
||||
url: string
|
||||
): Promise<{ scraper: string; url: string; waitAfterLoad: number, pageOptions?: { scrollXPaths?: string[] } } | null> {
|
||||
): Promise<{ scraper: string; url: string; waitAfterLoad?: number, pageOptions?: { scrollXPaths?: string[] } } | null> {
|
||||
// Check for Readme Docs special case
|
||||
if (text.includes('<meta name="readme-deploy"')) {
|
||||
console.log(
|
||||
|
|
Loading…
Reference in New Issue
Block a user