2026/04 Unrelated#3098
Draft
BellezaEmporium wants to merge 5 commits into
Draft
Conversation
There was a problem hiding this comment.
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/sfetchto this new helper. - Updates a few scrapers and fixtures (e.g.,
orangetv.orange.esendpoint change;france.tvduration parsing refactor;xml-js→xml-js-v2). - Updates channel XML lists for
sky.com,mujtvprogram.cz, anddsmart.com.tr, and adjusts dependencies inpackage.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}`) | ||
| } |
| "@freearhey/search-js": "^0.2.1", | ||
| "@freearhey/storage-js": "^0.2.0", | ||
| "@inquirer/prompts": "^8.4.2", | ||
| "@iptv-org/sdk": "^1.3.0", |
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", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.