Netflix - subtitle downloader

Allows you to download subtitles from Netflix

< Σχολιασμός για τον κώδικα Netflix - subtitle downloader

Ερώτηση/σχόλιο

§
Δημοσιεύτηκε: 24/11/2022

Hi,

Is it possible to intercept fetch() instead of XMLHttpRequest.open?
Can you give me a hint?

Best regards
/gru

const injection = () => {
//
((open) => {
XMLHttpRequest.prototype.open = function() {
if(arguments[1] && arguments[1].includes('/metadata?'))
this.addEventListener('load', () => { window.dispatchEvent(new CustomEvent('netflix_sub_downloader_data', {detail: {type: 'metadata', data: this.response}}));
}, false);
open.apply(this, arguments);
};
})(XMLHttpRequest.prototype.open);
}

Tithen-FirionΔημιουργός
§
Δημοσιεύτηκε: 24/11/2022

I don't see how it has anything to do with my script. There are other places to ask questions like that, like StackOverflow.

§
Δημοσιεύτηκε: 24/11/2022

This has nothing to do with your script, I was just curious but figured it out myself.

Δημοσίευση απάντησης

Συνδεθείτε για να δημοσιεύσετε μια απάντηση.