Mediaset Infinity Downloader is a typescript library to download Mediaset Infinity movies or tv-series. It uses yt-dlp to download the actual episodes.
To use mediaset-infinity-downloader, clone this repo and cd into the cloned folder. Then you have to install needed packages
# Install typescript runner
npm install --global ts-node
# Install project packages
npm install
yt-dlp
accessible to the script:
src/executables
src/user/config.ts
file making sure the ytDlpPath
is correct and the outputFolder
exists.src/user/episodes.ts
with an array of strings containing the episode or movie page. Example below
export default [
'https://mediasetinfinity.mediaset.it/video/terraamara/episodio-243_F311851102010702',
'https://mediasetinfinity.mediaset.it/video/terraamara/episodio-242_F311851102010602',
];
# cd into the project folder
cd mediaset-infinitry-downloader
# run the script
npm run start
By default yt-dlp uses the name that the .mp4 you are about to download as the output file name I've added in the config a way to programmatically change the output of the file name. Follow steps below to use it
customOutputName
in the src/user/config.tscustomOutputNameFunction
to output a string that will be automatically be used as the file name for the corresponding element in the array.episodes.ts
array surrounded by ticks.copy($$('a[href*="/video/"]').map((x)=>x.href))
episodes.ts
filetype:'fetch'
request appearing named mediaset-prod-all-programs-v2
Copy > Copy as fetch
fetch("https://feed.entertainment.tv.theplatform.eu/f/PR1GhC/mediaset-prod-all-programs-v2?byCustomValue={subBrandId}
{100018308}&sort=:publishInfo_lastPublished|desc,tvSeasonEpisodeNumber|desc&range=1-1000", {
"headers": {
"accept": "*/*",
"accept-language": "it-IT,it;q=0.9,en-US;q=0.8,en;q=0.7",
"sec-ch-ua": ""Not.A/Brand";v="8", "Chromium";v="114", "Google Chrome";v="114"",
"sec-ch-ua-mobile": "?0",
"sec-ch-ua-platform": ""Windows"",
"sec-fetch-dest": "empty",
"sec-fetch-mode": "cors",
"sec-fetch-site": "cross-site"
},
"referrer": "https://mediasetinfinity.mediaset.it/",
"referrerPolicy": "strict-origin-when-cross-origin",
"body": null,
"method": "GET",
"mode": "cors",
"credentials": "omit"
});
range
queryParam to any number you want (in the example above i modified it to 1 to 1000)fetch
by pressing enterentries
and press Copy value
.episodes.ts
file