Resources 2022

Welcome to the 2022 Resources Page.

        The Expiry Viewer script stopped working in March 2023.

Please note:  The recent March 2023 changes to the Watchlist layout and the Detail Webpages layout have disabled the Amazon Prime Video Expiry Viewer script.

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?
 
Presently Amazon Prime Video displays a 14-day advance expiration notice for a movie in two places on the website.  When you hover your mouse over a movie poster in Your Watchlist, you may find an expiration notice in the hover pop-up window that appears, stating the date when the title will leave Prime.
 
The second place is on the movie's detail webpage where the expiration notice acts like a countdown clock, first providing the number of days until it leaves, then changing to the number of hours, and finally during the last 24 hours it shows the number of hours and minutes remaining until the title leaves Prime.
 
To save you the time and trouble of searching each and every title in Your Watchlist hunting for an expiration notice, the Expiry Viewer performs the search for you and then displays a Yellow banner beneath the movie poster in Your Watchlist that shows the title's countdown clock expiration date notice that is shown on the title's detail webpage.
Reminder:  Amazon's date is the day the movie "Leaves Prime"; we list the movie one day earlier,
which is the Last Day To Watch.
 
Expiration Date = Title's Detail webpage notice "Leaves Prime in XX days" + Today's Date
Last Day to Watch = Expiration Date - 1 day
 
The Expiry Viewer also displays a Blue banner below the posters of Movies and TV shows
that are available on Freevee to make it easier to see those titles in Your Watchlist.

Getting Started:
 
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:
 
https://chrome.google.com/webstore/detail/tampermonkey/dhdgffkkebhmkfjojejmpbldmpobfkfo

After you install the Tampermonkey extension, then you can add the Expiry Viewer script.
 
1)  Click on the Extensions icon on the right side of the Chrome browser toolbar and then click on Tampermonkey to display the Tampermonkey menu. Click on the Dashboard menu item to open a new browser tab showing the list of Installed Userscripts.
 
2)  If you have a previous version installed, click the Enabled button to Disabled for the old Amazon Prime Video Expiry Viewer.  [Note: You can remove an older version of the script by clicking the Delete icon at the far right of the row under the Actions column in Tampermonkey.]
 
Next click the Plus Sign button tab, which is located to the left of the "Installed userscripts" tab,
to open the Add A New Userscript tab in Tampermonkey.
 
3)  Place the cursor at the beginning of the first line of code in the New Userscript window.
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. The window is now empty.
 
4)  Below is the latest revision of the Expiry Viewer code:    5-8-2022 version 2.0.6
which reflects the recent name change of IMDb TV to Freevee.

// ==UserScript==
// @name         5-8-2022 Amazon Prime Video Expiry Viewer
// @version      2.0.6
// @description  Makes it obvious which and when videos are going to expire.
// @author       Various
// @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 () {
  const 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.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.isFreevee) {
    const date = document.createElement('div');
    date.textContent = 'Available on Freevee';
    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/detail/${asin}?format=json`);
      const text = await response.text();
      // console.log(text);
      const freevee = text.match(/ncluded with Freevee/);
      const leaves = text.match(/eaves Prime in ([\w\s,]+)/);
      const isFreevee = !!freevee;
      const isLeaves = leaves ? leaves[1] : false;
      checked[asin] = { isFreevee, isLeaves };
      resolve(checked[asin]);
    } else if (checked[asin]) {
      resolve(checked[asin]);
    }
  })
}

checkShelf();

END OF SCRIPT CODE - do NOT copy this line
 
5)  Highlight the above code beginning with the first line:    // ==UserScript==
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 empty New Userscript window in Tampermonkey.
 
6)  Click on the File Menu in the Tampermonkey Editor and click on Save to install the new script.
 
7)  Tampermonkey will automatically install the new Userscript, Enable it to run and return you to the Installed Userscripts tab in Tampermonkey.
 
Now click the little “x” on the Tampermonkey browser tab to close it and return to your starting Google Chrome webpage.
 
8)  Go to Amazon and sign in.  Then go to Prime Video Your Watchlist Movies page 1.
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 Freevee movies in Your Watchlist, you should see their Blue Freevee banners.
 
If the Expiry Viewer does not work or only displays a few Yellow banners, click the Reload This Page icon on the Chrome toolbar and wait again.  It is sometimes necessary to Reload the page to see all of the Yellow banners.
 
9)  Be sure to go on to Part Three:  How to Get the Expiry Viewer to Work to learn how to create bookmarks for each of Your Watchlist pages in order to make the Expiry Viewer work.
 
This script is a wonderful time saver!  It eliminates the need to hover your mouse over each individual movie poster in Your Watchlist one at a time to check whether it may be expiring soon.
What a terrible time-consuming procedure that is.

Part Two:  For those of you who do have the Expiry Viewer and need to update the script

How do I update the script?
 
If you are a current user of the Expiry Viewer script, then go to Step 1 above and follow the instructions to install the latest version of the script.  The Tampermonkey "check for userscript updates" feature will not work with this new version.

Part Three:  How to Get the Expiry Viewer to Work

The Background:
 
  The APV Expiry Viewer was originally developed when the Your Watchlist was a series of pages,
each containing no more than 60 titles per page.  To advance to the next page, you would click on the Next Page Arrow.  Logical, huh?
 
Sometime ago APV decided to change the Watchlist to one continuously scrolling page, but the individual pages are still there.  They haven't gone away.
 
Now, when you first open Your Watchlist for Movies or TV Shows, APV displays the first 60 titles on page 1 of Your Watchlist.
 
Then, when you arrive at the bottom of the page, the continuous scrolling feature displays the next page of 60 titles.
 
In a sense, the continuous scrolling feature of Your Watchlist works by clicking the next page arrow for you when you reach the bottom of a page.
 
Summary:
 
  The Expiry Viewer only works on one page at a time.
The script does NOT work on the continuous scrolling Watchlist after the first 60 titles on page 1.
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:  We recommend you create a bookmark for each page so that you do not have to manually change the page numbers every time.  You can create a folder (within your bookmarks) for your bookmarked Watchlist pages so that you can access them quickly.
 
Details:
 
  The URL address for the Your Watchlist Movies page number 1 is:
https://www.amazon.com/gp/video/mystuff/watchlist/movie/ref=atv_wtlp_mv?page=1&sort=DATE_ADDED_DESC
See the page=1 in the URL address?
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 and then pressing Enter.  The Expiry Viewer will then display the Yellow expiration banners for any expiring titles on page 2.  Don't forget to make a bookmark for page 2 before you go on to the next page 3.  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.
 
  The URL address for the Your Watchlist TV Shows page number 1 is:
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 make a bookmark for each Your Watchlist TV Show page as you go.
 
In Conclusion:
 
  Now after creating your bookmarks for each of Your Watchlist pages, it is a simple matter
to run through Your Watchlist looking for the Yellow banners of expiring titles.  Just click on the bookmark for each page until you reach the end of Your Watchlist.
 
  When you find an expiring title, you can move it to the top of Your Watchlist page 1 by
hovering your mouse over the title's poster.  Then click on the Remove icon in the hover pop-up info window and the poster will disappear.  Next click on the Undo link and the poster will reappear.  This two-step procedure moves the expiring title to the top of page 1 in Your Watchlist.

Part Four:  Notes
 
  The GreasyFork.org home page lists several other javascript manager programs that work with
other browsers, like Firefox, Safari, MS Edge, etc., that you may prefer to use.  The procedure is the same.  Install the javascript manager extension for your browser first, then add the userscript.  The URL address is https://greasyfork.org
 
  The Expiry Viewer now also displays a Blue banner below the posters of Movies and TV shows
that are available on the Freevee channel to make it easier to see those titles in Your Watchlist.
 
  On individual Movie and TV Show detail webpages, the Expiry Viewer will now also display
the Yellow Leaving Prime banner and the Blue Freevee banner below the posters of any expiring Prime titles or Freevee titles included in the "Customers Who Watched This Item Also Watched" listing and the "Cast and Crew" listings.
 
  Depending on how fast your computer is and how fast your internet connection is, you may have to
wait up to 60 seconds or more for the Yellow expiring banners and the Blue Freevee banners to load on each Your Watchlist page.  And as long again to see the banners display on individual Movie and TV Show detail webpages.

More Websites to Check Out
 
Resources Archive
 
The earlier 2021a Resources Page can be found here.
The 2021 Resources Page can be found here.
The 2020 Resources Page can be found here.
The 2019 Resources Page can be found here and the previous Resources page here.


6 comments:

  1. Note: There is a new revised Expiry Viewer script:   5-8-2022 version 2.0.6
    which reflects the name change from IMDb TV to Freevee.  The current version 6-14-2021 version 2.0.5 still works fine at finding titles expiring from Prime in your Watchlist, so you can update to the new version when convenient.  See the Resources page above for instructions on how to install it and make it work.

    You will need to update to the new revised Expiry Viewer to be able to see the new Blue Freevee banners in your Watchlist.

    ReplyDelete
  2. It seems like Amazon Prime Video page updated again and none of the expiration is showing. Anyone else have this issue?

    ReplyDelete
    Replies
    1. Please use the new March 2023 Discussions post to continue the discussion
      about the new Prime Video Watchlist layout shown in web browsers on computers.
      The link to the post can also be found in the right-hand sidebar.

      Delete
  3. The recent March 2023 changes to the Watchlist layout and the Detail Webpages layout
    have disabled the Amazon Prime Video Expiry Viewer script.

    ReplyDelete
  4. i think this page should be deprecated since expiry viewer doesn't work since March 2023 interface changes.

    ReplyDelete
    Replies
    1. so go ahead and deprecate it.

      Delete