asiniy
Download - the easiest way to download files from the internet
Hey there!
I wrote a download elixir package which does exactly what its name about - an easy way to download files.
I saw solutions about how to do it with HTTPoison but these solutions have disadvantages:
- The whole response is loading to the RAM, and only after then is going to the File.write/1. You have to choose async HTTPoison request to escape high memory consumption.
- There is no restriction of the file size to download. If you handle, saying, user input and then you’re trying to download any file user provided, your server can go down for downloading a file which has 1TB size.
download depends on HTTPoison and successfully sidestep these issues.
Enjoy 
Most Liked
NobbZ
This project is about downloading a single resource from the specified URL. It does not any magic to determine what the resource actually is. It gets saved as is and then you get path of the saved file.
This is in contrast to using HTTPoison without thinking about it and loading the full response into RAM.
One can get the same behaviour with HTTPosion directly though using async requests, but this package makes it a bit easier to process those.
gon782
Important to note is that with, for example, youtube-dl you also get support for downloading from Twitch and vimeo.
Eiji
@asiniy: Nice, but I have a few ideas:
- Support for POST requests, because some pages requires it
- Support for parameters (GET) and data (POST), because it’s easier to read code (parameters) + some pages requires POST with data
- Support for finders, for example:
Download.from(url, finder: Download.Finders.Video) - Support for Traditional units
NobbZ
I do not like that page you linked @Eiji, it seems to confuse metric and binary prefixes.
Even gives megabyte as an example for binary and mebibyte as example while on the linked pages about binary and metric prefixes they are the other way round.
So I am not sure what you exactly mean by “traditional units”?
outlog
I would think you just downloaded the html file.
You probably need to use something like https://github.com/rg3/youtube-dl/ to get to the video file - you might want to use Porcelain to interface it https://github.com/alco/porcelain







