Monday, August 28, 2017

dumping the contents of your netflix dvd queue

That Netflix DVD queue can sometimes get out of hand.  If you ever want to do some data on the contents of your queue, I'm pretty sure they still have an API for that.  But maybe you want to back up your queue just in case, or maybe you want to write a thing to tell you if you're about to spend your slot on crap, or maybe you're thinking about pausing your subscription and want to keep a list of what it was that you wanted to watch.  If you want this information and you want it in the browser console and you want it NOW, here is some jQuery garbage I just hacked together to make your dreams come true.

var all = []; $("#activeQueueItems, #savedQueue").find("*").each(function(i,el){var titlez = $(el).attr('aria-label'); titlez && titlez.includes("Table row for") && all.append(titlez.replace("Table row for", "")); }); console.log(all)

Or, slightly less hideously:

var all = [];
$("#activeQueueItems, #savedQueue").find("*").each(function(i, el) {
  var titlez = $(el).attr('aria-label'); 
  titlez && titlez.includes("Table row for") && all.append(titlez.replace("Table row for", ""));
}); 
console.log(all);

Works in Chrome, if you're using something else then get with the program.  Remove the "#savedQueue" if you only want to see items that are active in the queue (not saved DVDs).  Happy hacking!

No comments:

Post a Comment