var jpgImageUrls = [
  "https://free-braindumps.com/images/exam-dumps/AI-900/19601894-47fa-46fd-8628-00a836341cc5.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/27b5c25c-f806-471f-ad25-c25850e9b842.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/7411cdbf-8752-4aeb-954e-9dafb879ec3d.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/6f222c79-9af1-491b-b912-171624dcada2.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/e0a5954b-0869-45b4-84ba-5df92ce54baf.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/042e16b6-a12f-4a4e-9614-4fdb042025f6.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/c1e66141-1407-4fae-a798-aba5db428500.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/b34f9a49-6c0c-4c28-b618-4ccd9ad93c5c.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/7623e19a-1e30-4ad7-8383-6528fd0a9aa9.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/e7f32550-1453-4634-8a88-ef5cda1e3cc0.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/665794bd-b7ba-4ebf-a13d-c739ca4abfda.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/b32cbcfd-1635-475c-a742-6023ef9c7aba.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/14b64bb1-13d6-410d-8e41-06d1e7822171.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/aa5dbed5-580a-476a-bc74-99c8d6fc363a.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/c5efaad5-b4fb-46af-a100-3ec830550264.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/a8fc05c3-4ad2-41db-904c-e3171dc16a2f.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/3be7e3da-61d3-4563-8a1b-011dd562008f.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/e5a6722e-8fe5-433a-9d3d-f9f926ade2b5.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/a5bf27d4-5cc2-4bb4-8124-cecafa81f913.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/b615e6b7-ca0b-46cc-a44d-84935be5bd32.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/ffd4afee-42c4-4747-a42d-03488d0bcdee.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/e4990883-29cf-4237-8875-1fa85f0642bc.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/a845d0bf-9821-4908-acc1-5df130712574.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/e1bc360a-5266-4c7d-9ce5-0a59df07e61d.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/51cc433d-334a-46d9-9b10-9f8dec59a47f.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/fb0a9323-16af-42fa-a33d-d5469b1438d3.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/6b959bcb-9e1c-4b76-9d4e-a2bccaef9e8e.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/32b3a65c-b502-46a6-90a5-f73b480b997b.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/cdecb26d-c070-4fa8-893a-9de6f1c19486.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/5a4b2c55-a7a9-449d-be25-4c3d3251cbf5.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/22183d4e-e740-401f-a884-40625310d459.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/2c57989e-166c-4ac9-aba7-d0936468deff.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/00b3c927-56d1-4b7d-b9ed-55d794cadfb4.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/4a69f809-13c2-45e7-98be-8c7fa21d0a24.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/b6ec57f1-28e5-424f-82ee-866bd644d1ee.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/e2ce13cd-e418-48eb-8b13-506c474043fb.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/3f1cd94c-3400-440a-9cc8-c7307a45eebe.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/f811c0a0-f8bd-4654-ba52-953fc6a7e55d.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/91493881-0c63-4106-a4c9-be81063bf803.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/9d377620-9fec-4574-8adf-2fd87c444d0e.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/1c62e5e8-2a9b-4eef-8b67-61e920342ce6.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/0f9746c0-91b1-4f7f-a26d-898ed24aff8b.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/9a42679f-4bdc-4ce0-9cd3-9f3b7e8e3800.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/4c5be1b4-50c9-4d05-bb04-bb6be40595c5.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/92553c7f-15f0-46a4-992f-a6eea711c5cb.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/27efa014-4c16-4596-b833-b8afaf20947e.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/e91a8a5c-8118-4b45-a8d0-1a7b636729b2.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/986c0faf-1fab-4095-ae2a-f0cc681607bb.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/e8f1f35f-e71e-4c65-b0f7-0d8456751f55.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/1850762b-1bdd-4e0f-8d8b-755afb2b1bc2.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/072c5086-d268-41b1-910b-448f03e976bc.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/17706814-d67b-4dcf-ad03-bac45cab5ec7.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/d397e048-7c38-43c0-983e-6c016cb7ac0e.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/4433e59a-971d-4d2f-b6e8-08c60b687503.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/3f4d40d2-314d-476a-bea6-4443b553b822.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/821b3baf-b4db-452c-baba-21439d92eb63.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/1233ac93-bc3c-4c0a-8fcb-4f5dfcb1e382.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/a55fe895-50c7-432a-b86d-7cf8c76c9278.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/9ba34ebe-f496-4d86-adb2-8b637bbd26c1.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/31ef1dbc-a11a-4691-b9bc-4b66b1701d79.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/5de145b5-c6e5-486b-aee6-cc2a17dafd90.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/c3f4d693-f9b3-4323-bb39-ba71a358df9f.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/ada0c76f-1ec5-430c-9940-5616e1a26443.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/4433a91e-f9d6-46be-a320-f7bca8a885d8.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/f0a08e59-d285-4ee1-9fbb-ea980bb57911.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/ed1fdbf7-5e8c-44ee-a2cf-faf741f104d9.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/eda17fc4-0617-4bc6-9cf0-9a60c66a1043.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/6f8b6d04-fb7f-4401-9461-51d5f6365589.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/011665bc-5aca-4c4b-b594-8884a72a4705.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/333206e5-e5b2-4861-9b3e-92786a4c56ac.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/2dd9da1a-5c49-489b-adaf-d4b091ad88af.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/8f81da64-d9ac-4f13-80c1-2663b3e8e45e.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/0722025a-d759-4336-a0b6-8607f2b6e372.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/9fa96de4-95cc-4d4a-bdd9-2a9205f15cda.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/84ab599e-eb00-4280-9c77-527a951dc4af.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/150c72e9-33db-426b-901f-ced08eb0e84c.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/6f256c08-713b-4537-86fc-357645ff19b3.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/7e318706-73c0-4211-a000-ef25b0ffda15.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/7bd04cf8-aa1b-4aa2-bc47-c6ce113a7510.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/e7f3f23f-ed31-4dac-9a72-712bb86ab566.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/32017b30-5f42-4e7e-a3d0-3b92596cd2cd.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/a336d6c7-8657-448e-98f4-5edd68d95c04.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/6aad8030-56d2-41e8-9a41-61e27e359afe.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/dafae353-7778-43da-8d56-f769fb50189b.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/6381cca4-6dc6-4046-ae28-88fdf18b96fd.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/f3b46fa5-2cea-42c4-9aaa-2cc360087d55.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/d9d9ad16-e865-4fc5-ab8e-5f49f84761ff.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/d404af82-47bc-4219-b253-d214afb8fa23.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/6ca2f936-2309-4e85-bcb7-f649c5a01a98.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/6a1a2b0e-b19e-4d8c-8339-902adadcf892.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/f903adbf-0766-415c-a867-ecde5c2118e9.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/9471f930-b475-4e9f-b87f-a8c1bf4019ed.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/9e5a0bf2-77f4-44f4-909f-8d56a9c9ddce.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/d7e02043-b3ac-4e63-945b-9898d3fd3192.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/7d27e54a-684e-4896-b9e6-999710ee8035.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/fd4e1b91-b432-4717-aac0-311fee64b64b.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/4dea64a5-1438-4e70-8c01-ff9e79421fd4.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/1c0b19d6-ed07-4f81-9ee8-95629ab9037d.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/319eb9f6-5eb9-4ea8-a1df-05448f3403f2.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/094444fb-7e2b-4d83-91a5-6c31c5546981.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/1cb1d13c-7d7b-448e-bbdf-1c9f1c7ddcab.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/aa17fbe8-e699-486a-8153-b13f56f7d93c.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/7292cc4f-986d-4fa2-b522-e37a90854cc7.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/06c4b074-8caa-4819-ad77-d3362b9b28c9.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/6c2a4f9b-b325-4eac-b737-e45c0f3da6eb.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/ef7a75e9-82d6-427c-ada6-23e356cd6b8f.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/f264773c-1069-4bf1-894d-7756b65a316a.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/19ef52ae-cde4-4f83-a6bc-c21e4a7887dd.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/b23d4cc0-063c-44e9-8278-f5abbd7e9839.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/95988e70-44a8-4175-bd1f-a8ee78839e35.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/331baabf-c050-4ab7-84e2-d13748785278.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/9cc9dff3-9216-48c4-9644-c1dd6de2107a.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/12897aa8-319e-4f95-91b5-7eb5842dee9a.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/bbd6a73b-4f09-4c65-b2bb-b1073834dcc4.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/47182d58-5ac8-4b3c-a84a-64edd37ec91a.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/9b4b6a90-95bc-4918-8d9a-0cabe645bbbe.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/b1b3344b-12ac-4fee-8dba-9b8b6dfc0276.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/b3873481-8d33-40e9-adfe-ef8c89317c87.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/e6e79de1-60f2-45df-8ac8-9faa34fb37d6.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/493cda16-e0f6-496c-a5db-e9865ecdcc73.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/660ebeb4-f0e8-4133-81f6-7abe3a04fc6c.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/9d70ebcc-fd60-4455-8cfd-d7a584f233bc.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/481b68d3-8254-4dc6-b71f-d579e18c51cc.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/1d7b095a-a2d5-4af9-9b88-b57b21918039.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/33f2cf69-cbfd-4dcf-9ad2-272f2375ca3d.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/cca17d30-ac0b-43df-911c-3f564c1b4ad7.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/d0a3aab7-b5eb-4db8-8338-7ca4a6f0e06e.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/2a718ccc-23bb-480f-9de1-1e13077aa25a.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/556e8dc5-43b0-4d39-a218-6475eba5decc.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/2bdff9ef-5756-4801-8b5b-9d28bdf1d42e.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/e54e2696-c869-4e50-857f-bc9142596e7c.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/24e51069-3936-437a-b034-4fa46cd3b51e.jpg",
  "https://free-braindumps.com/images/exam-dumps/AI-900/ea064f01-b716-48b3-8bc4-91ced0dff625.jpg",
];

const axios = require("axios");
const fs = require("fs");
const path = require("path");

// Function to download a single image
async function downloadImage(url, outputPath) {
  const writer = fs.createWriteStream(outputPath);

  try {
    const response = await axios({
      url,
      method: "GET",
      responseType: "stream",
    });

    response.data.pipe(writer);

    return new Promise((resolve, reject) => {
      writer.on("finish", resolve);
      writer.on("error", reject);
    });
  } catch (error) {
    console.error(`Error downloading ${url}:`, error.message);
  }
}

// Function to download all images
async function downloadAllImages(urls) {
  for (const url of urls) {
    const fileName = path.basename(url);
    const outputPath = path.join(__dirname, "images", fileName);

    // Create the images directory if it doesn't exist
    if (!fs.existsSync(path.dirname(outputPath))) {
      fs.mkdirSync(path.dirname(outputPath), { recursive: true });
    }

    console.log(`Downloading ${url}...`);
    await downloadImage(url, outputPath);
    console.log(`Downloaded ${url} to ${outputPath}`);
  }
}

// Start the download process
downloadAllImages(jpgImageUrls).then(() => {
  console.log("All images downloaded.");
});
