import got from '@/utils/got';
import { load } from 'cheerio';
import timezone from '@/utils/timezone';
import { parseDate } from '@/utils/parse-date';
import { art } from '@/utils/render';
import path from 'node:path';
const domain = 'whu.edu.cn';
/**
* Process the meta information from the HTML content.
*
* @param {string} text - The HTML content.
* @returns {Object} The meta information extracted from the content.
*/
const processMeta = (text) => {
const meta = {};
text.replaceAll(/ {
meta[key] = value;
});
return meta;
};
/**
* Get a specific meta value from the meta object.
*
* @param {Object} metaObject - The meta object.
* @param {string} key - The key of the meta value to retrieve.
* @returns {string|undefined} The value of the specified meta key, or undefined if not found.
*/
const getMeta = (metaObject, key) => (Object.hasOwn(metaObject, key) ? metaObject[key] : undefined);
/**
* Retrieves item details from a given link and updates the item object.
* @param {Object} item - The item object to be updated.
* @param {string} rootUrl - The root URL of the item's link.
* @returns {Promise