Skip to content

imarban/pget

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pget

Python program that emulates the wget linux command. This program allows continue or resume a download where it failed or was interrupted.

This program is not intended to be used in a production system. It aims to show how resuming downloads works.

Installation and Getting Started

  • requirements
  • clone this repo
  • usage

Requirements

  • Python 2.7 is required to run the code

Clone the repo

$ git clone https://github.com/imarban/pget.git
$ cd pget

Basic usage

$ python client.py <url> 

Replace for the actual url you want to download. You will get the file downloaded to the current path.

Usage

The program accept some parameters at the invoking time

  • -c --continue If you are trying to continue a download which was interrupted you need to set this flag. If you don't use this flag the previous download attempts for the same resource are going to be deleted.
  • -o --outfile If this argument is passed, the name of the file where the download content is written is going to be changed. If this parameter is absent the file name will be extracted from the url last part.
  • -v --verbose. It sets the logger level to DEBUG for seeing more information.
$ python client.py <url> -c -o <filename.extension> -v 

You will get the file downloaded to the current path

Resources

The next are some resources that were useful at the time I was writing this program:

About

Python program that works like wget

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages