Amazon Video - subtitle downloader

Allows you to download subtitles from Amazon Video

< Opiniones de Amazon Video - subtitle downloader

Puntuación: Bueno; el script funciona tal y como promete

§
Publicado: 17/4/2025
Editado: 17/4/2025

I haven't seen the download button for a few weeks.

§
Publicado: 24/4/2025

damn amazon changing things

§
Publicado: 29/4/2025
Editado: 29/4/2025

It didn't work here either.
The download button did not appear.
Solution given by gru123, here:
https://greasyfork.org/en/scripts/34885-amazon-video-subtitle-downloader/discussions/269675



Solution.
New xhrHijacker:

xhrHijacker(function(xhr, id, origin, args) {
if(!initialied && origin === 'open')
//if(origin === 'open')
if(args[1].indexOf('/GetVodPlaybackResources') > -1 || args[1].indexOf('/GetPlaybackResources') > -1) {
init(args[1])
.catch(error => {
console.log(error);
alert(`subtitle downloader error: ${error.message}`);
});
}
});

New parseUrl:

function parseURL(url) {
if (url.includes("GetVodPlaybackResources")){
const urlObj = new URL(url);
const urlHostname = urlObj.hostname;
const deviceID = urlObj.searchParams.get("deviceID");
const deviceTypeID = urlObj.searchParams.get("deviceTypeID");
const marketplaceID = urlObj.searchParams.get("marketplaceID");
return `https://${urlHostname}/cdp/catalog/GetPlaybackResources?consumptionType=Streaming&desiredResources=CatalogMetadata%2CForcedNarratives%2CSubtitleUrls&deviceID=${deviceID}&deviceTypeID=${deviceTypeID}&firmware=1&gascEnabled=true&marketplaceID=${marketplaceID}&resourceUsage=CacheResources&videoMaterialType=Feature&operatingSystemName=Windows&operatingSystemVersion=10.0&titleDecorationScheme=primary-content&subtitleFormat=TTMLv2&uxLocale=en_US&asin=`;
} else if (url.includes("GetPlaybackResources")){
let filter = ['consumptionType', 'deviceID', 'deviceTypeID', 'firmware', 'gascEnabled', 'marketplaceID', 'userWatchSessionId', 'videoMaterialType', 'clientId', 'operatingSystemName', 'operatingSystemVersion', 'customerID', 'token'];
let urlParts = url.split('?');
let params = ['desiredResources=CatalogMetadata%2CSubtitleUrls%2CForcedNarratives'];
urlParts[1].split('&').forEach(function(param) {
let p = param.split('=');
if(filter.indexOf(p[0]) > -1)
params.push(param);
});
params.push('resourceUsage=CacheResources');
params.push('titleDecorationScheme=primary-content');
params.push('subtitleFormat=TTMLv2');
params.push('asin=');
urlParts[1] = params.join('&');
return urlParts.join('?');
}
}

After doing that, the option to download appear.

§
Publicado: 29/4/2025
Editado: 29/4/2025

henrique Bettencourt: Thank you so much

henrique Bettencourt: Thank you so much

Does it work for you? Tried that command and it doesn't work for me.

Yes, it works.
Copy and paste new xhrHijacker and New parseUrl.

Publicar respuesta

Inicia sesión para responder.