mirror of
https://github.com/iptv-org/epg.git
synced 2025-05-10 17:10:07 -04:00
Merge pull request #78 from iptv-org/LaneSh4d0w-patch-1
Fix EPG for programme-tv.net
This commit is contained in:
commit
844e739f94
1 changed files with 5 additions and 5 deletions
|
@ -31,25 +31,25 @@ module.exports = {
|
||||||
parser: function ({ content, date }) {
|
parser: function ({ content, date }) {
|
||||||
const programs = []
|
const programs = []
|
||||||
const dom = new JSDOM(content)
|
const dom = new JSDOM(content)
|
||||||
const broadcastCards = dom.window.document.querySelectorAll('.singleBroadcastCard')
|
const broadcastCards = dom.window.document.querySelectorAll('.mainBroadcastCard')
|
||||||
broadcastCards.forEach(card => {
|
broadcastCards.forEach(card => {
|
||||||
const hour = (
|
const hour = (
|
||||||
card.getElementsByClassName('singleBroadcastCard-hour')[0] || { textContent: '' }
|
card.getElementsByClassName('mainBroadcastCard-startingHour')[0] || { textContent: '' }
|
||||||
).textContent
|
).textContent
|
||||||
.toString()
|
.toString()
|
||||||
.trim()
|
.trim()
|
||||||
const durationContent = (
|
const durationContent = (
|
||||||
card.getElementsByClassName('singleBroadcastCard-durationContent')[0] || { textContent: '' }
|
card.getElementsByClassName('mainBroadcastCard-durationContent')[0] || { textContent: '' }
|
||||||
).textContent
|
).textContent
|
||||||
.toString()
|
.toString()
|
||||||
.trim()
|
.trim()
|
||||||
const title = (
|
const title = (
|
||||||
card.getElementsByClassName('singleBroadcastCard-title')[0] || { textContent: '' }
|
card.getElementsByClassName('mainBroadcastCard-title')[0] || { textContent: '' }
|
||||||
).textContent
|
).textContent
|
||||||
.toString()
|
.toString()
|
||||||
.trim()
|
.trim()
|
||||||
const category = (
|
const category = (
|
||||||
card.getElementsByClassName('singleBroadcastCard-genre')[0] || { textContent: '' }
|
card.getElementsByClassName('mainBroadcastCard-genre')[0] || { textContent: '' }
|
||||||
).textContent
|
).textContent
|
||||||
.toString()
|
.toString()
|
||||||
.trim()
|
.trim()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue