Skip to content

Instantly share code, notes, and snippets.

@kadimi
Created September 5, 2018 19:42
Show Gist options
  • Save kadimi/57af24b7b1e598006bc96f42a1711723 to your computer and use it in GitHub Desktop.
Save kadimi/57af24b7b1e598006bc96f42a1711723 to your computer and use it in GitHub Desktop.
Remove low rated sellers from ebay search with seller info
jQuery('.s-item__seller-info-text')
.filter(function() {
let s = $(this).text();
let re = /\((.*)\) (.*)%/g;
do {
m = re.exec(s);
if (m) {
feedback_score = parseInt(m[1].replace(',', ''));
positive_feedback = parseFloat(m[2]);
}
} while (m);
return feedback_score < 1000 || positive_feedback < 98;
})
.closest('li')
.remove()
;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment