mirror of
https://github.com/NohamR/gofilepy.git
synced 2026-01-09 07:48:17 +00:00
Refactored the download_files function in cli.py to separate single file and folder download logic into helper functions, improving readability and maintainability.
19 lines
482 B
Python
19 lines
482 B
Python
#!/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("QUo3a5")
|
|
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"
|
|
# )
|