Skip to content

Instantly share code, notes, and snippets.

View LeBaux's full-sized avatar

Pierre LeBaux LeBaux

View GitHub Profile
@LeBaux
LeBaux / keyworksFromUrl.js
Created July 26, 2020 20:03 — forked from johnmurch/keywordsFromUrl.js
Parse keywords from URL
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)