I am creating an tampermonkey userscript which grabs all the direct links of anime episodes and puts them into a textarea so I can easily import them with Internet Download Manager.
However they have recently put a redirector in place of the video direct download link, this is what happens with my ajax request now.
This is the code I am using:
$.ajax({
type: "GET",
url: "http://kissanime.com/Re?id=anZ2cnU8MTFuajUwaXFxaW5nd3VndGVxcHZncHYwZXFvMUNmUXtHT01aXGpyZTVLWmVuY0t7WlYyW3pMZG03bUljSlM7RllcbHE3aT9vNTk%3d"
}).error(function(XMLHttpRequest, textStatus, errorThrown) {
console.log(XMLHttpRequest.getResponseHeader('Location'));
// Gives me null ^
});
I somehow need to get the location it redirects me to so I can get the direct link instead of its redirector. How can I do this?