Use simultaneous fetch helper.

- Introduce fetch helper for site to fetch guide simultaneously.
- Clean-up unused requires.
- Updated tv.yandex.ru cookies.

Signed-off-by: Toha <tohenk@yahoo.com>
This commit is contained in:
Toha committed 2024-12-20 19:54:59 +07:00
1 parent f00d53cb7b
commit 916b5f5234
12 files changed
+273 -429

No files matched your search

+1 -4
View File
@@ -1,16 +1,13 @@
const axios = require('axios')
const dayjs = require('dayjs')
const utc = require('dayjs/plugin/utc')
const timezone = require('dayjs/plugin/timezone')
const customParseFormat = require('dayjs/plugin/customParseFormat')
const cheerio = require('cheerio')
dayjs.extend(utc)
dayjs.extend(timezone)
dayjs.extend(customParseFormat)
const languages = { en: 'ENG', id: 'IND' }
const tz = 'Asia/Jakarta'
module.exports = {
site: 'visionplus.id',
@@ -22,7 +19,7 @@ module.exports = {
'YYYY-MM-DD'
)}T00%3A00%3A00Z&view=cd-events-grid-view`
},
parser({ content, channel, date }) {
parser({ content, channel }) {
const programs = []
const json = JSON.parse(content)
if (Array.isArray(json.evs)) {