-
-
Save drench/5972614 to your computer and use it in GitHub Desktop.
(function () { | |
let result = document.evaluate('//span[contains(text(), "is no longer available")]', document.body); | |
let node = null; | |
while (node = result.iterateNext()) { console.log(node.id.replace(/^itemName_/, '')) } | |
})(); |
Looks like Amazon quit using jQuery sometime over the last 8 years 😁
Give this new update a try. I could only find one discontinued item in my wish list, so this is very lightly tested.
I was able to take the ID in the console output and plug that into an Amazon search, and it did bring up an item. See how it goes!
It works in the sense that it spits out a few codes, but unfortunately they dont seem to be useful, at least in my case. Searches on Amazon and Google turn up either literally nothing or things I'd never have on my wishlist. Ive had some luck using this method, but even that is hit or miss, which I guess is probably due to the reason that this is even an issue ( being that the items became unlisted or whatever.) I just wish amazon could've just left the titles there so we could at least just read that or something.
Regardless I appreciate the help and effort, especially for something you probably forgot about a long time ago lol.
Thanks for this... the IDs it returned weren't very helpful, but I saw the ASINs were still in the tree, so I tweaked it a bit. Try this:
(function () {
let result = document.evaluate('//span[contains(text(), "is no longer available")]', document.body);
let node = null;
while (node = result.iterateNext()) {
let id = node.id.replace(/^itemName_/, '');
let node2 = node;
while(node2) {
let attr = node2.attributes["data-itemid"];
if (attr && attr.value == id)
break;
node2 = node2.parentElement;
}
let v = node2.attributes["data-reposition-action-params"].value;
v = v.replace(/^.*(ASIN:[^|]+).*$/, "$1");
console.log(v);
}
})();
I had pretty good luck with the 6 missing items on my wishlist using the ASINs. I had to search without the "ASIN" prefix for a couple of them, and I had to use Bing to find one, but I was able to track down what they all were.
Looks good, though weirdly I am seeing the details on my "discontinued" items on my wishlists now as-is so I can't try it out myself. The links (one example here) are 404s.
Hey, stumbled upon this while looking for an answer that this claims to solve. I realize it's fairly old, but do you know if it still works? I can't seem to get it to work