mirror of
https://github.com/mendableai/firecrawl.git
synced 2024-11-16 19:58:08 +08:00
20 lines
436 B
TypeScript
20 lines
436 B
TypeScript
import { WebScraperDataProvider } from "./scraper/WebScraper";
|
|
|
|
async function example() {
|
|
const example = new WebScraperDataProvider();
|
|
|
|
await example.setOptions({
|
|
jobId: "TEST",
|
|
mode: "crawl",
|
|
urls: ["https://mendable.ai"],
|
|
crawlerOptions: {},
|
|
});
|
|
const docs = await example.getDocuments(false);
|
|
docs.map((doc) => {
|
|
console.log(doc.metadata.sourceURL);
|
|
});
|
|
console.log(docs.length);
|
|
}
|
|
|
|
// example();
|