[...document.querySelectorAll('.buy > i')]
.filter((n, i, a) => i !== a.findIndex(m => m.innerText === n.innerText))
.forEach(n => n.parentNode.style.display = 'none');
или
const grouped = Array
.from(document.querySelectorAll('.buy > i'), n => [ n.parentNode, n.innerText ])
.reduce((acc, n) => ((acc[n[1]] = acc[n[1]] || []).push(n[0]), acc), {});
Object.values(grouped).forEach(n => n.forEach((m, i) => m.hidden = !!i));
или
.hidden {
display: none;
}
const unique = new Set();
for (const n of document.querySelectorAll('.buy > i')) {
if (unique.has(n.innerText)) {
n.parentNode.classList.add('hidden');
} else {
unique.add(n.innerText);
}
}