I would like to do a scraping on google colab and download the folder where I collected the images to the local pc.Each file can be downloaded in files.download(), but I don't know how to download each folder together, so please let me know
python web-scraping google-colaboratory
According to this article, there is no approval, but it seems that you can download it as a .zip or .tar file.
Original article How do I download multiple files or an entire folder from Google Colab?/Translation How do I download multiple files or entire folders from Python 3.x-Google Colab?
Is this a concise answer?
I have created a zip file:
!zip-r/content/file.zip/content/Folder_To_Zip
Than I have downloaded that zip file:
from google.colab import files
files.download("/content/file.zip")
If you don't need a subfolder, you can do it in this for
loop.
Download files in folders in bulk
For more information:
Summary of data operations between GoogleDrive and Collaboration PyDrive
Summary of data input and output for Collaborative
© 2024 OneMinuteCode. All rights reserved.