Skip to content

Instantly share code, notes, and snippets.

@zerolx
Last active March 30, 2020 14:55
Show Gist options
  • Save zerolx/46db0dfc9bd13f9cd5f36245f2d67778 to your computer and use it in GitHub Desktop.
Save zerolx/46db0dfc9bd13f9cd5f36245f2d67778 to your computer and use it in GitHub Desktop.
How to download from Amazon/Github without stress with timeouts
# Some servers like Amazon (Github use Amazon) set timeout limits to downloads
# If you must download some big file (lets say 500mb) you will be kicked out in middle of download
# That will always happen, blocking you from download.
# To work around this problem you will only need a program that listem for timeouts and can continuate where stops
# I will use Wget (linux) for that
wget -c -O <filename to write> --read-timeout=10 <url>
# -c tells wget to continue where stops
# -O tells wget to write the contents to file specified
# --read-timeout is the value in seconds to wait for data, if the server block then after 10 seconds the connection will be closed and restarted automatically
## Note that the Amazon can sent a 403 Forbidden if you keep connecting to many times (seens like a DDoS if you do that)
## If you get 403 then you will need restart the download manually (and yes, you will begin where stopped)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment