Skip to content

sudobooo/page_loader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hexlet tests and linter status:

Python CI Maintainability Test Coverage

Page-loader

The third project written for the academic purposes of a Hexlet's course on learning a programming language Python.

About the project

Page-loader is web page downloader.

  • The page is downloaded in html format.
  • Content is downloaded only that which is located on the same domain.
  • Can be used as CLI tool or library

How to install and use

Install

python3 -m pip install git+https://github.com/sudobooo/python-project-lvl3

Use as a library

from page_loader import download

path_to_page = download(url, actual_path=os.getcwd())
print(path_to_page)

Use as a CLI

usage: page-loader [options] <url>

description: web page downloader

positional arguments:
  url

optional arguments:
  -h, --help            show this help message and exit
  -V, --version         output the version number
  -o [dir], --output [dir]
                        output dir (default: working directory)

Logging

All error logs are written to .page-loader-errors.log. The file is created in the working directory.

Demonstration of the program

Asciinema page download

asciicast

Asciinema logging page-loader

asciicast