title: How to download files to Google Drive using Google colab?
body: <p>I've been using this code to mount Colab with Google Drive and download any file by pasting in download URL but I have noticed that it take quite long even though the files are few megabytes in size. Is there anything that can be done to improve it.</p>
  
  <pre><code>**First cell:**
  from google.colab import drive
  drive.mount('/content/gdrive')
  root_path = 'gdrive/My Drive/' 
  
  **Second cell:**
  import requests  
  file_url = "DOWNLOAD URL HERE"
  
  r = requests.get(file_url, stream = True)  
  
  with open("/content/gdrive/My Drive/FILE NAME HERE", "wb") as file:  
      for block in r.iter_content(chunk_size = 1024): 
           if block:  
               file.write(block)
  </code></pre>