A Python module to download any file-type from the internet.
Project description
PyFileDownloader
A Python module to download any file-type from the internet
How To Download
- Downloading a File
from PyFileDownloader import Downloader
download=Downloader(url="DOWNLOAD LINK")
headers=download.headers()
is_downloadable=download.validate_url()
download.save()
Code Breakdown
.headers()
returns you about the file data like filename, filetype, filesize.validate_url()
returns True if the provided url is valid.save()
downloads the file and saves it with the name provided in the file header
Save A File With A Custom Name
- If you would like to download and save a file with a custom name, you can do so with the
.save()
method. It takes afilename
parameter that is set toNone
by default.
from PyFileDownloader import Downloader
download=Downloader(url="DOWNLOAD LINK")
download.save(filename="custom_name.extension")
Thank you <3
Hope you found this useful!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file PyFileDownloader-1.1.0.tar.gz
.
File metadata
- Download URL: PyFileDownloader-1.1.0.tar.gz
- Upload date:
- Size: 2.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.7.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2df0a81f517753d532a030d1f8cce15b8ec2b17ae4eae89435c01108787735ca |
|
MD5 | b33a1b77b4174f55a989f7c68d3c8302 |
|
BLAKE2b-256 | aaa30706ac17cd9587a6be2211a764e8345627c0766914a703e95850c55310f5 |
File details
Details for the file PyFileDownloader-1.1.0-py3-none-any.whl
.
File metadata
- Download URL: PyFileDownloader-1.1.0-py3-none-any.whl
- Upload date:
- Size: 3.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.7.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 03840615de1f447995df3164f5febb0bfc455661b3ad327258c38b71c3915331 |
|
MD5 | 079f3b68f7cd3a904bd28905a4926db1 |
|
BLAKE2b-256 | ed09cea7c22893c64b1ef789027faeeb601a7be2a250d20f0555152a536808c5 |