Skip to main content
added 185 characters in body
Source Link
Zach Saucier
  • 1.9k
  • 15
  • 29

Instructions:

  1. Go to your Playlists page.
  2. Make sure all of the playlists you want to share are at least "Unlisted" if not "Public". You can change this by clicking the three dots on one of the playlists -> "Edit playlist" -> "Privacy" drop down. Unfortunately you have to do this by hand for each playlist.
  3. Scroll to the bottom of the Playlists page (making sure that all your playlists have loaded).
  4. Press F12 to open your console.
  5. Paste this JavaScript into your console.
    const playlists = [];
    
    document.querySelectorAll("ytmusic-two-row-item-renderer").forEach(playlist => {
      const title = playlist.querySelector(".details > .title-group").innerText; 
      const url = playlist.querySelector("a").href;
    
      if(title !== "New playlist" && title !== "Your Likes")
        playlists.push({title, url});
    });
    
  6. (optional) To sort it, enter this:
    playlists.sort((a,b) => (a.title > b.title) ? 1 : ((b.title > a.title) ? -1 : 0));
    
  7. Do what you'd like with the array of objects. I provide a few options below.

If you want the output in JSON form, just stringify it:

JSON.stringify(tracklistObj, null, '\t');

If you want a plain text version:

let myString = "";
playlists.forEach(list => myString += `${list.title} - ${list.url}\n`);
myString;

If you want to have the output be an HTML list:

let myHTML = "<ul>";
playlists.forEach(list => myHTML += `<li><a href="${list.url}" target="_blank">${list.title}</a></li>` );
myHTML += "</ul>";

Note: Shared YouTube Music playlists do not show uploaded songs to other users besides the one who made the playlist. There's nothing that you can do about this to my knowledge.

Instructions:

  1. Go to your Playlists page.
  2. Make sure all of the playlists you want to share are at least "Unlisted" if not "Public". You can change this by clicking the three dots on one of the playlists -> "Edit playlist" -> "Privacy" drop down. Unfortunately you have to do this by hand for each playlist.
  3. Scroll to the bottom of the Playlists page (making sure that all your playlists have loaded).
  4. Press F12 to open your console.
  5. Paste this JavaScript into your console.
    const playlists = [];
    
    document.querySelectorAll("ytmusic-two-row-item-renderer").forEach(playlist => {
      const title = playlist.querySelector(".details > .title-group").innerText; 
      const url = playlist.querySelector("a").href;
    
      if(title !== "New playlist" && title !== "Your Likes")
        playlists.push({title, url});
    });
    
  6. (optional) To sort it, enter this:
    playlists.sort((a,b) => (a.title > b.title) ? 1 : ((b.title > a.title) ? -1 : 0));
    
  7. Do what you'd like with the array of objects. I provide a few options below.

If you want the output in JSON form, just stringify it:

JSON.stringify(tracklistObj, null, '\t');

If you want a plain text version:

let myString = "";
playlists.forEach(list => myString += `${list.title} - ${list.url}\n`);
myString;

If you want to have the output be an HTML list:

let myHTML = "<ul>";
playlists.forEach(list => myHTML += `<li><a href="${list.url}" target="_blank">${list.title}</a></li>` );
myHTML += "</ul>";

Instructions:

  1. Go to your Playlists page.
  2. Make sure all of the playlists you want to share are at least "Unlisted" if not "Public". You can change this by clicking the three dots on one of the playlists -> "Edit playlist" -> "Privacy" drop down. Unfortunately you have to do this by hand for each playlist.
  3. Scroll to the bottom of the Playlists page (making sure that all your playlists have loaded).
  4. Press F12 to open your console.
  5. Paste this JavaScript into your console.
    const playlists = [];
    
    document.querySelectorAll("ytmusic-two-row-item-renderer").forEach(playlist => {
      const title = playlist.querySelector(".details > .title-group").innerText; 
      const url = playlist.querySelector("a").href;
    
      if(title !== "New playlist" && title !== "Your Likes")
        playlists.push({title, url});
    });
    
  6. (optional) To sort it, enter this:
    playlists.sort((a,b) => (a.title > b.title) ? 1 : ((b.title > a.title) ? -1 : 0));
    
  7. Do what you'd like with the array of objects. I provide a few options below.

If you want the output in JSON form, just stringify it:

JSON.stringify(tracklistObj, null, '\t');

If you want a plain text version:

let myString = "";
playlists.forEach(list => myString += `${list.title} - ${list.url}\n`);
myString;

If you want to have the output be an HTML list:

let myHTML = "<ul>";
playlists.forEach(list => myHTML += `<li><a href="${list.url}" target="_blank">${list.title}</a></li>` );
myHTML += "</ul>";

Note: Shared YouTube Music playlists do not show uploaded songs to other users besides the one who made the playlist. There's nothing that you can do about this to my knowledge.

added 270 characters in body
Source Link
Zach Saucier
  • 1.9k
  • 15
  • 29

Instructions:

  1. Go to your Playlists page.
  2. Make sure all of the playlists you want to share are at least "Unlisted" if not "Public". You can change this by clicking the three dots on one of the playlists -> "Edit playlist" -> "Privacy" drop down. Unfortunately you have to do this by hand for each playlist.
  3. Scroll to the bottom of the Playlists page (making sure that all your playlists have loaded).
  4. Press F12 to open your console.
  5. Paste this JavaScript into your console.
    const playlists = [];
    
    document.querySelectorAll("ytmusic-two-row-item-renderer").forEach(playlist => {
      const title = playlist.querySelector(".details > .title-group").innerText; 
      const url = playlist.querySelector("a").href;
    
      if(title !== "New playlist" && title !== "Your Likes")
        playlists.push({title, url});
    });
    
  6. (optional) To sort it, enter this:
    playlists.sort((a,b) => (a.title > b.title) ? 1 : ((b.title > a.title) ? -1 : 0));
    
  7. Do what you'd like with the array of objects. I provide a few options below.

If you want the output in JSON form, just stringify it:

JSON.stringify(tracklistObj, null, '\t');

If you want a plain text version:

let myString = "";
playlists.forEach(list => myString += `${list.title} - ${list.url}\n`);
myString;

If you want to have the output be an HTML list:

let myHTML = "<ul>";
playlists.forEach(list => myHTML += `<li><a href="${list.url}" target="_blank">${list.title}</a></li>` );
myHTML += "</ul>";

Instructions:

  1. Go to your Playlists page.
  2. Scroll to the bottom of the Playlists page (making sure that all your playlists have loaded).
  3. Press F12 to open your console.
  4. Paste this JavaScript into your console.
    const playlists = [];
    
    document.querySelectorAll("ytmusic-two-row-item-renderer").forEach(playlist => {
      const title = playlist.querySelector(".details > .title-group").innerText; 
      const url = playlist.querySelector("a").href;
    
      if(title !== "New playlist" && title !== "Your Likes")
        playlists.push({title, url});
    });
    
  5. (optional) To sort it, enter this:
    playlists.sort((a,b) => (a.title > b.title) ? 1 : ((b.title > a.title) ? -1 : 0));
    
  6. Do what you'd like with the array of objects. I provide a few options below.

If you want the output in JSON form, just stringify it:

JSON.stringify(tracklistObj, null, '\t');

If you want a plain text version:

let myString = "";
playlists.forEach(list => myString += `${list.title} - ${list.url}\n`);
myString;

If you want to have the output be an HTML list:

let myHTML = "<ul>";
playlists.forEach(list => myHTML += `<li><a href="${list.url}" target="_blank">${list.title}</a></li>` );
myHTML += "</ul>";

Instructions:

  1. Go to your Playlists page.
  2. Make sure all of the playlists you want to share are at least "Unlisted" if not "Public". You can change this by clicking the three dots on one of the playlists -> "Edit playlist" -> "Privacy" drop down. Unfortunately you have to do this by hand for each playlist.
  3. Scroll to the bottom of the Playlists page (making sure that all your playlists have loaded).
  4. Press F12 to open your console.
  5. Paste this JavaScript into your console.
    const playlists = [];
    
    document.querySelectorAll("ytmusic-two-row-item-renderer").forEach(playlist => {
      const title = playlist.querySelector(".details > .title-group").innerText; 
      const url = playlist.querySelector("a").href;
    
      if(title !== "New playlist" && title !== "Your Likes")
        playlists.push({title, url});
    });
    
  6. (optional) To sort it, enter this:
    playlists.sort((a,b) => (a.title > b.title) ? 1 : ((b.title > a.title) ? -1 : 0));
    
  7. Do what you'd like with the array of objects. I provide a few options below.

If you want the output in JSON form, just stringify it:

JSON.stringify(tracklistObj, null, '\t');

If you want a plain text version:

let myString = "";
playlists.forEach(list => myString += `${list.title} - ${list.url}\n`);
myString;

If you want to have the output be an HTML list:

let myHTML = "<ul>";
playlists.forEach(list => myHTML += `<li><a href="${list.url}" target="_blank">${list.title}</a></li>` );
myHTML += "</ul>";
added 194 characters in body
Source Link
Zach Saucier
  • 1.9k
  • 15
  • 29

Instructions:

  1. Go to your Playlists page.
  2. Scroll to the bottom of the Playlists page (making sure that all your playlists have loaded).
  3. Press F12 to open your console.
  4. Paste in thethis JavaScript code below into your console.
    const playlists = [];
    
    document.querySelectorAll("ytmusic-two-row-item-renderer").forEach(playlist => {
      const title = playlist.querySelector(".details > .title-group").innerText; 
      const url = playlist.querySelector("a").href;
    
      if(title !== "New playlist" && title !== "Your Likes")
        playlists.push({title, url});
    });
    
  5. Copy the outputted string and paste it into any .html file. If you want(optional) To sort it in plain text, viewenter this:
    playlists.sort((a,b) => (a.title > b.title) ? 1 : ((b.title > a.title) ? -1 : 0));
    
  6. Do what you'd like with the array of objects.html file, select the text, and copy that I provide a few options below.

If you want the output in JSON form, just stringify it:

const playlists = [];

document.querySelectorAll("ytmusic-two-row-item-renderer").forEach(playlist => {
  const title = playlist.querySelector(".details > .title-group").innerText; 
  const url = playlist.querySelector("a")JSON.href;

  ifstringify(title !== "New playlist" && title !== "Your Likes")
   tracklistObj, playlists.push({titlenull, url});
}'\t');

To sort it, enter thisIf you want a plain text version:

playlists.sort((a,b) =>let (a.titlemyString >= b"";
playlists.title) ? 1forEach(list :=> ((b.titlemyString >+= a`${list.title) ?} -1 : 0)${list.url}\n`);
myString;

If you want to have the output be an HTML list, paste in the following afterwards:

let myHTML = "<ul>";
playlists.forEach(list => myHTML += `<li><a href="${list.url}" target="_blank">${list.title}</a></li>` );
myHTML += "</ul>";

Instructions:

  1. Go to your Playlists page.
  2. Scroll to the bottom of the Playlists page (making sure that all your playlists have loaded).
  3. Press F12 to open your console.
  4. Paste in the JavaScript code below into your console.
  5. Copy the outputted string and paste it into any .html file. If you want it in plain text, view the .html file, select the text, and copy that.
const playlists = [];

document.querySelectorAll("ytmusic-two-row-item-renderer").forEach(playlist => {
  const title = playlist.querySelector(".details > .title-group").innerText; 
  const url = playlist.querySelector("a").href;

  if(title !== "New playlist" && title !== "Your Likes")
    playlists.push({title, url});
});

To sort it, enter this:

playlists.sort((a,b) => (a.title > b.title) ? 1 : ((b.title > a.title) ? -1 : 0));

If you want to have the output be an HTML list, paste in the following afterwards:

let myHTML = "<ul>";
playlists.forEach(list => myHTML += `<li><a href="${list.url}" target="_blank">${list.title}</a></li>` );
myHTML += "</ul>";

Instructions:

  1. Go to your Playlists page.
  2. Scroll to the bottom of the Playlists page (making sure that all your playlists have loaded).
  3. Press F12 to open your console.
  4. Paste this JavaScript into your console.
    const playlists = [];
    
    document.querySelectorAll("ytmusic-two-row-item-renderer").forEach(playlist => {
      const title = playlist.querySelector(".details > .title-group").innerText; 
      const url = playlist.querySelector("a").href;
    
      if(title !== "New playlist" && title !== "Your Likes")
        playlists.push({title, url});
    });
    
  5. (optional) To sort it, enter this:
    playlists.sort((a,b) => (a.title > b.title) ? 1 : ((b.title > a.title) ? -1 : 0));
    
  6. Do what you'd like with the array of objects. I provide a few options below.

If you want the output in JSON form, just stringify it:

JSON.stringify(tracklistObj, null, '\t');

If you want a plain text version:

let myString = "";
playlists.forEach(list => myString += `${list.title} - ${list.url}\n`);
myString;

If you want to have the output be an HTML list:

let myHTML = "<ul>";
playlists.forEach(list => myHTML += `<li><a href="${list.url}" target="_blank">${list.title}</a></li>` );
myHTML += "</ul>";
Source Link
Zach Saucier
  • 1.9k
  • 15
  • 29
Loading