const got = require('@/utils/got');
const cheerio = require('cheerio');
const timezone = require('@/utils/timezone');
const { parseDate } = require('@/utils/parse-date');
const { art } = require('@/utils/render');
const path = require('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.replace(/ {
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) => (metaObject.hasOwnProperty(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