Videos
Hello!
I have Google Drive and need to get the public URL open to anyone, direct download. Something like this: https://drive.google.com/uc?export=download&id=17PLZNiFN3Nabh2MYB29cN_XKA7VtbbGt
I can get it by right click, then share, then configure to open for everyone, and then modifying the URL to the direct download this takes Loya of time for many files.
Any app that can get me this easily?
Thanks!
I found an extension that will open multiple URLs. I changed download settings to not confirm and then I was able to paste a list of URLs in the format https://drive.google.com/uc?export=download&id=[TheFileID] to get them to all download.
Chrome extension called "Open Multiple URLs"
https://chrome.google.com/webstore/detail/open-multiple-urls/oifijhaokejakekmnjmphonojcfkpbbh/related?hl=en
The steps
Install gdown with
pip install gdown- the command worked in a Standard Windows 11 PowerShell for me. (Make sure You have Python and Pip installed for this command)Make a .txt file with Your links, listed in the following manner:
https://drive.google.com/file/d/someID/view
https://drive.google.com/file/d/someotherID/view
and so on - Don't put anything that is not a link here
Edit the variables at the top in the below script to fit Your needs.
Run it
If everything goes right - You'll find Your files in the directory You specified
The Script
from os import chdir
from typing import List
from gdown import download
from requests.exceptions import MissingSchema
my_links_file_path: str = r'C:\Users\Jakub\Desktop\a\download_links.txt' # EDIT THIS!
my_output_directory_path: str = r'C:\Users\Jakub\Desktop\a' # EDIT THIS!
def google_drive_bulk_download(links_file_path: str, output_directory_path: str):
try:
file = open(links_file_path, 'r')
except FileNotFoundError:
print(f"\n!!! The File '{links_file_path}' is Invalid!\n")
return
try:
chdir(my_output_directory_path)
except FileNotFoundError:
print(f"\n!!! The File '{output_directory_path}' is Invalid!\n")
return
file_lines: List[str] = [stripped_line for stripped_line in
[line.strip() for line in file.readlines()]
if stripped_line]
file_lines_count: int = len(file_lines)
print('\n\n==> Started Downloading!\n')
for i, url_raw in enumerate(file_lines, start=1):
download_url: str = url_raw.strip()
print(f'\n-> Downloading... [{i}/{file_lines_count}]')
try:
download(url=download_url, quiet=False, fuzzy=True)
except: # If anyone knows what exact errors can gdown raise then please edit this answer to be more explicit or leave a comment. For now I will leave the 'bad practice' broad error catch
print(f"!!! The URL '{download_url}' is Invalid or Failed To Download!")
print('Finished!')
print('\n\n==> Finished Downloading!')
google_drive_bulk_download(my_links_file_path, my_output_directory_path)
The Notes
This method worked for me. On Windows 11, Python 3.10 and Python 3.11.
This script may or may not work with other formats of google drive links.
You may want to try using a VPN if the Downloads fail - I had to.
There are many browser extensions that help You list the URLs of Your currently open browser tabs. No need to do it by hand.