It takes almost 10 seconds to download the audio file from here using NodeJS, whereas the same download takes less than a second using the browser. I've tried a variety of request libraries, so it's possible that the source slows down non-browser requests??
Would it be feasible to imitate a browser request or adjust certain settings such that the NodeJS download is as fast as the browser download if this is the case? Thanks!
EDIT: I've tried the following code:
https.get({
host: q.host,
path: q.path,
headers: { 'User-Agent': 'Mozilla/5.0'}
}, (response) => {
response.pipe(filePath).on('finish', () => {
console.log('done')
})