(UNDER CONSTRUCTION)
Simple python Megatools wrapper
pip install megatools
from megatools import Megatools
megatools = Megatools() # Use megatools command in path
# OR
megatools = Megatools(executable="D:\\megatools\\megatools.exe")
filename = megatools.get_filename("https://mega.nz/#!PpVB0CTZ!bwa51HbeKaVjuCff_lzbH4nQnV27uBxmcF89PnnACvY")
# boot_T295XXU2ASJ1.img.tar
# Basic usage
megatools.dl("https://mega.nz/#!PpVB0CTZ!bwa51HbeKaVjuCff_lzbH4nQnV27uBxmcF89PnnACvY")
# With all optional arguments and their default values
megatools.dl("https://mega.nz/#!PpVB0CTZ!bwa51HbeKaVjuCff_lzbH4nQnV27uBxmcF89PnnACvY",
path=None,
no_progress=False,
print_names=False,
disable_resume=False,
username=None,
password=None,
reload=False,
limit_speed=0,
proxy=None,
netif=None,
ip_proto=None,
config=None,
ignore_config_file=False,
display_output=False,
debug=None,
version=None)
For more informations, please see megatools dl command
megatools dl --help
# Basic usage
files = megatools.dl("[email protected]", "mysuperpassword")
# /Root
# /Root/document.txt
# /Root/movie.mp4
# /Root/test
# /Root/test/document.txt
# /Root/test/movie.mp4
# /Trash
# Specified folder
files = megatools.dl("[email protected]", "mysuperpassword", folder="/Root/test")
# /Root/test
# /Root/test/document.txt
# /Root/test/movie.mp4
# With all optional arguments and their default values
files = megatools.ls(
"[email protected]",
"mysuperpassword",
folder="",
names=False,
recursive=False,
long=False,
header=False,
human=False,
print0=False,
export=False,
limit_speed=0,
proxy=None,
netif=None,
ip_proto=None,
config=None,
ignore_config_file=False,
debug=None,
version=False,
)
For more informations, please see megatools ls command
megatools ls --help
- Better get_filename algo, especially about error/returncode