Skip to content

page-loader is a simple cli-utility to download web pages

Notifications You must be signed in to change notification settings

sgmdlt/python-project-3

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hexlet tests and linter status:

Python CI

page-loader

page-loader is a simple cli-utility to download web pages


Installation

Use the package manager pip to install page-loader.

pip install --user git+https://github.com/sgmdlt/python-project-3.git

Usage

As library function

from page_loader import download

file_path = download('https://ru.hexlet.io/courses', '/var/tmp')
print(file_path)  # => '/var/tmp/ru-hexlet-io-courses.html'

As CLI util

$ page-loader --help
usage: page-loader [options] <url>

Download web-pages and saves localy

positional arguments:
  url                   url to download

optional arguments:
  -h, --help            show this help message and exit
  -o OUTPUT, --output OUTPUT
                        output dir (default: [current directory])
  -l {DEBUG,WARNING}, --log-level {DEBUG,WARNING}
                        sets log level (default: WARNING)


$ page-loader --output /var/tmp https://ru.hexlet.io/courses
/var/tmp/ru-hexlet-io-courses.html

Usage example

asciicast

About

page-loader is a simple cli-utility to download web pages

Resources

Stars

Watchers

Forks