diff --git a/package-lock.json b/package-lock.json index 4c5972b..b99daa1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,6 +13,7 @@ "cheerio": "^1.1.2", "concurrently": "^9.2.0", "express": "^5.1.0", + "fetch-blob": "^4.0.0", "node-cron": "^4.2.1", "openai": "^5.0.2", "puppeteer": "^24.10.0", @@ -1073,6 +1074,28 @@ "pend": "~1.2.0" } }, + "node_modules/fetch-blob": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/fetch-blob/-/fetch-blob-4.0.0.tgz", + "integrity": "sha512-nPmnhRmpNMjYWnp9EBMGs6z5lq9RXed5W1vuZcECrsDVQInM8AMQSooVb3X183Aole60adzjWbH9qlRFWzDDTA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/jimmywarting" + }, + { + "type": "paypal", + "url": "https://paypal.me/jimmywarting" + } + ], + "license": "MIT", + "dependencies": { + "node-domexception": "^1.0.0" + }, + "engines": { + "node": ">=16.7" + } + }, "node_modules/finalhandler": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-2.1.0.tgz", @@ -1596,6 +1619,26 @@ "node": ">=6.0.0" } }, + "node_modules/node-domexception": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz", + "integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==", + "deprecated": "Use your platform's native DOMException instead", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/jimmywarting" + }, + { + "type": "github", + "url": "https://paypal.me/jimmywarting" + } + ], + "license": "MIT", + "engines": { + "node": ">=10.5.0" + } + }, "node_modules/nth-check": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz", diff --git a/package.json b/package.json index 341a434..068236a 100644 --- a/package.json +++ b/package.json @@ -15,6 +15,7 @@ "cheerio": "^1.1.2", "concurrently": "^9.2.0", "express": "^5.1.0", + "fetch-blob": "^4.0.0", "node-cron": "^4.2.1", "openai": "^5.0.2", "puppeteer": "^24.10.0", diff --git a/server.js b/server.js index b515dc1..5dfa12b 100644 --- a/server.js +++ b/server.js @@ -3,6 +3,8 @@ const path = require("path"); const app = express(); const fs = require("fs/promises"); const cheerio = require("cheerio"); +const { File } = require('fetch-blob'); +global.File = File; const PORT = process.env.PORT || 3000;