andresusanto / easydl Goto Github PK
View Code? Open in Web Editor NEWNode.js file downloader with built-in parallel downloads and resume support
License: MIT License
Node.js file downloader with built-in parallel downloads and resume support
License: MIT License
Example:
In a browser this URL results in downloading a 3MB ZIP file. However when using easydl
the redirects fail and it throws an error logging 403.
There are certain websites that do not permit the use of the HEAD method and instead respond with a 405 Method Not Allowed
error. In such cases, we can consider using the GET method as an alternative, and retrieving the content-length
header at the earliest to divide the connections accordingly.
How can I pass proxy credentials, server, and port to easydl? I read the http docs and tried with some options, but didn't work.
An example would help. Thanks!
how to solve this issue?
(node:20940) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 error listeners added to [WriteStream]. Use emitter.setMaxListeners() to increase limit
(Use node --trace-warnings ...
to show where the warning was created)
import EasyDl from 'easydl'
const main = async () => {
try {
const completed = await new EasyDl('https://code.jquery.com/jquery-3.6.4.js', 'test/a.js', { connections: 5, maxRetry: 5 }).wait()
console.log('Completed:', completed)
} catch (err) {
console.log('ERROR:', err)
}
}
main()
On windows when running clean from easydl/dist/utils
after finishing a download, some files are not deleted. These files are still in use by EasyDL and the following error is given Error: EPERM: operation not permitted, stat <chunk path here>
. These files cannot be deleted manually from file explorer either. A similar error is given.
When the program using EasyDL is closed, the files are deleted which leads me to suspect they are not being released after a download is finished by easydl.
This is an issue because it prevents downloading the same file again since the chunk names conflict and the existing file cannot be overwritten/deleted.
1.0.2
Hi,
I'm downloading files from a website and the error handler keeps on returning this error:
Error: 140460750428696:error:100003e8:SSL routines:OPENSSL_internal:SSLV3_ALERT_CLOSE_NOTIFY:../../third_party/boringssl/src/ssl/tls_record.cc:592:SSL alert number 0
Does anyone know what options to pass to httpOptions
to disable SSL verification or if there are any built-in option to do it?
I've set this option but it didn't help:
httpOptions: {
agent: new https.Agent({
rejectUnauthorized: false
}),
}
This would allow returning different headers per connection
Change
let opts = this._opts.httpOptions;
and other usage of it as well to
let opts = await isFunction(this._opts.httpOptions) ? this._opts.httpOptions(id) : this._opts.httpOptions;
isFunction should check for both functions and async function
It seems to me that no events are emitted if the file exists and existBehavior = 'ignore', is this by design?
What is the license for this library?
I have a problem with a Windows device, when the file download process is running, suddenly the process stops and an error appears [easydl][catch2] > Error: EPERM: operation not permitted, stat 'C:\Users\xxx\AppData\Local\ Temp\downlaodfolder\appfolder\downloadfile.zip.$$7'
and when I close, then download again, the download process is stuck and there is an error: [error] [Corrupted] when downloading downloadfile.zip
can you provide a solution for this problem?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.