continue cleaning + simplify mtel.ba (right now broken EPG on backend)

This commit is contained in:
theofficialomega
2025-07-18 23:49:04 +02:00
parent 6b3e17861a
commit 5e953b6955
11 changed files with 95 additions and 53 deletions

View File

@@ -5,7 +5,7 @@ const cheerio = require('cheerio')
const utc = require('dayjs/plugin/utc')
const timezone = require('dayjs/plugin/timezone')
const customParseFormat = require('dayjs/plugin/customParseFormat')
const _ = require('lodash')
const { startCase } = require('../../scripts/functions')
dayjs.extend(utc)
dayjs.extend(timezone)
@@ -164,7 +164,7 @@ function parseDuration($item) {
function parseItems(content, date) {
if (!content) return []
const $ = cheerio.load(content)
const d = _.startCase(date.locale('es').format('DD MMMM YYYY'))
const d = startCase(date.locale('es').format('DD MMMM YYYY'))
return $(`.trProg[title*="${d}"]`).toArray()
}