mirror of
https://github.com/iptv-org/epg.git
synced 2025-05-10 00:50:09 -04:00
Update streamingtvguides.com
This commit is contained in:
parent
858d1f40b1
commit
7e5258fecc
4 changed files with 3113 additions and 2 deletions
21
sites/streamingtvguides.com/readme.md
Normal file
21
sites/streamingtvguides.com/readme.md
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
# streamingtvguides.com
|
||||||
|
|
||||||
|
https://streamingtvguides.com/
|
||||||
|
|
||||||
|
### Download the guide
|
||||||
|
|
||||||
|
```sh
|
||||||
|
npm run grab -- --site=streamingtvguides.com
|
||||||
|
```
|
||||||
|
|
||||||
|
### Update channel list
|
||||||
|
|
||||||
|
```sh
|
||||||
|
npm run channels:parse -- --config=./sites/streamingtvguides.com/streamingtvguides.com.config.js --output=./sites/streamingtvguides.com/streamingtvguides.com.channels.xml
|
||||||
|
```
|
||||||
|
|
||||||
|
### Test
|
||||||
|
|
||||||
|
```sh
|
||||||
|
npm test -- streamingtvguides.com
|
||||||
|
```
|
File diff suppressed because it is too large
Load diff
|
@ -32,6 +32,33 @@ module.exports = {
|
||||||
programs = _.orderBy(_.uniqBy(programs, 'start'), 'start')
|
programs = _.orderBy(_.uniqBy(programs, 'start'), 'start')
|
||||||
|
|
||||||
return programs
|
return programs
|
||||||
|
},
|
||||||
|
async channels({ country, lang }) {
|
||||||
|
const axios = require('axios')
|
||||||
|
const data = await axios
|
||||||
|
.get(`https://streamingtvguides.com/Preferences`)
|
||||||
|
.then(r => r.data)
|
||||||
|
.catch(console.log)
|
||||||
|
|
||||||
|
let channels = []
|
||||||
|
|
||||||
|
const $ = cheerio.load(data)
|
||||||
|
$('#channel-group-all > div > div').each((i, el) => {
|
||||||
|
const site_id = $(el).find('input').attr('value').replace('&', '&')
|
||||||
|
const label = $(el).text().trim()
|
||||||
|
const svgTitle = $(el).find('svg').attr('alt')
|
||||||
|
const name = (label || svgTitle || '').replace(site_id, '').trim()
|
||||||
|
|
||||||
|
if (!name || !site_id) return
|
||||||
|
|
||||||
|
channels.push({
|
||||||
|
lang: 'en',
|
||||||
|
site_id,
|
||||||
|
name
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
return channels
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
// npm run grab -- --site=streamingtvguides.com
|
|
||||||
|
|
||||||
const { parser, url } = require('./streamingtvguides.com.config.js')
|
const { parser, url } = require('./streamingtvguides.com.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