-
-
Save admariner/ae103a8b8cee45033b67ec11dbd3dca5 to your computer and use it in GitHub Desktop.
Parse keywords from URL
This file contains hidden or 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
let url = "https://www.amazon.com/SanDisk-128GB-microSDXC-Memory-Adapter/dp/B073JYC4XM/"; | |
let kwparse = (url.replace('https://','').replace('http://','').replace('www','').replace('com','').split('-').join().split('/').join().split('.')).join(',').replace(/^,/, '') | |
let kwuniq = [...new Set(kwparse.split(','))].filter(function(e){return e}); | |
console.log(kwuniq) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment