Skip to main content

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 a filename parameter that is set to None 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

PyFileDownloader-1.2.0.tar.gz (2.4 kB view hashes)

Uploaded Source

Built Distribution

PyFileDownloader-1.2.0-py3-none-any.whl (3.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page