I'm a new NodeJS and JS user. For my Web API project, I'm utilising NodeJS. My project, which makes use of the opensubtitles API. The Opensubtitles API returns a URL for a.*gz file. I'd like to save this URL's file to a local folder. I tried a couple other approaches. I was not, however, successful. I saved the file locally, however some of the language characters were corrupted.
Sample file Url:
If I download it with a web browser, the characters are coming out properly.
My sample code:
const out = fs.createWriteStream('out.srt');