mirror of
https://github.com/iptv-org/epg.git
synced 2025-05-10 00:50:09 -04:00
Update sjonvarp.is
This commit is contained in:
parent
e7516fbed7
commit
83b4327a4c
4 changed files with 63 additions and 22 deletions
21
sites/sjonvarp.is/readme.md
Normal file
21
sites/sjonvarp.is/readme.md
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
# sjonvarp.is
|
||||||
|
|
||||||
|
https://sjonvarp.is/
|
||||||
|
|
||||||
|
### Download the guide
|
||||||
|
|
||||||
|
```sh
|
||||||
|
npm run grab -- --site=sjonvarp.is
|
||||||
|
```
|
||||||
|
|
||||||
|
### Update channel list
|
||||||
|
|
||||||
|
```sh
|
||||||
|
npm run channels:parse -- --config=./sites/sjonvarp.is/sjonvarp.is.config.js --output=./sites/sjonvarp.is/sjonvarp.is.channels.xml
|
||||||
|
```
|
||||||
|
|
||||||
|
### Test
|
||||||
|
|
||||||
|
```sh
|
||||||
|
npm test -- sjonvarp.is
|
||||||
|
```
|
|
@ -1,20 +1,16 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<channels>
|
<channels>
|
||||||
<channel site="sjonvarp.is" lang="is" xmltv_id="Hringbraut.is" site_id="HRING">Hringbraut</channel>
|
<channel site="sjonvarp.is" lang="is" xmltv_id="RUV2.is" site_id="RUVI">RÚV Íþróttir</channel>
|
||||||
<channel site="sjonvarp.is" lang="is" xmltv_id="N4.is" site_id="N4">N4</channel>
|
|
||||||
<channel site="sjonvarp.is" lang="is" xmltv_id="Omega.is" site_id="OMEG">Omega</channel>
|
|
||||||
<channel site="sjonvarp.is" lang="is" xmltv_id="RUV.is" site_id="RUV">RÚV</channel>
|
<channel site="sjonvarp.is" lang="is" xmltv_id="RUV.is" site_id="RUV">RÚV</channel>
|
||||||
<channel site="sjonvarp.is" lang="is" xmltv_id="RUV2.is" site_id="RUVI">RÚV 2</channel>
|
|
||||||
<channel site="sjonvarp.is" lang="is" xmltv_id="SiminnSport.is" site_id="S1SPORT">Síminn Sport</channel>
|
|
||||||
<channel site="sjonvarp.is" lang="is" xmltv_id="SiminnSport2.is" site_id="S1SPORT2">Síminn Sport 2</channel>
|
<channel site="sjonvarp.is" lang="is" xmltv_id="SiminnSport2.is" site_id="S1SPORT2">Síminn Sport 2</channel>
|
||||||
|
<channel site="sjonvarp.is" lang="is" xmltv_id="SiminnSport.is" site_id="S1SPORT">Síminn Sport</channel>
|
||||||
<channel site="sjonvarp.is" lang="is" xmltv_id="SjonvarpSimans.is" site_id="S1">Sjónvarp Símans</channel>
|
<channel site="sjonvarp.is" lang="is" xmltv_id="SjonvarpSimans.is" site_id="S1">Sjónvarp Símans</channel>
|
||||||
<channel site="sjonvarp.is" lang="is" xmltv_id="Stod2.is" site_id="ST2">Stöð 2</channel>
|
<channel site="sjonvarp.is" lang="is" xmltv_id="Stod2.is" site_id="ST2">Stöð 2</channel>
|
||||||
<channel site="sjonvarp.is" lang="is" xmltv_id="Stod2Bio.is" site_id="BIO">Stöð 2 Bíó</channel>
|
<channel site="sjonvarp.is" lang="is" xmltv_id="Stod2Esport.is" site_id="S2ESPORT">Stöð 2 E Sport</channel>
|
||||||
<channel site="sjonvarp.is" lang="is" xmltv_id="Stod2Esport.is" site_id="S2ESPORT">Stöð 2 Esport</channel>
|
|
||||||
<channel site="sjonvarp.is" lang="is" xmltv_id="Stod2Fjolskylda.is" site_id="STOD3">Stöð 2 Fjölskylda</channel>
|
<channel site="sjonvarp.is" lang="is" xmltv_id="Stod2Fjolskylda.is" site_id="STOD3">Stöð 2 Fjölskylda</channel>
|
||||||
<channel site="sjonvarp.is" lang="is" xmltv_id="Stod2Golf.is" site_id="GOLF">Stöð 2 Golf</channel>
|
<channel site="sjonvarp.is" lang="is" xmltv_id="Stod2Golf.is" site_id="GOLF">Stöð 2 Golf</channel>
|
||||||
<channel site="sjonvarp.is" lang="is" xmltv_id="Stod2Sport.is" site_id="SYN">Stöð 2 Sport</channel>
|
|
||||||
<channel site="sjonvarp.is" lang="is" xmltv_id="Stod2Sport2.is" site_id="SKJARSPORT">Stöð 2 Sport 2</channel>
|
<channel site="sjonvarp.is" lang="is" xmltv_id="Stod2Sport2.is" site_id="SKJARSPORT">Stöð 2 Sport 2</channel>
|
||||||
<channel site="sjonvarp.is" lang="is" xmltv_id="Stod2Sport3.is" site_id="S2SPORT3">Stöð 2 Sport 3</channel>
|
<channel site="sjonvarp.is" lang="is" xmltv_id="Stod2Sport3.is" site_id="S2SPORT3">Stöð 2 Sport 3</channel>
|
||||||
<channel site="sjonvarp.is" lang="is" xmltv_id="Stod2Sport4.is" site_id="S2SPORT4">Stöð 2 Sport 4</channel>
|
<channel site="sjonvarp.is" lang="is" xmltv_id="Stod2Sport4.is" site_id="S2SPORT4">Stöð 2 Sport 4</channel>
|
||||||
|
<channel site="sjonvarp.is" lang="is" xmltv_id="Stod2Sport.is" site_id="SYN">Stöð 2 Sport</channel>
|
||||||
</channels>
|
</channels>
|
||||||
|
|
|
@ -38,6 +38,32 @@ module.exports = {
|
||||||
})
|
})
|
||||||
|
|
||||||
return programs
|
return programs
|
||||||
|
},
|
||||||
|
async channels() {
|
||||||
|
const axios = require('axios')
|
||||||
|
const cheerio = require('cheerio')
|
||||||
|
|
||||||
|
const data = await axios
|
||||||
|
.get(`https://sjonvarp.is/`)
|
||||||
|
.then(r => r.data)
|
||||||
|
.catch(console.log)
|
||||||
|
|
||||||
|
let channels = []
|
||||||
|
|
||||||
|
const $ = cheerio.load(data)
|
||||||
|
$('.listing-row').each((i, el) => {
|
||||||
|
const site_id = $(el).attr('id')
|
||||||
|
const title = $(el).find('a.channel').first().attr('title')
|
||||||
|
const [, name] = title.match(/^Skoða dagskránna á (.*) í dag$/)
|
||||||
|
|
||||||
|
channels.push({
|
||||||
|
lang: 'is',
|
||||||
|
site_id,
|
||||||
|
name
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
return channels
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
// npm run grab -- --site=sjonvarp.is
|
|
||||||
|
|
||||||
const { parser, url } = require('./sjonvarp.is.config.js')
|
const { parser, url } = require('./sjonvarp.is.config.js')
|
||||||
const fs = require('fs')
|
const fs = require('fs')
|
||||||
const path = require('path')
|
const path = require('path')
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue