Replace LF line endings with CRLF

This commit is contained in:
freearhey
2025-09-28 17:55:05 +03:00
parent efc74efcf8
commit b6a589c62a
1192 changed files with 445631 additions and 445631 deletions
+21 -21
View File
@@ -1,21 +1,21 @@
# watchyour.tv
https://watchyour.tv/tvexperience.php
### Download the guide
```sh
npm run grab --- --site=watchyour.tv
```
### Update channel list
```sh
npm run channels:parse --- --config=./sites/watchyour.tv/watchyour.tv.config.js --output=./sites/watchyour.tv/watchyour.tv.channels.xml
```
### Test
```sh
npm test --- watchyour.tv
```
# watchyour.tv
https://watchyour.tv/tvexperience.php
### Download the guide
```sh
npm run grab --- --site=watchyour.tv
```
### Update channel list
```sh
npm run channels:parse --- --config=./sites/watchyour.tv/watchyour.tv.config.js --output=./sites/watchyour.tv/watchyour.tv.channels.xml
```
### Test
```sh
npm test --- watchyour.tv
```
+43 -43
View File
@@ -1,43 +1,43 @@
<?xml version="1.0" encoding="UTF-8"?>
<channels>
<channel site="watchyour.tv" lang="en" xmltv_id="" site_id="796">TVS All American</channel>
<channel site="watchyour.tv" lang="en" xmltv_id="" site_id="802">TVS Buckboard Network</channel>
<channel site="watchyour.tv" lang="en" xmltv_id="" site_id="815">TVS Flashback Network</channel>
<channel site="watchyour.tv" lang="en" xmltv_id="" site_id="817">TVS Light Network</channel>
<channel site="watchyour.tv" lang="en" xmltv_id="" site_id="818">TVS Tel Ra Network</channel>
<channel site="watchyour.tv" lang="en" xmltv_id="" site_id="824">TVS Port O Call</channel>
<channel site="watchyour.tv" lang="en" xmltv_id="" site_id="831">TVS Action Network</channel>
<channel site="watchyour.tv" lang="en" xmltv_id="" site_id="832">TVS TeleSports</channel>
<channel site="watchyour.tv" lang="en" xmltv_id="" site_id="833">TVS Bowling Network</channel>
<channel site="watchyour.tv" lang="en" xmltv_id="" site_id="834">Pet Parade Network</channel>
<channel site="watchyour.tv" lang="en" xmltv_id="" site_id="840">TVS Consumer Direct</channel>
<channel site="watchyour.tv" lang="en" xmltv_id="" site_id="845">TVS Opus Network</channel>
<channel site="watchyour.tv" lang="en" xmltv_id="" site_id="846">TVS Talk Network</channel>
<channel site="watchyour.tv" lang="en" xmltv_id="" site_id="848">TVS Variety Network</channel>
<channel site="watchyour.tv" lang="en" xmltv_id="" site_id="849">TVS Vintage Network</channel>
<channel site="watchyour.tv" lang="en" xmltv_id="" site_id="850">TVS Soft Winds Network</channel>
<channel site="watchyour.tv" lang="en" xmltv_id="TVSBoxing.us" site_id="786">TVS Boxing Network</channel>
<channel site="watchyour.tv" lang="en" xmltv_id="TVSCipherNetwork.us" site_id="843">TVS Cipher Network</channel>
<channel site="watchyour.tv" lang="en" xmltv_id="TVSClassicMovies.us" site_id="820">TVS Classic Movies</channel>
<channel site="watchyour.tv" lang="en" xmltv_id="TVSClassicSports.us" site_id="735">TVS Classic Sports</channel>
<channel site="watchyour.tv" lang="en" xmltv_id="TVSComedyNetwork.us" site_id="829">TVS Comedy</channel>
<channel site="watchyour.tv" lang="en" xmltv_id="TVSDriveInMovie.us" site_id="819">TVS Drive In Movie</channel>
<channel site="watchyour.tv" lang="en" xmltv_id="TVSFilmNoirNetwork.us" site_id="842">TVS Film Noir Network</channel>
<channel site="watchyour.tv" lang="en" xmltv_id="TVSFrontPageDetective.us" site_id="844">TVS Front Page Detective</channel>
<channel site="watchyour.tv" lang="en" xmltv_id="TVSHiTops.us" site_id="816">TVS Hi Tops</channel>
<channel site="watchyour.tv" lang="en" xmltv_id="TVSHollywoodHistory.us" site_id="823">TVS Hollywood History</channel>
<channel site="watchyour.tv" lang="en" xmltv_id="TVSHorrorNetwork.us" site_id="825">TVS Horror</channel>
<channel site="watchyour.tv" lang="en" xmltv_id="TVSMainstreet.us" site_id="799">TVS Main Street</channel>
<channel site="watchyour.tv" lang="en" xmltv_id="TVSNostalgia.us" site_id="797">TVS Nostalgia</channel>
<channel site="watchyour.tv" lang="en" xmltv_id="TVSNostalgiaMovies.us" site_id="822">TVS Nostalgia Movie Network</channel>
<channel site="watchyour.tv" lang="en" xmltv_id="TVSPinballNetwork.us" site_id="837">TVS Pinball Network</channel>
<channel site="watchyour.tv" lang="en" xmltv_id="TVSQuizShowNetwork.us" site_id="830">TVS Quiz Show Network</channel>
<channel site="watchyour.tv" lang="en" xmltv_id="TVSSelectNetwork.us" site_id="827">TVS Select Network</channel>
<channel site="watchyour.tv" lang="en" xmltv_id="TVSSiloDiscountNetwork.us" site_id="847">TVS Sci Fi Network</channel>
<channel site="watchyour.tv" lang="en" xmltv_id="TVSTallyHo.us" site_id="826">TVS Tally Ho</channel>
<channel site="watchyour.tv" lang="en" xmltv_id="TVSTavern.us" site_id="795">TVS Tavern TV</channel>
<channel site="watchyour.tv" lang="en" xmltv_id="TVSTodayHomeEntertainmentNetwork.us" site_id="841">TVS Today Home Entertainment Network</channel>
<channel site="watchyour.tv" lang="en" xmltv_id="TVSTurbo.us" site_id="793">TVS Turbo Network</channel>
<channel site="watchyour.tv" lang="en" xmltv_id="TVSWesternMovie.us" site_id="821">TVS Western Movie</channel>
<channel site="watchyour.tv" lang="en" xmltv_id="TVSWomenSports.us" site_id="798">TVS Women&apos;s Sports Network</channel>
</channels>
<?xml version="1.0" encoding="UTF-8"?>
<channels>
<channel site="watchyour.tv" lang="en" xmltv_id="" site_id="796">TVS All American</channel>
<channel site="watchyour.tv" lang="en" xmltv_id="" site_id="802">TVS Buckboard Network</channel>
<channel site="watchyour.tv" lang="en" xmltv_id="" site_id="815">TVS Flashback Network</channel>
<channel site="watchyour.tv" lang="en" xmltv_id="" site_id="817">TVS Light Network</channel>
<channel site="watchyour.tv" lang="en" xmltv_id="" site_id="818">TVS Tel Ra Network</channel>
<channel site="watchyour.tv" lang="en" xmltv_id="" site_id="824">TVS Port O Call</channel>
<channel site="watchyour.tv" lang="en" xmltv_id="" site_id="831">TVS Action Network</channel>
<channel site="watchyour.tv" lang="en" xmltv_id="" site_id="832">TVS TeleSports</channel>
<channel site="watchyour.tv" lang="en" xmltv_id="" site_id="833">TVS Bowling Network</channel>
<channel site="watchyour.tv" lang="en" xmltv_id="" site_id="834">Pet Parade Network</channel>
<channel site="watchyour.tv" lang="en" xmltv_id="" site_id="840">TVS Consumer Direct</channel>
<channel site="watchyour.tv" lang="en" xmltv_id="" site_id="845">TVS Opus Network</channel>
<channel site="watchyour.tv" lang="en" xmltv_id="" site_id="846">TVS Talk Network</channel>
<channel site="watchyour.tv" lang="en" xmltv_id="" site_id="848">TVS Variety Network</channel>
<channel site="watchyour.tv" lang="en" xmltv_id="" site_id="849">TVS Vintage Network</channel>
<channel site="watchyour.tv" lang="en" xmltv_id="" site_id="850">TVS Soft Winds Network</channel>
<channel site="watchyour.tv" lang="en" xmltv_id="TVSBoxing.us" site_id="786">TVS Boxing Network</channel>
<channel site="watchyour.tv" lang="en" xmltv_id="TVSCipherNetwork.us" site_id="843">TVS Cipher Network</channel>
<channel site="watchyour.tv" lang="en" xmltv_id="TVSClassicMovies.us" site_id="820">TVS Classic Movies</channel>
<channel site="watchyour.tv" lang="en" xmltv_id="TVSClassicSports.us" site_id="735">TVS Classic Sports</channel>
<channel site="watchyour.tv" lang="en" xmltv_id="TVSComedyNetwork.us" site_id="829">TVS Comedy</channel>
<channel site="watchyour.tv" lang="en" xmltv_id="TVSDriveInMovie.us" site_id="819">TVS Drive In Movie</channel>
<channel site="watchyour.tv" lang="en" xmltv_id="TVSFilmNoirNetwork.us" site_id="842">TVS Film Noir Network</channel>
<channel site="watchyour.tv" lang="en" xmltv_id="TVSFrontPageDetective.us" site_id="844">TVS Front Page Detective</channel>
<channel site="watchyour.tv" lang="en" xmltv_id="TVSHiTops.us" site_id="816">TVS Hi Tops</channel>
<channel site="watchyour.tv" lang="en" xmltv_id="TVSHollywoodHistory.us" site_id="823">TVS Hollywood History</channel>
<channel site="watchyour.tv" lang="en" xmltv_id="TVSHorrorNetwork.us" site_id="825">TVS Horror</channel>
<channel site="watchyour.tv" lang="en" xmltv_id="TVSMainstreet.us" site_id="799">TVS Main Street</channel>
<channel site="watchyour.tv" lang="en" xmltv_id="TVSNostalgia.us" site_id="797">TVS Nostalgia</channel>
<channel site="watchyour.tv" lang="en" xmltv_id="TVSNostalgiaMovies.us" site_id="822">TVS Nostalgia Movie Network</channel>
<channel site="watchyour.tv" lang="en" xmltv_id="TVSPinballNetwork.us" site_id="837">TVS Pinball Network</channel>
<channel site="watchyour.tv" lang="en" xmltv_id="TVSQuizShowNetwork.us" site_id="830">TVS Quiz Show Network</channel>
<channel site="watchyour.tv" lang="en" xmltv_id="TVSSelectNetwork.us" site_id="827">TVS Select Network</channel>
<channel site="watchyour.tv" lang="en" xmltv_id="TVSSiloDiscountNetwork.us" site_id="847">TVS Sci Fi Network</channel>
<channel site="watchyour.tv" lang="en" xmltv_id="TVSTallyHo.us" site_id="826">TVS Tally Ho</channel>
<channel site="watchyour.tv" lang="en" xmltv_id="TVSTavern.us" site_id="795">TVS Tavern TV</channel>
<channel site="watchyour.tv" lang="en" xmltv_id="TVSTodayHomeEntertainmentNetwork.us" site_id="841">TVS Today Home Entertainment Network</channel>
<channel site="watchyour.tv" lang="en" xmltv_id="TVSTurbo.us" site_id="793">TVS Turbo Network</channel>
<channel site="watchyour.tv" lang="en" xmltv_id="TVSWesternMovie.us" site_id="821">TVS Western Movie</channel>
<channel site="watchyour.tv" lang="en" xmltv_id="TVSWomenSports.us" site_id="798">TVS Women&apos;s Sports Network</channel>
</channels>
+56 -56
View File
@@ -1,56 +1,56 @@
const dayjs = require('dayjs')
const axios = require('axios')
module.exports = {
site: 'watchyour.tv',
days: 2,
url: 'https://www.watchyour.tv/guide.json',
request: {
cache: {
ttl: 60 * 60 * 1000 // 1 hour
}
},
parser: function ({ content, date, channel }) {
let programs = []
const items = parseItems(content, date, channel)
items.forEach(item => {
const start = parseStart(item)
const stop = start.add(parseInt(item.duration), 'm')
programs.push({
title: item.name,
icon: item.icon,
category: item.category,
start,
stop
})
})
return programs
},
async channels() {
const data = await axios
.get('https://www.watchyour.tv/guide.json')
.then(r => r.data)
.catch(console.log)
return data.map(item => ({
lang: 'en',
site_id: item.id,
name: item.name
}))
}
}
function parseStart(item) {
return dayjs.unix(parseInt(item.tms))
}
function parseItems(content, date, channel) {
if (!content) return []
const data = JSON.parse(content)
if (!Array.isArray(data)) return []
const channelData = data.find(i => i.id == channel.site_id)
if (!channelData || !Array.isArray(channelData.shows)) return []
return channelData.shows.filter(i => i.start_day === date.format('YYYY-MM-DD'))
}
const dayjs = require('dayjs')
const axios = require('axios')
module.exports = {
site: 'watchyour.tv',
days: 2,
url: 'https://www.watchyour.tv/guide.json',
request: {
cache: {
ttl: 60 * 60 * 1000 // 1 hour
}
},
parser: function ({ content, date, channel }) {
let programs = []
const items = parseItems(content, date, channel)
items.forEach(item => {
const start = parseStart(item)
const stop = start.add(parseInt(item.duration), 'm')
programs.push({
title: item.name,
icon: item.icon,
category: item.category,
start,
stop
})
})
return programs
},
async channels() {
const data = await axios
.get('https://www.watchyour.tv/guide.json')
.then(r => r.data)
.catch(console.log)
return data.map(item => ({
lang: 'en',
site_id: item.id,
name: item.name
}))
}
}
function parseStart(item) {
return dayjs.unix(parseInt(item.tms))
}
function parseItems(content, date, channel) {
if (!content) return []
const data = JSON.parse(content)
if (!Array.isArray(data)) return []
const channelData = data.find(i => i.id == channel.site_id)
if (!channelData || !Array.isArray(channelData.shows)) return []
return channelData.shows.filter(i => i.start_day === date.format('YYYY-MM-DD'))
}
+45 -45
View File
@@ -1,45 +1,45 @@
const { parser, url } = require('./watchyour.tv.config.js')
const dayjs = require('dayjs')
const utc = require('dayjs/plugin/utc')
const customParseFormat = require('dayjs/plugin/customParseFormat')
dayjs.extend(customParseFormat)
dayjs.extend(utc)
const date = dayjs.utc('2022-10-03', 'YYYY-MM-DD').startOf('d')
const channel = {
site_id: '735',
xmltv_id: 'TVSClassicSports.us'
}
it('can generate valid url', () => {
expect(url).toBe('https://www.watchyour.tv/guide.json')
})
it('can parse response', () => {
const content =
'[{"name":"TVS Classic Sports","icon":"https://www.watchyour.tv/epg/channellogos/tvs-classic-sports.png","language":"English","id":"735","shows":[{"name":"1979 WVU vs Penn State","category":"Sports","start_day":"2022-10-03","start":"04:00:00","end_day":"2022-10-03","end":"06:00:45","duration":"121","url":"http://rpn1.bozztv.com/36bay2/gusa-tvs/index-1664769600-7245.m3u8?token=f7410a9414f61579dced17ac1bbdb971","icon":"https://example.com/icon.png","timezone":"+0000","tms":"1664769600"},{"name":"1958 NCAA University of Kentucky vs Seattle U","category":"Sports","start_day":"2022-10-04","start":"00:58:50","end_day":"2022-10-04","end":"01:44:11","duration":"46","url":"http://rpn1.bozztv.com/36bay2/gusa-tvs/index.m3u8?token=93e7b201f544c87296076b73f9d880ae","icon":"","timezone":"+0000","tms":"1664845130"}]}]'
const result = parser({ content, date, channel }).map(p => {
p.start = p.start.toJSON()
p.stop = p.stop.toJSON()
return p
})
expect(result).toMatchObject([
{
start: '2022-10-03T04:00:00.000Z',
stop: '2022-10-03T06:01:00.000Z',
title: '1979 WVU vs Penn State',
icon: 'https://example.com/icon.png',
category: 'Sports'
}
])
})
it('can handle empty guide', () => {
const result = parser({
content: '',
date,
channel
})
expect(result).toMatchObject([])
})
const { parser, url } = require('./watchyour.tv.config.js')
const dayjs = require('dayjs')
const utc = require('dayjs/plugin/utc')
const customParseFormat = require('dayjs/plugin/customParseFormat')
dayjs.extend(customParseFormat)
dayjs.extend(utc)
const date = dayjs.utc('2022-10-03', 'YYYY-MM-DD').startOf('d')
const channel = {
site_id: '735',
xmltv_id: 'TVSClassicSports.us'
}
it('can generate valid url', () => {
expect(url).toBe('https://www.watchyour.tv/guide.json')
})
it('can parse response', () => {
const content =
'[{"name":"TVS Classic Sports","icon":"https://www.watchyour.tv/epg/channellogos/tvs-classic-sports.png","language":"English","id":"735","shows":[{"name":"1979 WVU vs Penn State","category":"Sports","start_day":"2022-10-03","start":"04:00:00","end_day":"2022-10-03","end":"06:00:45","duration":"121","url":"http://rpn1.bozztv.com/36bay2/gusa-tvs/index-1664769600-7245.m3u8?token=f7410a9414f61579dced17ac1bbdb971","icon":"https://example.com/icon.png","timezone":"+0000","tms":"1664769600"},{"name":"1958 NCAA University of Kentucky vs Seattle U","category":"Sports","start_day":"2022-10-04","start":"00:58:50","end_day":"2022-10-04","end":"01:44:11","duration":"46","url":"http://rpn1.bozztv.com/36bay2/gusa-tvs/index.m3u8?token=93e7b201f544c87296076b73f9d880ae","icon":"","timezone":"+0000","tms":"1664845130"}]}]'
const result = parser({ content, date, channel }).map(p => {
p.start = p.start.toJSON()
p.stop = p.stop.toJSON()
return p
})
expect(result).toMatchObject([
{
start: '2022-10-03T04:00:00.000Z',
stop: '2022-10-03T06:01:00.000Z',
title: '1979 WVU vs Penn State',
icon: 'https://example.com/icon.png',
category: 'Sports'
}
])
})
it('can handle empty guide', () => {
const result = parser({
content: '',
date,
channel
})
expect(result).toMatchObject([])
})