mirror of
https://github.com/NohamR/gofilepy.git
synced 2026-01-10 08:18:18 +00:00
Add download support to CLI and client
Implemented file and folder download functionality in the CLI and GofileClient, including new CLI arguments for downloading by URL or content ID and specifying output directory.
This commit is contained in:
18
test_download.py
Normal file
18
test_download.py
Normal file
@@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Test script for download functionality."""
|
||||
|
||||
from gofilepy import GofileClient
|
||||
|
||||
# Test downloading from the folder URL
|
||||
client = GofileClient()
|
||||
|
||||
# Get folder contents
|
||||
contents = client.get_contents("GxHNKL")
|
||||
print("Folder contents:")
|
||||
print(contents)
|
||||
|
||||
# You can also download programmatically like this:
|
||||
# client.download_file(
|
||||
# download_url="https://store-eu-par-6.gofile.io/download/web/folder-id/file.py",
|
||||
# output_path="./downloaded_test.py"
|
||||
# )
|
||||
Reference in New Issue
Block a user