Skip to content

Commit 7a3b5bf

Browse files
authored
Update README.md
1 parent f06b8b2 commit 7a3b5bf

File tree

1 file changed

+30
-1
lines changed

1 file changed

+30
-1
lines changed

README.md

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,31 @@
11
# FileDownloader
2-
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.**
24+
```py
25+
from FileDownloader import Downloader
26+
27+
download=Downloader(url="DOWNLOAD LINK")
28+
download.save(filename="custom_name.extension")
29+
```
30+
## Thank you <3
31+
> **Hope you found this useful!**

0 commit comments

Comments
 (0)