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 2024-12-17 10:24:58 +07:00
parent f00d53cb7b
commit 916b5f5234
12 changed files with 273 additions and 429 deletions

View file

@ -52,12 +52,11 @@ it('can generate valid arabic url', () => {
})
it('can parse english response', async () => {
let result = await parser({
const result = (await parser({
channel,
date,
content: fs.readFileSync(path.join(__dirname, '/__data__/content_en.html'))
})
result = result.map(a => {
})).map(a => {
a.start = a.start.toJSON()
a.stop = a.stop.toJSON()
return a
@ -76,12 +75,11 @@ it('can parse english response', async () => {
})
it('can parse arabic response', async () => {
let result = await parser({
const result = (await parser({
channel: channelAr,
date,
content: fs.readFileSync(path.join(__dirname, '/__data__/content_ar.html'))
})
result = result.map(a => {
})).map(a => {
a.start = a.start.toJSON()
a.stop = a.stop.toJSON()
return a