The 2019 Resources Page can be found here and the previous Resources page here.
Amazon Prime Video Expiry Viewer
Part One: For those of you who do not have the Expiry Viewer
How does the Expiry Viewer Work in Your Watchlist?
The only place where an expiration date can be found now is on a title's webpage.
the last day to watch.
For first time users, in order to make the Expiry Viewer work, first you have to add a javascript manager extension like Tampermonkey to your Chrome browser. The Tampermonkey javascript manager can be found in the Google Chrome Extensions webstore at:
After you install the Tampermonkey extension, then you can add the Expiry Viewer script.
to open the Add A New Userscript tab in Tampermonkey.
While holding the Shift key down, press the Down Arrow key to highlight all of the script code in the window. Release the keys and then press the Delete key to delete it all.
// ==UserScript==
// @name 8-20-2020 Amazon Prime Video Expiry Viewer
// @namespace https://github.com/Kadauchi
// @version 2.0.3
// @description Makes it obvious which and when videos are going to expire.
// @author Kadauchi et al
// @icon http://i.imgur.com/oGRQwPN.png
// @include https://www.amazon.com/gp/video/mystuff/*
// @include https://www.amazon.com/gp/video/detail/*
// ==/UserScript==
var myVar;
if (window.location.href.indexOf('amazon.com/gp/video/detail/') > 0) {
myVar = 2;
} else {
myVar = 1;
}
setTimeout(pause, 12000);
function pause () {
var pauseVar = 1;
}
const checked = {}
function checkShelf () {
if (myVar == 2) {
// for (const el of document.getElementsByClassName('dv-shelf-item')) checkIfLeaving(el);
for (const el of document.getElementsByClassName('_2AgxOB')) checkIfLeaving(el);
} else {
// for (const el of document.getElementsByClassName('dv-packshot')) checkIfLeaving(el);
for (const el of document.getElementsByClassName('D0Lu_p')) checkIfLeaving(el);
}
}
async function checkIfLeaving (item) {
const asin = item.querySelector('[data-asin]').dataset.asin;
const leaving = await fetchHover(asin);
if (leaving.isLeaving) {
const date = document.createElement('div');
date.textContent = 'Leaves on ' + leaving.isLeaving;
date.style = 'text-align: center; color: black; font-size: 16px; line-height: 28px;';
date.style.backgroundColor = 'yellow';
item.appendChild(date);
}
if (leaving.isLeaves) {
const date = document.createElement('div');
date.textContent = 'Leaves in ' + leaving.isLeaves;
date.style = 'text-align: center; color: black; font-size: 16px; line-height: 28px;';
date.style.backgroundColor = 'yellow';
item.appendChild(date);
}
if (leaving.isImdb) {
const date = document.createElement('div');
date.textContent = 'Available on your IMDb TV channel';
date.style = 'text-align: center; color: black; font-size: 16px; line-height: 28px;';
date.style.backgroundColor = 'lightskyblue';
item.appendChild(date);
}
}
function fetchHover (asin) {
return new Promise(async (resolve) => {
if (asin && !checked[asin]) {
// const response = await window.fetch(`https://www.amazon.com/gp/video/hover/${asin}?format=json`);
const response = await window.fetch(`https://www.amazon.com/gp/video/detail/${asin}?format=json`);
const text = await response.text();
// console.log(text);
const imdb = text.match(/ncluded with your IMDb TV channel/);
const leaving = text.match(/eaves Prime on ([\w\s,]+)/);
const leaves = text.match(/eaves Prime in ([\w\s,]+)/);
const isImdb = !!imdb;
const isLeaving = leaving ? leaving[1] : false;
const isLeaves = leaves ? leaves[1] : false;
checked[asin] = { isImdb, isLeaving, isLeaves };
resolve(checked[asin]);
} else if (checked[asin]) {
resolve(checked[asin]);
}
})
}
checkShelf();
// @name 8-20-2020 Amazon Prime Video Expiry Viewer
// @namespace https://github.com/Kadauchi
// @version 2.0.3
// @description Makes it obvious which and when videos are going to expire.
// @author Kadauchi et al
// @icon http://i.imgur.com/oGRQwPN.png
// @include https://www.amazon.com/gp/video/mystuff/*
// @include https://www.amazon.com/gp/video/detail/*
// ==/UserScript==
var myVar;
if (window.location.href.indexOf('amazon.com/gp/video/detail/') > 0) {
myVar = 2;
} else {
myVar = 1;
}
setTimeout(pause, 12000);
function pause () {
var pauseVar = 1;
}
const checked = {}
function checkShelf () {
if (myVar == 2) {
// for (const el of document.getElementsByClassName('dv-shelf-item')) checkIfLeaving(el);
for (const el of document.getElementsByClassName('_2AgxOB')) checkIfLeaving(el);
} else {
// for (const el of document.getElementsByClassName('dv-packshot')) checkIfLeaving(el);
for (const el of document.getElementsByClassName('D0Lu_p')) checkIfLeaving(el);
}
}
async function checkIfLeaving (item) {
const asin = item.querySelector('[data-asin]').dataset.asin;
const leaving = await fetchHover(asin);
if (leaving.isLeaving) {
const date = document.createElement('div');
date.textContent = 'Leaves on ' + leaving.isLeaving;
date.style = 'text-align: center; color: black; font-size: 16px; line-height: 28px;';
date.style.backgroundColor = 'yellow';
item.appendChild(date);
}
if (leaving.isLeaves) {
const date = document.createElement('div');
date.textContent = 'Leaves in ' + leaving.isLeaves;
date.style = 'text-align: center; color: black; font-size: 16px; line-height: 28px;';
date.style.backgroundColor = 'yellow';
item.appendChild(date);
}
if (leaving.isImdb) {
const date = document.createElement('div');
date.textContent = 'Available on your IMDb TV channel';
date.style = 'text-align: center; color: black; font-size: 16px; line-height: 28px;';
date.style.backgroundColor = 'lightskyblue';
item.appendChild(date);
}
}
function fetchHover (asin) {
return new Promise(async (resolve) => {
if (asin && !checked[asin]) {
// const response = await window.fetch(`https://www.amazon.com/gp/video/hover/${asin}?format=json`);
const response = await window.fetch(`https://www.amazon.com/gp/video/detail/${asin}?format=json`);
const text = await response.text();
// console.log(text);
const imdb = text.match(/ncluded with your IMDb TV channel/);
const leaving = text.match(/eaves Prime on ([\w\s,]+)/);
const leaves = text.match(/eaves Prime in ([\w\s,]+)/);
const isImdb = !!imdb;
const isLeaving = leaving ? leaving[1] : false;
const isLeaves = leaves ? leaves[1] : false;
checked[asin] = { isImdb, isLeaving, isLeaves };
resolve(checked[asin]);
} else if (checked[asin]) {
resolve(checked[asin]);
}
})
}
checkShelf();
END OF SCRIPT CODE
and continue all the way down to the last line: checkShelf();
Press Ctrl + C to do a Copy of all the script code. Switch back to Tampermonkey and
press Ctrl + P to Paste all the code into the New Userscript window in Tampermonkey.
If you have some expiring Prime movies in Your Watchlist [or you can add some from the Master List], you should see their Yellow expiration date banners. If you have some IMDb TV movies in Your Watchlist, you should see their Blue IMDb TV banners.
Part Two: For those of you who do have the Expiry Viewer and need to update the script
How do I update the script?
Part Three: Some Notes
• The script does NOT work on the continuous scrolling Watchlist that Amazon introduced last year.
What to do?
Option 1: You can manually change the pages of your Watchlist by typing each page number into the URL address at the top of your browser and then pressing Enter.
Option 2: You can bookmark each page so that you do not have to manually change the page numbers each time. You can create a folder (within your bookmarks) for your bookmarked Watchlist pages so that you can access them quickly.
Option 2: You can bookmark each page so that you do not have to manually change the page numbers each time. You can create a folder (within your bookmarks) for your bookmarked Watchlist pages so that you can access them quickly.
https://www.amazon.com/gp/video/mystuff/watchlist/movie/ref=atv_wtlp_mv?page=1&sort=DATE_ADDED_DESC
You must go to the next page 2 by manually changing the page number in the URL address at the top of your browser to page=2, then moving the cursor to the end of the URL address and pressing Enter. The Expiry Viewer will then display the Yellow expiration notices for any expiring titles on page 2. Repeat for page 3, 4, 5, etc. until you reach the end of your Movies Watchlist.
Note: There are a total of 60 titles listed on each Your Watchlist page. The Expiry Viewer will only work on the first 60 titles displayed on each page. It will not work on the titles beyond 60 that are added by the Your Watchlist continuous scroll feature.
You must go to the next page 2 by manually changing the page number in the URL address at the top of your browser to page=2, then moving the cursor to the end of the URL address and pressing Enter. The Expiry Viewer will then display the Yellow expiration notices for any expiring titles on page 2. Repeat for page 3, 4, 5, etc. until you reach the end of your Movies Watchlist.
https://www.amazon.com/gp/video/mystuff/watchlist/tv/ref=atv_wtlp_tv?page=1&sort=DATE_ADDED_DESC
Repeat the procedure above to go to page 2, 3, 4, 5, etc. until you reach the end of your TV Shows Watchlist. Be sure to bookmark each Your Watchlist TV Show page as you go.
Repeat the procedure above to go to page 2, 3, 4, 5, etc. until you reach the end of your TV Shows Watchlist. Be sure to bookmark each Your Watchlist TV Show page as you go.
are available on the IMDb TV channel to make it easier to see those titles in Your Watchlist.
the Yellow Leaving Prime banner and the Blue IMDb TV banner below the posters of
any expiring Prime titles or IMDb TV titles included
in the "Customers Who Watched This Item Also Watched" listing and
the "Cast and Crew" listings.
wait up to 60 seconds or more for the Yellow expiring banners and
the Blue IMDb TV banners to load on each Your Watchlist page. And as long again
to see the banners display on individual Movie and TV Show webpages.
browsers that you may prefer to use. The procedure is the same. Install the script manager first, then add the userscript above.
More Websites to Check Out
- Instantwatcher - see what is new on Prime
- IMDb - learn more about your favorite movies and shows and more
- Carol's blog, "What's Expiring On Netflix Soon?"
Working for me! Much thanks to all who contribute to this site.
ReplyDeleteThanks to those of you who bird dogged this expiring titles craziness and at least got the Watchlist back to displaying the banners below the movie pictures since the Amazon programmers couldn't or wouldn't do it. Yes, I called Customer Support and didn't get any on this topic; what I did get was the usual apologies and empty promises to look into the problem. I marvel that behemoths like Amazon and Netflix treat their customers so badly. What's that old saw about those who cannot learn from history are doomed to repeat it. Bezos and Hastings, companies are never too big to fail. One day someone will start a streaming company, treat their customers right, and will beat your pants off. Count on it.
ReplyDeleteThanks again to whomever got the banners working again. I'm so grateful, I went through all 25 pages of my movies, but didn't find any expiring titles that had not already been reported.
Worked great for me, thanks to all who did so much work on this!
ReplyDeleteIs there an option for other web browsers? I mostly use Firefox. Would be good to know if there's an option to use the expiry viewer on FF, IE, Opera, ME, Safari, etc....
ReplyDeleteAccording to the last Note above, you will find links to several Javascript user script manager extensions that work with those browsers at: https://greasyfork.org
DeleteThe procedure is the same. Install the script manager first, then add the userscript above.
Please let us know which browser you choose and which script manager works for you.
Thanks, I missed that!
DeleteThis STOPPED working if you hit the PRIME ONLY button for me in Desktop Chrome PC for me today. But it works fine if you use the link on this page that goes to the full Watchlist (Prime Toggle Off). Maybe script needs a quick edit?
ReplyDeleteSo it works on: https://www.amazon.com/gp/video/mystuff/watchlist/movie/ref=atv_wtlp_mv?page=1&sort=DATE_ADDED_DESC
ReplyDeletebut not
https://www.amazon.com/gp/video/mystuff/watchlist/movie/prime/ref=atv_wtlp_prm?page=1&sort=DATE_ADDED_DESC
The Expiry Viewer works for me on Your Watchlist pages. After you turn ON the "Prime Only" button, located to the immediate LEFT of the "Sort by: Most Recent Addition" setting on the top right of the Your Watchlist page, then you have to click the "Reload this page" icon on the Chrome browser toolbar to run the Expiry Viewer again. Then you will see the Yellow banners under the expiring Movie posters.
DeleteBecause the URL address of the Your Watchlist page changes when you turn ON the Prime Only button, as you noted above, you will then have to manually change the ?page=1 in the URL address bar of the Chrome browser to ?page=2 and press the Enter key to go to the next page. The Expiry Viewer will work automatically this time. Repeat for ?page=3 , ?page=4 , etc.
You should also make a new Bookmark for pages 1, 2, 3, etc. if you plan to look at Your Watchlist pages with the Prime button turned ON in the future. You might put the new Bookmarks in a "Prime Only" Bookmark Folder.
Note: Don't forget to turn OFF the Prime Only button when finished, or you won't be able to see any rental titles, IMDb TV titles with Blue banners, or expired Prime titles on Your Watchlist pages. And you will have to click the "Reload this page" icon again each time you turn the Prime Only button ON and OFF.
Note: The Prime Only button affects only Your Watchlist pages. It has no effect on individual Movie and TV Show detail webpages or any other Prime Video webpage.