Merge pull request #379 from yarafie/patch-1
Update elcinema.com.config.js
This commit is contained in:
@@ -105,10 +105,15 @@ 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 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()
|
||||||
|
|||||||
Reference in New Issue
Block a user