Created
September 5, 2018 19:42
-
-
Save kadimi/57af24b7b1e598006bc96f42a1711723 to your computer and use it in GitHub Desktop.
Remove low rated sellers from ebay search with seller info
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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