You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A Python module to download any file-type from the internet
2
+
**A Python module to download any file-type from the internet**
3
+
4
+
## How To Download
5
+
-**Downloading a File**
6
+
```py
7
+
from FileDownloader import Downloader
8
+
9
+
download=Downloader(url="DOWNLOAD LINK")
10
+
11
+
headers=download.headers()
12
+
13
+
is_downloadable=download.validate_url()
14
+
15
+
download.save()
16
+
```
17
+
## Code Breakdown
18
+
-**`.headers()` returns you about the file data like filename, filetype, filesize**
19
+
-**`.validate_url()` returns True if the provided url is valid**
20
+
-**`.save()` downloads the file and saves it with the name provided in the file header**
21
+
22
+
## Save A File With A Custom Name
23
+
-**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.**
0 commit comments