diff --git a/sites/osn.com/osn.com.config.js b/sites/osn.com/osn.com.config.js index 506f6517..689d4ce6 100644 --- a/sites/osn.com/osn.com.config.js +++ b/sites/osn.com/osn.com.config.js @@ -7,6 +7,7 @@ dayjs.extend(timezone) module.exports = { site: 'osn.com', + url: `https://www.osn.com/CMSPages/TVScheduleWebService.asmx/GetTVChannelsProgramTimeTable`, request: { method: 'POST', headers: { @@ -25,14 +26,6 @@ module.exports = { }, jar: null }, - url: function () { - return `https://www.osn.com/CMSPages/TVScheduleWebService.asmx/GetTVChannelsProgramTimeTable` - }, - logo: function ({ channel }) { - const [_, channelCode] = channel.site_id.split('#') - - return `https://content.osn.com/logo/channel/cropped/${channelCode}.png` - }, parser: function ({ content, channel }) { let programs = [] const items = parseItems(content) diff --git a/sites/osn.com/osn.com.test.js b/sites/osn.com/osn.com.test.js index fa2cb9d6..25d8feb0 100644 --- a/sites/osn.com/osn.com.test.js +++ b/sites/osn.com/osn.com.test.js @@ -1,7 +1,7 @@ // NODE_OPTIONS=--insecure-http-parser npx epg-grabber --config=sites/osn.com/osn.com.config.js --channels=sites/osn.com/osn.com_ae-ar.channels.xml --output=guide.xml --days=2 // NODE_OPTIONS=--insecure-http-parser npx epg-grabber --config=sites/osn.com/osn.com.config.js --channels=sites/osn.com/osn.com_ae-en.channels.xml --output=guide.xml --days=2 -const { parser, url, logo, request } = require('./osn.com.config.js') +const { parser, url, request } = require('./osn.com.config.js') const dayjs = require('dayjs') const utc = require('dayjs/plugin/utc') const customParseFormat = require('dayjs/plugin/customParseFormat') @@ -35,17 +35,11 @@ it('can generate valid request headers', () => { }) it('can generate valid url', () => { - const result = url() - expect(result).toBe( + expect(url).toBe( 'https://www.osn.com/CMSPages/TVScheduleWebService.asmx/GetTVChannelsProgramTimeTable' ) }) -it('can get logo url', () => { - const result = logo({ channel: channelAR }) - expect(result).toBe('https://content.osn.com/logo/channel/cropped/AAN.png') -}) - it('can parse response (ar)', () => { const result = parser({ date, channel: channelAR, content }) expect(result).toMatchObject([