diff --git a/sites/zee5.com/__data__/content.json b/sites/zee5.com/__data__/content.json new file mode 100644 index 000000000..539a7d542 --- /dev/null +++ b/sites/zee5.com/__data__/content.json @@ -0,0 +1 @@ +{"total":1,"page":1,"page_size":500,"items":[{"id":"0-9-zeecinemahd","title":"Zee Cinema HD","original_title":"Zee Cinema HD","asset_type":9,"image":{"cover":"1920x770a2c0642b147d48c187c718c92d1557bb","app_cover":"1920x1080appcoverbb6a37e29fa444b0b156ad2d5a889860","list":"1920x1080listb0707389e11d47edb651c329f76a0755","channel_square":"386x3863e01c38ce532461fa11091a2d509c50a","channel_list":"360x2032123e39878fe48e1af5d3c64af1a8176","channel_web":"170x120397a2a6991f84cafbafda4b8c28d30f6","square":"374x374d317f8e1ff0343f79ef93ce57532a194","tv_cover":"","portrait":"720x1080withlogoc66bd8a1ad89493796ba7f949773eee1","listclean":"1920x1080list4eba330859bf4682916e4603d09931aa","portraitclean":"1920x5484184f0c087f844d8876c4fc552205c73","homefeed-launcher-sticker":"1920x457d091c4f11ec34ab38b4a205aed123db4","vert_banner":"845x1080affdf107e2f9404b890b531106b92256","4k_banner":"","hd_tile":"","2x3_hd_poster":"2000x300081745a1c983647dda8b790146ec72cb5","title_logo":"","tv_banner":"3840x2160tvbanner9d6c6352deea4e14a26332e760076fbb","motion_app_cover":"","motion_cover":"","motion_vert_banner":"","motion_homefeed-launcher-sticker":""},"list_image":"1920x1080listb0707389e11d47edb651c329f76a0755.jpg","cover_image":"1920x770a2c0642b147d48c187c718c92d1557bb.jpg","languages":["hi"],"audio_languages":["hi"],"genres":[{"id":"Movie","value":"Movie"}],"items":[{"id":"0-10-CHN-007790000-20260426013300","title":"Tamilarasan","actors":[],"duration":120,"tags":["Action","Crime","Drama","Thriller","Medical Drama","FamilyVijay Antony","Suresh Gopi","Sangeetha","Remya Nambeesan","S. Kowsalya Rani"],"original_title":"Tamilarasan","asset_type":10,"image":{"cover":"","list":"ZeeCinemaHDTamilarasan1567745cf08a3ba1a9946d890a2f523ab71f38e","in__cover":"","in__list":""},"description":"An officer seizes control of a hospital, defying orders, which sparks a fierce conflict. His rebellion sets off a chain of events that could lead to a dramatic clash with authorities.","start_time":"2026-04-25T20:03:00Z","end_time":"2026-04-25T22:03:00Z","list_image":"ZeeCinemaHDTamilarasan1567745cf08a3ba1a9946d890a2f523ab71f38e.jpg","licensing":{"licensing_periods":[]},"channel":{"id":"0-9-zeecinemahd"},"languages":["hi"],"audio_languages":["hi"],"genres":[{"id":"Film","value":"Film"}]},{"id":"0-10-CHN-007790000-20260426033300","title":"Vedha","actors":[],"duration":142,"tags":["Action","Thriller","Murder","Crime","Revenge","Daughter","EscapeShiva Rajkumar","Ganavi Laxman","Shwetha Chengappa","Umashree","Aditi Sagar","Geeta Shiva Rajkumar"],"original_title":"Vedha","asset_type":10,"image":{"cover":"","list":"ZeeCinemaHDVedha1500769c92eb40ae1c8457ebb0304fac0b48e21","in__cover":"","in__list":""},"description":"Father daughter killers evade cop pursuit.","start_time":"2026-04-25T22:03:00Z","end_time":"2026-04-26T00:25:00Z","list_image":"ZeeCinemaHDVedha1500769c92eb40ae1c8457ebb0304fac0b48e21.jpg","licensing":{"licensing_periods":[]},"channel":{"id":"0-9-zeecinemahd"},"languages":["hi"],"audio_languages":["hi"],"genres":[{"id":"Film","value":"Film"}]},{"id":"0-10-CHN-007790000-20260426055500","title":"Sye Raa Narasimha Reddy","actors":[],"duration":185,"tags":["Freedom","Revolution","Colonial Rule","Resistance","Rayalaseema","Courage","Sacrifice","Empire","Atrocities","UprisingChiranjeevi","Nayanthara","Tamannaah Bhatia","Sudeep","Ram Charan"],"original_title":"Sye Raa Narasimha Reddy","asset_type":10,"image":{"cover":"","list":"ZeeCinemaHDSyeRaaNarasimhaReddy1108856342f53e21b4a4ae79b5803247f5d29ac","in__cover":"","in__list":""},"description":"10 years before the Sepoy Mutiny, Emperor Uyyalawada Narasimha Reddy fights the British East India Company in order to put an end to their atrocities.","start_time":"2026-04-26T00:25:00Z","end_time":"2026-04-26T03:30:00Z","list_image":"ZeeCinemaHDSyeRaaNarasimhaReddy1108856342f53e21b4a4ae79b5803247f5d29ac.jpg","licensing":{"licensing_periods":[]},"channel":{"id":"0-9-zeecinemahd"},"languages":["hi"],"audio_languages":["hi"],"genres":[{"id":"Film","value":"Film"}]},{"id":"0-10-CHN-007790000-20260426090000","title":"Aranmanai 4","actors":[],"duration":180,"tags":["mystery","grief","revenge","secrets","thriller","investigation","family","betrayal","darkness","redemptionSundar C","Tamannaah Bhatia","Raashi Khanna","Khushbu Sundar","A. C. Shanmugam","A. C. S. Arun Kumar"],"original_title":"Aranmanai 4","asset_type":10,"image":{"cover":"","list":"ZeeCinemaHDAranmanai4178971914d5593b58c84b14ad75cbaf9c28daf9","in__cover":"","in__list":""},"description":"After his sister's suspicious death, a man decides to discover the hidden truth, setting off a chasm for chaos and terror.","start_time":"2026-04-26T03:30:00Z","end_time":"2026-04-26T06:30:00Z","list_image":"ZeeCinemaHDAranmanai4178971914d5593b58c84b14ad75cbaf9c28daf9.jpg","licensing":{"licensing_periods":[]},"channel":{"id":"0-9-zeecinemahd"},"languages":["hi"],"audio_languages":["hi"],"genres":[{"id":"Film","value":"Film"}]},{"id":"0-10-CHN-007790000-20260426120000","title":"Bhabhi Ji Ghar Par Hain Fun On The Run","duration":147,"tags":["Entertainment"],"original_title":"Bhabhi Ji Ghar Par Hain Fun On The Run","asset_type":10,"image":{"cover":"","list":"ZeeCinemaHDBhabhiJiGharParHainFunOnTheRun2069730daaced6acda84bfba0e758765a8b3258","in__cover":"","in__list":""},"description":"Anita and Vibhuti embark on a hilarious adventure filled with chaos, witty exchanges, and quirky situations, bringing laughter through their unique chemistry and comic timing.","start_time":"2026-04-26T06:30:00Z","end_time":"2026-04-26T08:57:00Z","list_image":"ZeeCinemaHDBhabhiJiGharParHainFunOnTheRun2069730daaced6acda84bfba0e758765a8b3258.jpg","actors":[],"licensing":{"licensing_periods":[]},"channel":{"id":"0-9-zeecinemahd"},"languages":["hi"],"audio_languages":["hi"],"genres":[{"id":"Film","value":"Film"}]},{"id":"0-10-CHN-007790000-20260426142700","title":"Saaho","actors":[],"duration":173,"tags":["Thief","Stolen Money","Crime Lord","Gang War","Investigation","Action","Thriller","Kidnapped Man","Car Accident","Black Panther","Video SurveillancePrabhas","Shraddha Kapoor","Chunky Pandey","Jackie Shroff","V. Vamsi Krishna Reddy","Pramod Uppalapati"],"original_title":"Saaho","asset_type":10,"image":{"cover":"","list":"ZeeCinemaHDSaaho8628577baa5b12251146308005ba45cb8c7c57","in__cover":"","in__list":""},"description":"An undercover agent and his partner chase a thief who stole ?2,000 crore, only to uncover ties to a crime lord's death and a dangerous gang war threatening the city.","start_time":"2026-04-26T08:57:00Z","end_time":"2026-04-26T11:50:00Z","list_image":"ZeeCinemaHDSaaho8628577baa5b12251146308005ba45cb8c7c57.jpg","licensing":{"licensing_periods":[]},"channel":{"id":"0-9-zeecinemahd"},"languages":["hi"],"audio_languages":["hi"],"genres":[{"id":"Film","value":"Film"}]},{"id":"0-10-CHN-007790000-20260426172000","title":"Kisi Ka Bhai Kisi Ki Jaan","actors":[],"duration":155,"tags":["Family","Brotherhood","Sacrifice","Love","Tradition","Responsibility","Romance","Comedy","Unity","ChangeSalman Khan","Pooja Hegde","Venkatesh","Salman Khan"],"original_title":"Kisi Ka Bhai Kisi Ki Jaan","asset_type":10,"image":{"cover":"","list":"ZeeCinemaHDKisiKaBhaiKisiKiJaan1509528267f74f3539842a9bca9824e8c8768b3","in__cover":"","in__list":""},"description":"Bhaijaan, the eldest brother of three siblings, refuses to get married to maintain harmony in his family. However, complications arise after his brothers conspire for him to fall in love.","start_time":"2026-04-26T11:50:00Z","end_time":"2026-04-26T14:25:00Z","list_image":"ZeeCinemaHDKisiKaBhaiKisiKiJaan1509528267f74f3539842a9bca9824e8c8768b3.jpg","licensing":{"licensing_periods":[]},"channel":{"id":"0-9-zeecinemahd"},"languages":["hi"],"audio_languages":["hi"],"genres":[{"id":"Film","value":"Film"}]},{"id":"0-10-CHN-007790000-20260426195500","title":"Raid 2","actors":[],"duration":150,"tags":["corruption","truth","power","justice","deceptionAjay Devgn","Riteish Deshmukh","Vaani Kapoor","Saurabh Shukla.","Abhishek Pathak","Kumar Mangat Pathak","Bhushan Kumar","Pragya Singh","Krishan Kumar"],"original_title":"Raid 2","asset_type":10,"image":{"cover":"","list":"ZeeCinemaHDRaid219662512c969bdde5d94e64ba433e53d981da18","in__cover":"","in__list":""},"description":"Amay Patnaik, an Income Tax officer, uncovers corruption tied to Dada Bhai. He battles deceit and power, seeking justice in a dangerous political web.","start_time":"2026-04-26T14:25:00Z","end_time":"2026-04-26T16:55:00Z","list_image":"ZeeCinemaHDRaid219662512c969bdde5d94e64ba433e53d981da18.jpg","licensing":{"licensing_periods":[]},"channel":{"id":"0-9-zeecinemahd"},"languages":["hi"],"audio_languages":["hi"],"genres":[{"id":"Film","value":"Film"}]},{"id":"0-10-CHN-007790000-20260426222500","title":"Sooryavanshi","actors":[],"duration":143,"tags":["Terrorism","Mumbai","ATS","RDX","Conspiracy","Hunt","Action","Thriller","Akshay Kumar","Katrina Kaif","Jackie Shroff","Jaaved JaaferiAkshay Kumar","Katrina Kaif","Jackie Shroff","Ajay Devgan","Ranveer Singh","Hiroo Yash Johar","Karan Johar","Apoorva Mehta","Rohit Shetty"],"original_title":"Sooryavanshi","asset_type":10,"image":{"cover":"","list":"ZeeCinemaHDSooryavanshi13023739c3a165ee1bd4061abdecdce321d93ca","in__cover":"","in__list":""},"description":"In 'Sooryavanshi,' our hero chases down terrorists who have gone missing with a dangerous stash of RDX, navigating intense action and suspense to keep the world safe.","start_time":"2026-04-26T16:55:00Z","end_time":"2026-04-26T19:18:00Z","list_image":"ZeeCinemaHDSooryavanshi13023739c3a165ee1bd4061abdecdce321d93ca.jpg","licensing":{"licensing_periods":[]},"channel":{"id":"0-9-zeecinemahd"},"languages":["hi"],"audio_languages":["hi"],"genres":[{"id":"Film","value":"Film"}]}]}]} diff --git a/sites/zee5.com/readme.md b/sites/zee5.com/readme.md new file mode 100644 index 000000000..64f1b59c2 --- /dev/null +++ b/sites/zee5.com/readme.md @@ -0,0 +1,21 @@ +# zee5.com + +https://zee5.com/tvguide + +### Download the guide + +```sh +npm run grab --- --site=zee5.com +``` + +### Update channel list + +```sh +npm run channels:parse --- --config=./sites/zee5.com/zee5.com.config.js --output=./sites/zee5.com/zee5.com.channels.xml +``` + +### Test + +```sh +npm test --- zee5.com +``` diff --git a/sites/zee5.com/zee5.com.channels.xml b/sites/zee5.com/zee5.com.channels.xml new file mode 100644 index 000000000..d1d7573b7 --- /dev/null +++ b/sites/zee5.com/zee5.com.channels.xml @@ -0,0 +1,118 @@ + + + &flix HD + &Pictures + &Pictures HD + &TV HD + &TV HD + &TV HD USA + &xplorHD + Aaj Tak + Anmol Cinema + Anmol Cinema 2 + Anmol TV + Asianet News + Big Magic + Dagdusheth Halwai Ganpati Mandir + Good News Today + Great! Movies + Great! Mystery + Great! Romance + India Today + Iskon Vrindavan + Kashi Vishwanath + Ma Naina Devi + Mahavir Mandir Patna + NDTV 24x7 + NDTV India + NDTV Marathi + NDTV Profit + News 9 + Patna Sahib + Polimer News + POP + POP UP + Sai Baba, Shirdi + Salaam TV + Shree Naga Sai Temple - Coimbatore + Somnath Temple + Suvarna News + Tiny Pop + TV9 Bangla + TV9 Bharatvarsh + TV9 Gujarati + TV9 Kannada + TV9 Marathi + TV9 Telugu + WION + Zee 24 Ghanta + Zee 24 Kalak + Zee 24 Taas + Zee Action + Zee Aflam + Zee Aflam HD + Zee Alwan + Zee Alwan HD + Zee Bangla + Zee Bangla HD + Zee Bangla International + Zee Bangla Sonar + Zee Bharat + Zee Bihar Jharkhand + Zee Bioskop + Zee Biskope + Zee Bollywood + Zee Business + Zee Café HD + Zee Cinema + Zee Cinema HD + Zee Cinema ME + Zee Cinema UK + Zee Cinema USA + Zee Cinemalu + Zee Cinemalu HD + Zee Classic + Zee Delhi NCR Haryana + Zee Kannada + Zee Kannada HD + Zee Keralam HD + Zee Madhya Pradesh Chhattisgarh + Zee Marathi + Zee Marathi HD + Zee Marathi USA + Zee News + Zee News Kannada + ZEE News Malayalam + ZEE News Tamil + Zee News Telugu + Zee News Uttar Pradesh Uttrakhand + Zee One + Zee One French + Zee One German + Zee Power HD + Zee Punjab Haryana Himachal Pradesh + Zee Punjabi + Zee Rajasthan News + Zee Sarthak + Zee Talkies + Zee Talkies HD + Zee Tamil + Zee Tamil HD + Zee Tamil HD APAC + Zee Telugu + Zee Telugu HD + Zee Thirai HD + Zee TV + Zee TV APAC HD + Zee TV DE + Zee TV HD + Zee TV HD Canada + Zee TV HD UK + Zee TV HD USA + Zee TV ME + Zee TV USA + Zee Yuva + Zee Zest HD + Zing + Zing USA + diff --git a/sites/zee5.com/zee5.com.config.js b/sites/zee5.com/zee5.com.config.js new file mode 100644 index 000000000..14029f8b5 --- /dev/null +++ b/sites/zee5.com/zee5.com.config.js @@ -0,0 +1,80 @@ +const axios = require('axios') +const dayjs = require('dayjs') +const utc = require('dayjs/plugin/utc') +const timezone = require('dayjs/plugin/timezone') + +dayjs.extend(utc) +dayjs.extend(timezone) + +module.exports = { + site: 'zee5.com', + days: 2, // max 7 days to the past/future + request: { + cache: { + ttl: 60 * 60 * 1000 + }, + headers: { + 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36 Edg/142.0.0.0', + 'Referer': 'https://www.zee5.com/' + } + }, + url: function ({ channel, date }) { + // start=0 (Today), start=1 (Tomorrow) + const today = dayjs.tz(new Date(), 'Asia/Kolkata').startOf('day') + const requestedDate = dayjs.tz(date, 'Asia/Kolkata').startOf('day') + + const diff = requestedDate.diff(today, 'day') + + return `https://gwapi.zee5.com/v1/epg?channels=${channel.site_id}&start=${diff}&end=${diff}&page_size=500` + }, + parser: function ({ content }) { + let programs = [] + + if (!content) return programs + + try { + const json = JSON.parse(content) + + const channelList = json.items ? json.items : (Array.isArray(json) ? json : [json]) + + const channelPrograms = channelList[0] && channelList[0].items ? channelList[0].items : [] + + channelPrograms.forEach(program => { + programs.push({ + title: program.title, + description: program.description || program.list_image_description || null, + start: dayjs(program.start_time), + stop: dayjs(program.end_time), + image: (program.image && program.image.list ? `https://akamaividz2.zee5.com/image/upload/resources/${program.id}/list/${program.image.list}.jpg` : program.list_image) || null, + category: program.genres && program.genres.length ? program.genres.map(g => g.value) : null, + lang: program.languages && program.languages.length ? program.languages : null + }) + }) + + } catch (e) { + console.error('Error parsing programs:', e) + return programs + } + + return programs + }, + + + async channels() { + try { + const url = 'https://catalogapi.zee5.com/v1/channel?page=1&page_size=500' + const response = await axios.get(url) + const items = response.data.items || [] + + return items.map(item => ({ + lang: 'en', + site_id: item.id, + name: item.title, + logo: item.list_image ? `https://akamaividz2.zee5.com/image/upload/resources/${item.id}/channel_list/${item.list_image}` : null + })) + } catch (error) { + console.error('Error fetching channels:', error.message) + return [] + } + } +} diff --git a/sites/zee5.com/zee5.com.test.js b/sites/zee5.com/zee5.com.test.js new file mode 100644 index 000000000..b470ba782 --- /dev/null +++ b/sites/zee5.com/zee5.com.test.js @@ -0,0 +1,67 @@ +const { parser, url, channels } = require('./zee5.com.config.js') +const axios = require('axios') +const fs = require('fs') +const path = require('path') +const dayjs = require('dayjs') +const utc = require('dayjs/plugin/utc') +const timezone = require('dayjs/plugin/timezone') + +dayjs.extend(utc) +dayjs.extend(timezone) + +jest.mock('axios') + +const date = dayjs.tz('2025-12-02', 'Asia/Kolkata').startOf('d') +const channel = { site_id: '0-9-zeecinema', xmltv_id: 'ZeeCinema.in' } + +it('can generate valid url', () => { + const result = url({ channel, date }) + expect(result).toMatch('https://gwapi.zee5.com/v1/epg') + expect(result).toMatch('channels=0-9-zeecinema') +}) + +it('can parse response', () => { + const content = fs.readFileSync(path.resolve(__dirname, '__data__/content.json'), 'utf8') + const result = parser({ content }) + + expect(result.length).toBe(9) + expect(result[0]).toMatchObject( + { + title: 'Tamilarasan', + description: 'An officer seizes control of a hospital, defying orders, which sparks a fierce conflict. His rebellion sets off a chain of events that could lead to a dramatic clash with authorities.', + start: dayjs('2026-04-25T20:03:00Z'), + stop: dayjs('2026-04-25T22:03:00Z'), + image: 'https://akamaividz2.zee5.com/image/upload/resources/0-10-CHN-007790000-20260426013300/list/ZeeCinemaHDTamilarasan1567745cf08a3ba1a9946d890a2f523ab71f38e.jpg', + category: ['Film'], + lang: ['hi'] + } + ) +}) + +it('can handle empty guide', () => { + const result = parser({ content: '[]' }) + expect(result).toMatchObject([]) +}) + +it('can parse channel list', async () => { + axios.get.mockResolvedValue({ + data: { + items: [ + { + id: '0-9-channel_1643519345', + title: 'Zing USA', + list_image: '1920x1080listclean721faf534a79451fa714b25d2102de48.png' + } + ] + } + }) + + const result = await channels() + expect(result.length).toBe(1) + expect(result[0]).toMatchObject({ + lang: 'en', + site_id: '0-9-channel_1643519345', + name: 'Zing USA', + logo: 'https://akamaividz2.zee5.com/image/upload/resources/0-9-channel_1643519345/channel_list/1920x1080listclean721faf534a79451fa714b25d2102de48.png' + }) +})