diff --git a/sites/tvguide.com/readme.md b/sites/tvguide.com/readme.md new file mode 100644 index 00000000..8e743e38 --- /dev/null +++ b/sites/tvguide.com/readme.md @@ -0,0 +1,21 @@ +# tvguide.com + +https://www.tvguide.com/listings/ + +### Download the guide + +```sh +npm run grab -- --site=tvguide.com +``` + +### Update channel list + +```sh +npm run channels:parse -- --config=./sites/tvguide.com/tvguide.com.config.js --output=./sites/tvguide.com/tvguide.com.channels.xml +``` + +### Test + +```sh +npm test -- tvguide.com +``` diff --git a/sites/tvguide.com/tvguide.com.channels.xml b/sites/tvguide.com/tvguide.com.channels.xml index 5f5507ff..2c0cd03b 100644 --- a/sites/tvguide.com/tvguide.com.channels.xml +++ b/sites/tvguide.com/tvguide.com.channels.xml @@ -1,88 +1,89 @@ - - - A&E East - AMC East - Animal Planet East - BBC America East - BET East - Bravo East - Cartoon Network East - CBS East - Cinemax East - CMT East - CNBC US - CNN USA - Comedy Central East - Discovery Channel East - Discovery Life Channel - Disney Channel East - Disney XD East - DIY Network USA - E! East - ESPN - ESPN 2 US - ESPN Classic USA - ESPNU - FanDuel TV - Flix East - Food Network East - Fox East - Fox News Channel - Fox Sports 1 - Freeform East - Fuse East - FX East - FX Movie Channel - FXX East - FYI East - Game Show Network East - Golf Channel US - Hallmark Channel East - HBO 2 East - HBO East - HBO Signature East - HGTV East - History East - IFC East - Investigation Discovery East - ION TV East - Lifetime East - Lifetime Movies East - Lifetime Real Women - MoreMax East - MSNBC - MTV East - National Geographic East - NBC East - NBCSN - NewsNation East - Nickelodeon East - Oprah Winfrey Network East - Oxygen East - Paramount Network East - PBS East - Pop East - QVC US - Reelz - Science - Showtime 2 East - Showtime East - Smithsonian Channel East - Starz East - Starz Encore East - Sundance TV East - Syfy East - TBS East - TCM US - Telemundo Este - The CW East - The Movie Channel East - TLC East - TNT East - truTV East - TV Land East - Univisión Este - USA Network East - VH1 East - We TV East - + + + + A&E Network (East) + AMC (East) + Animal Planet (East) + BBC America (East) + Black Entertainment Television (East) + Bravo (East) + Cartoon Network (East) + CBS + Cinemax (East) + CMT (East) + Consumer News & Business Channel + Cable News Network + Comedy Central (East) + The Discovery Channel (East) + Discovery Life Channel + The Disney Channel (East) + Disney XD (East) + E! Entertainment Television (East) + ESPN2 + ESPN + ESPNU + FanDuel TV + Flix (East) + Food Network (East) + FOX + Fox News Channel (East) + Fox Sports 1 + Freeform (East) + Fuse (East) + FX (East) + FX Movie Channel + FXX (East) + FYI + GSN (East) + The Golf Channel + Hallmark Channel (East) + HBO 2 (East) + HBO (East) + HBO Signature (East) + Home & Garden Television (East) + History (East) + IFC (East) + Investigation Discovery + ION East Cable/Dish + Lifetime Television (East) + Lifetime Movies (East) + Lifetime Real Women + Magnolia Network [East] + More Max (East) + msnbc + MTV (East) + National Geographic Channel + NBC + NewsNation SDTV + Nickelodeon (East) + The Oprah Winfrey Network (East) + Oxygen (East) + Paramount Network (East) + PBS + Pop (East) + Quality Value Convenience Network + ReelzChannel + Science + Showtime 2 (East) + Showtime (East) + Smithsonian Channel (East) + Starz (East) + STARZ ENCORE (East) + SundanceTV (East) + Syfy (East) + TBS Superstation (East) + Turner Classic Movies + Telemundo Network (East) + The CW + The Movie Channel (East) + The Learning Channel (East) + Turner Network Television (East) + truTV (East) + TV Land (East) + Univisión Network (East) + USA Network (East) + VH1 (East) + Women's Entertainment Network (East) + diff --git a/sites/tvguide.com/tvguide.com.config.js b/sites/tvguide.com/tvguide.com.config.js index e08b3095..628830fc 100644 --- a/sites/tvguide.com/tvguide.com.config.js +++ b/sites/tvguide.com/tvguide.com.config.js @@ -36,6 +36,29 @@ module.exports = { } return programs + }, + async channels() { + const providers = [9100001138] + + let channels = [] + for (let providerId of providers) { + const data = await axios + .get( + `https://fandom-prod.apigee.net/v1/xapi/tvschedules/tvguide/serviceprovider/${providerId}/sources/web` + ) + .then(r => r.data) + .catch(console.log) + + data.data.items.forEach(item => { + channels.push({ + lang: 'en', + site_id: `${providerId}#${item.sourceId}`, + name: item.fullName + }) + }) + } + + return channels } } diff --git a/sites/tvguide.com/tvguide.com.test.js b/sites/tvguide.com/tvguide.com.test.js index 07538591..c8ea3e5c 100644 --- a/sites/tvguide.com/tvguide.com.test.js +++ b/sites/tvguide.com/tvguide.com.test.js @@ -1,5 +1,3 @@ -// npm run grab -- --site=tvguide.com - const { parser, url } = require('./tvguide.com.config.js') const fs = require('fs') const path = require('path')