downloadgoogle-colaboratoryfile-extensionaria2

Save files with specific extension using aria2


PROBLEM: I was using a Google Colab based downloader using Aria2 to download certain files to Google Drive. The problem is downloaded files have no extension, and are being treated by Drive as binary files, even after renaming the downloaded file with its extension. Also, I couldn't find another aria2 downloader which can do this.

If anyone could tell me how to modify the code...


Solution

  • You can make your own code, I'll show you. First install Aria2 using this command

    %%capture
    ! sudo apt-get install aria2
    

    Then you'll have to link your google drive (using rclone or command method, whichever one you prefer)

    ! aria2c -x16 --summary-interval=5 -d "your destination path with the quotes" https://i.imgur.com/IR6BcQb.png
    

    replace that image link with the link of your file.