Advertisement
borhannezami

02_Cloud_Download

Nov 7th, 2023 (edited)
842
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.55 KB | None | 0 0
  1. import os
  2.  
  3. # Create target Directory if it doesn't exist
  4. if not os.path.exists('/content/drive/MyDrive/Cloud-Downloads'):
  5.     os.mkdir('/content/drive/MyDrive/Cloud-Downloads')
  6.  
  7. os.chdir('/content/drive/MyDrive/Cloud-Downloads')
  8.  
  9. # Read links from the text file
  10. with open('/content/drive/MyDrive/Cloud-Downloads/links.txt', 'r') as file:
  11.     links = file.readlines()
  12.  
  13. # Remove any leading/trailing whitespace and newline characters
  14. links = [link.strip() for link in links]
  15.  
  16. for link in links:
  17.     !wget -c {link} --no-check-certificate
  18.    
  19.  
  20.  
  21.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement