From 81f0982bdc5f82d92d93d9e061580bf26c5ea226 Mon Sep 17 00:00:00 2001 From: Aleksandr Statciuk Date: Thu, 20 Jan 2022 19:56:25 +0300 Subject: [PATCH 1/2] Update directv.com.config.js --- sites/directv.com/directv.com.config.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sites/directv.com/directv.com.config.js b/sites/directv.com/directv.com.config.js index f5858e5e..254683f1 100644 --- a/sites/directv.com/directv.com.config.js +++ b/sites/directv.com/directv.com.config.js @@ -37,9 +37,13 @@ module.exports = { return programs }, - async channels({ country }) { + async channels({ zip }) { const html = await axios - .get(`https://www.directv.com/guide`) + .get(`https://www.directv.com/guide`, { + headers: { + cookie: `dtve-prospect-zip=${zip}` + } + }) .then(r => r.data) .catch(console.log) From 9b71808c45378b08f64679f31f220d5377fae4fe Mon Sep 17 00:00:00 2001 From: Aleksandr Statciuk Date: Thu, 20 Jan 2022 19:56:28 +0300 Subject: [PATCH 2/2] Update directv.com.test.js --- sites/directv.com/directv.com.test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sites/directv.com/directv.com.test.js b/sites/directv.com/directv.com.test.js index 7c285a9c..2da9df03 100644 --- a/sites/directv.com/directv.com.test.js +++ b/sites/directv.com/directv.com.test.js @@ -1,4 +1,4 @@ -// node ./scripts/commands/parse-channels.js --config=./sites/directv.com/directv.com.config.js --output=./sites/directv.com/directv.com_us.channels.xml +// node ./scripts/commands/parse-channels.js --config=./sites/directv.com/directv.com.config.js --output=./sites/directv.com/directv.com_us-ny.channels.xml --set=zip:10001 // npx epg-grabber --config=sites/directv.com/directv.com.config.js --channels=sites/directv.com/directv.com_us.channels.xml --output=guide.xml --days=2 const { parser, url, logo } = require('./directv.com.config.js')