switch to undici :3

This commit is contained in:
Ashley 2023-08-21 21:08:57 +00:00
parent 3bb4e1030e
commit 5554cb543e

View file

@ -6,7 +6,6 @@
* Please don't remove this comment while sharing this code.
*/
const fetch = require("node-fetch");
const { toJson } = require("xml2json");
const { curly } = require("node-libcurl");
const fetcher = require("../libpoketube/libpoketube-fetcher.js");
@ -64,6 +63,9 @@ class PokeTubeCore {
* @returns {Promise<object>} Promise resolving to the video information.
*/
async video(v) {
const { fetch } = await import("undici");
if (v == null) return "Gib ID";
// Check if result is already cached