Skip to content

2026/04 Unrelated#3098

Draft
BellezaEmporium wants to merge 5 commits into
masterfrom
be-changes_h
Draft

2026/04 Unrelated#3098
BellezaEmporium wants to merge 5 commits into
masterfrom
be-changes_h

Conversation

@BellezaEmporium
Copy link
Copy Markdown
Contributor

@BellezaEmporium BellezaEmporium commented Apr 21, 2026

Placeholder PR to bigger changes I was thinking about.

This PR is a continuation of the other PR.

This one is up for discussions, isn't mandatory.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR appears to be a dependency and scraper-maintenance sweep, primarily replacing the external @ntlab/sfetch fetch helper with a new in-repo scripts/core/multifetch implementation, plus a handful of site-specific tweaks (endpoints, parsing libs) and channel list updates.

Changes:

  • Introduces scripts/core/multifetch.ts (a concurrent fetch helper with built-in mocking) and switches multiple site configs/tests from @ntlab/sfetch to this new helper.
  • Updates a few scrapers and fixtures (e.g., orangetv.orange.es endpoint change; france.tv duration parsing refactor; xml-jsxml-js-v2).
  • Updates channel XML lists for sky.com, mujtvprogram.cz, and dsmart.com.tr, and adjusts dependencies in package.json.

Reviewed changes

Copilot reviewed 27 out of 29 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
sites/ziggogo.tv/ziggogo.tv.config.js Switches fetch helper to in-repo multifetch.
sites/xem.kplus.vn/xem.kplus.vn.config.js Switches fetch helper to in-repo multifetch.
sites/virgintvgo.virginmedia.com/virgintvgo.virginmedia.com.config.js Switches fetch helper to in-repo multifetch and removes per-site debug wiring.
sites/tvpassport.com/tvpassport.com.config.js Switches fetch helper to in-repo multifetch.
sites/tvkaista.org/tvkaista.org.config.js Switches fetch helper to in-repo multifetch.
sites/tvguide.com/tvguide.com.config.js Replaces debug logging with console.debug and removes debug import.
sites/tivie.id/tivie.id.config.js Switches fetch helper to in-repo multifetch and removes debug wiring.
sites/startimestv.com/startimestv.com.config.js Switches fetch helper to in-repo multifetch and removes configured worker limit.
sites/sky.com/sky.com.config.js Reworks channels() to fetch regions remotely (axios) and uses multifetch for fan-out.
sites/sky.com/sky.com.channels.xml Adds/renames channel entries.
sites/rotana.net/rotana.net.config.js Switches fetch helper to in-repo multifetch and removes setCheckResult(false)/debug wiring.
sites/orangetv.orange.es/orangetv.orange.es.test.js Updates mocked URLs to match the new API path.
sites/orangetv.orange.es/orangetv.orange.es.config.js Updates OrangeTV program API base path and switches to multifetch.
sites/mujtvprogram.cz/mujtvprogram.cz.config.js Switches XML conversion library to xml-js-v2.
sites/mujtvprogram.cz/mujtvprogram.cz.channels.xml Adds/removes/renames channel entries.
sites/mtel.ba/mtel.ba.config.js Switches fetch helper to in-repo multifetch.
sites/mojmaxtv.hrvatskitelekom.hr/mojmaxtv.hrvatskitelekom.hr.config.js Switches fetch helper to in-repo multifetch.
sites/mncvision.id/mncvision.id.test.js Migrates test mocking from axios to multifetch mocks.
sites/mncvision.id/mncvision.id.config.js Switches fetch helper to in-repo multifetch and refactors cookie-loading to use it.
sites/hoy.tv/hoy.tv.config.js Switches XML conversion library to xml-js-v2.
sites/france.tv/france.tv.config.js Refactors time parsing and uses parse-duration for duration computation.
sites/dsmart.com.tr/dsmart.com.tr.test.js Migrates test mocking from axios to multifetch mocks.
sites/dsmart.com.tr/dsmart.com.tr.config.js Switches fetch helper to in-repo multifetch and removes debug wiring.
sites/dsmart.com.tr/dsmart.com.tr.channels.xml Large update/reorder of channel entries.
scripts/core/utils.ts Minor formatting-only change.
scripts/core/multifetch.ts Adds new concurrent fetch utility with mock support.
scripts/core/index.ts Re-exports multifetch from scripts/core.
package.json Removes @ntlab/sfetch, adds/updates dependencies, and adjusts Jest transform ignore patterns.

Comment on lines +124 to +126
// Check if response looks like it's already formatted (has 'data' and optionally 'status'/'headers')
const isFormatted = isObj && 'data' in mockResponse && 'status' in mockResponse
response = isFormatted ? mockResponse : { data: mockResponse, status: 200, headers: {} }
Comment on lines +142 to +143
const res = response as { data?: unknown; headers?: unknown } | undefined
if ((checkResult && res?.data) || !checkResult) {
const doFetch = require('@ntlab/sfetch')
const debug = require('debug')('site:mncvision.id')
const doFetch = require('../../scripts/core/multifetch')

Comment on lines +150 to +156
return new Promise(resolve => {
doFetch([{ url, method: 'get' }], (queue, data, headers) => {
resolve(parseCookies(headers))
}).catch(error => {
console.error(error.message)
resolve(null)
})
const doFetch = require('@ntlab/sfetch')
const debug = require('debug')('site:rotana.net')
const doFetch = require('../../scripts/core/multifetch')

Comment on lines +5 to 9
const doFetch = require('../../scripts/core/multifetch')

dayjs.extend(utc)
dayjs.extend(customParseFormat)

Comment on lines +69 to 75
console.debug(`fetch segment ${segment}: ${segmentUrl}`)
try {
const res = await axios.get(segmentUrl, { headers })
queues.push(...f(res.data))
} catch (err) {
debug(`Failed to fetch segment ${segment}: ${err.message}`)
console.debug(`Failed to fetch segment ${segment}: ${err.message}`)
}
Comment on lines 92 to 95
})
} catch (err) {
debug(`Failed to fetch program details ${queue.url}: ${err.message}`)
console.debug(`Failed to fetch program details ${queue.url}: ${err.message}`)
}
Comment thread package.json
"@freearhey/search-js": "^0.2.1",
"@freearhey/storage-js": "^0.2.0",
"@inquirer/prompts": "^8.4.2",
"@iptv-org/sdk": "^1.3.0",
Comment thread package.json
Comment on lines 38 to 45
"dependencies": {
"@eslint/eslintrc": "^3.3.5",
"@eslint/js": "^10.0.1",
"@freearhey/chronos": "^0.0.1",
"@freearhey/core": "^0.15.2",
"@freearhey/search-js": "^0.2.1",
"@freearhey/storage-js": "^0.2.0",
"@inquirer/prompts": "^8.4.2",
"@iptv-org/sdk": "^1.3.0",
"@ntlab/sfetch": "^1.2.0",
"@octokit/core": "^7.0.6",
"@octokit/plugin-paginate-rest": "^14.0.0",
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants