Skip to content

Instantly share code, notes, and snippets.

@Shimilbi
Last active January 17, 2024 11:34
Show Gist options
  • Save Shimilbi/4661701bba1d3d33e03aa6ebb549d6b2 to your computer and use it in GitHub Desktop.
Save Shimilbi/4661701bba1d3d33e03aa6ebb549d6b2 to your computer and use it in GitHub Desktop.
Netflix- MyList > Export To File

Export Netflix MyList

inspired by: MichaelCurrin/export-netlix-list.md

Action: Exports names of shows on your Netflix profile list. Remember that the list mixes both your watchlist and your favorites. You might want to filter it later.

Prerequisites

  • A Netflix account that you are signed into
  • Movies or shows added to Your List

Steps

  1. Login to Netflix
  2. Go to My List
  3. Wait for the document to be fully charged, or some movies won't be inlcuded!
  4. Apply the code there either by adding a style rule in your web-browser addon, and pasting the corresponding code in that rule or by pasting the corresponding code in your web-browser address bar

Output

your profile > downlaods > Netflix - MyList.txt

Your movie
Your show
etc.

Purpose: To keep track fo those when you are no longer subscribed to Netflix, or share those with other people. This info coverd here is already available in your Netflix account in the form of text and images, but can't be easily copied.

How it works: The script finds all items on the My List page that have the class "fallback-text" and returns its "innerText". If the code there change, this cript will need to be updated.

Privacy: As private as your hard drive. Limited to who you decide to share the file or text with. The script only gives you access to your own user's data. It does not interact with the Netflix API and does not attempt to modify data.

/*
VERSION to paste into the appropriate field a web-browser extension that let you run JS on the webpages you visit
It will adda button into your neflix page. The button will be there as long as you have that extension running while you visit netflix.
*/
//Name: Netflix - Adds a button to save MyList in a text file
//Domain: https://www.netflix.com/
//Responsive: no. optimised for mobiles view
const downloadNetflixList = () => {
const elements = document.querySelectorAll(".fallback-text");
const names = Array.from(elements).map(e => e.innerText).sort();
const content = "[Netflix > MyList] \n\n"+names.join("\n");
console.log(content);
const a = document.createElement('a');
const file = new Blob([content], { type: "text/plain" });
a.href = URL.createObjectURL(file);
a.download = "Netflix - MyList.txt";
a.click();
URL.revokeObjectURL(a.href);
};
let button = "<h2 title='NOTE: scroll to the bottom of the list and makes sure everything is finished loading before clicking here!' "
button += "onmouseover='this.style.color=\"#99AAFF\";' "
button += "onmouseout='this.style.color=\"inherit\";' "
button += "onclick='downloadNetflixList()' "
button += "style='top:45px; left:165px; position:fixed; z-index:99999'>"
button += "Save in text file"
button += "</h2>"
document.body.innerHTML=button+document.body.innerHTML;
javascript :const elements = document.querySelectorAll(".fallback-text"); const names = Array.from(elements).map(x => x.innerText).sort(); const content = "[Netflix > MyList] \n\n"+names.join("\n"); const a = document.createElement('a'); const file = new Blob([content], { type: "text/plain" }); a.href = URL.createObjectURL(file); a.download = "Netflix - MyList.txt"; a.click(); URL.revokeObjectURL(a.href);
/**
VERSION to paste in the address bar of your web-browser.js
**How to use:
- Paste this code in the adress bar,
- Remove the space after "javascript",
- Type "Enter"
**Drawbacks:** you have to do this whenever you want the most recent version of your list
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment