बैच स्क्रैप

बैच स्क्रैप सामान्य स्क्रैप के समान काम करता है, सिवाय इसके कि एकल URL के बजाय, आप एक साथ स्क्रैप करने के लिए URLs की सूची प्रदान कर सकते हैं।

import { ScrapingCrawl } from "@scrapeless-ai/sdk";
 
// Initialize the client
const client = new ScrapingCrawl({
  apiKey: "your-api-key", // Get your API key from https://scrapeless.com
});
 
(async () => {
  const result = await client.batchScrapeUrls(
    ["https://example.com", "https://scrapeless.com"],
    {
      formats: ["markdown", "html", "links"],
      onlyMainContent: false,
      timeout: 15000,
      browserOptions: {
        proxyCountry: "ANY",
        sessionName: "Crawl",
        sessionRecording: true,
        sessionTTL: 900,
      },
    }
  );
 
  console.log(result);
})();
 

स्क्रैप एंडपॉइंट पर पूर्ण संदर्भ के लिए, API संदर्भ देखें।