Saturday 10 June 2017

Collect all redirected URL of Origin URL using NodeJS

I want to retrieve a list of urls that are redirected from Origin URL X and it may have many redirected URLs but i want all list of it.

For example:

http://www.example.com/origin-url

It will redirect to

http://www.example.com/first-redirect

Again it will redirect to

http://www.example.com/second-redicect

And finally it goes to this

http://www.example.com/final-url

So what i want is list of all this URLs using NodeJs or Express

 http://www.example.com/origin-url -->> http://www.example.com/first-redirect
 -->> http://www.example.com/second-redicect -->> http://www.example.com/final-url

Give me suggestion for this and which node module should i have to use to achieve this.

Thanks in advance.



via jay.jivani

No comments:

Post a Comment