Amazon Video - subtitle downloader

Allows you to download subtitles from Amazon Video

< Feedback on Amazon Video - subtitle downloader

Review: Good - script works

§
Posted: 2025-04-17
Edited: 2025-04-17

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

§
Posted: 2025-04-24

damn amazon changing things

§
Posted: 2025-04-29
Edited: 2025-04-29

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.

§
Posted: 2025-04-29
Edited: 2025-04-29

henrique Bettencourt: Thank you so much

§
Posted: 2025-05-02

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.

Post reply

Sign in to post a reply.