a. open Google Drive

b. Right-click on your file

c. Click on Get Link

d. Make sure your file is available for “Anyone with the link

get shareable link

e. Click on Copy Link

2. Install gdown

!pip install gdown

3. Download the file in google drive using Python

import gdown

url = 'https://drive.google.com/file/d/1uFTzwFc3tmS-D7azjMiJcxSfn71BPqKt/view?usp=sharing'
output_path = 'graph_ML.pk'
gdown.download(url, output_path, quiet=False,fuzzy=True)

Downloading...
From: https://drive.google.com/uc?id=1uFTzwFc3tmS-D7azjMiJcxSfn71BPqKt
To: /content/graph_ML.pk
100%|██████████| 1.94G/1.94G [00:23<00:00, 82.2MB/s]
'graph_ML.pk'

4. Download a folder in google drive using Python

import gdown
url = "https://drive.google.com/drive/folders/1HWFHKCprFzR7H7TYhrE-W7v4bz2Vc7Ia"
gdown.download_folder(url, quiet=True, use_cookies=False)

['/content/ihpperson_data_with_rules/civil_servant.csv',
 '/content/ihpperson_data_with_rules/eunuch.csv',
 '/content/ihpperson_data_with_rules/general.csv',
 '/content/ihpperson_data_with_rules/remain_person.csv',
 '/content/ihpperson_data_with_rules/special_general.csv']

favicon.ico