extract-redirects
v0.0.2
Published
extract redirect urls for dns-prefetching
Downloads
5
Readme
extract-redirects
install
using npm
npm i extract-redirects --save
example
log = console.log
extract = require 'extract-redirects'
await extract 'http://x.com/v1/public/click/81dayvkn999', defer e,links
log /links/
log links
await extract 'http://x.com/v1/public/click/81dayvkn999', {hosts_only:yes}, defer e,hosts
log /hosts/
log hosts
###
/links/
[ 'http://x.com/v1/public/click/81dayvkn999',
'http://affiliate.x.com/rd/r.php?sid=1823&pub=22392&c1=&c2=&c3=',
'https://www.final.com/finalurl/?affid=gos&saffid=22000' ]
/hosts/
[ 'http://x.com',
'http://affiliate.x.com',
'https://www.final.com' ]
###