Coder Social home page Coder Social logo

andresusanto / easydl Goto Github PK

View Code? Open in Web Editor NEW
65.0 65.0 14.0 103 KB

Node.js file downloader with built-in parallel downloads and resume support

License: MIT License

TypeScript 99.73% JavaScript 0.27%
download download-manager downloader downloading easy-to-use nodejs parallel resumable

easydl's People

Contributors

andresusanto avatar bbreukelen avatar brettcleary avatar td-tomasz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

easydl's Issues

Build Progress can't reach 100%

image

Hi, I am using electron and when the file is merge, build progress can not reach 100% even after I use easydl.destroyed() and rerun easydl. But, it will be success if I redownload it with cleaning the chunk first.

Any thought on this?

Using GET instead of HEAD

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 to set proxy?

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!

Possible EventEmitter memory leak detected.

how to solve this issue?

ERROR

(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()

clean does not remove all files

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.

How to disable SSL verification?

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
  }),
}

Enable httpOptions to be an async function

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

Error: EPERM: operation not permitted, when download file

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.