mirror of
https://github.com/iptv-org/epg.git
synced 2025-05-10 17:10:07 -04:00
Update elcinema.com.config.js
This commit is contained in:
parent
8ac8ba58af
commit
8eea99a123
1 changed files with 5 additions and 5 deletions
|
@ -106,14 +106,14 @@ function parseDescription(item) {
|
||||||
function parseItems(content, channel, date) {
|
function parseItems(content, channel, date) {
|
||||||
const $ = cheerio.load(content)
|
const $ = cheerio.load(content)
|
||||||
|
|
||||||
// const dateString = date.locale(channel.lang).format('dddd D MMMM')
|
const dateString = date.locale(channel.lang).format('dddd D MMMM')
|
||||||
const dayNum = date.locale(channel.lang).format('D')
|
|
||||||
if ( dayNum.length == 1 ) dateString = date.locale(channel.lang).format('dddd D MMMM')
|
|
||||||
if ( dayNum.length == 2 ) dateString = date.locale(channel.lang).format('dddd D MMMM')
|
|
||||||
|
|
||||||
const list = $('.dates')
|
const list = $('.dates')
|
||||||
.filter((i, el) => {
|
.filter((i, el) => {
|
||||||
return $(el).text().trim() === dateString
|
let parsedDateString = $(el).text().trim()
|
||||||
|
parsedDateString = parsedDateString.replace(/\s\s+/g, ' ')
|
||||||
|
|
||||||
|
return parsedDateString === dateString
|
||||||
})
|
})
|
||||||
.first()
|
.first()
|
||||||
.parent()
|
.parent()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue