I\'m trying to create a script to convert a regular google drive share URL to a direct download URL. The raw URL looks like this:
https://drive.google.com/file/d
You can extract the ID with this regex:
regex = "([\w-]){33}|([\w-]){19}" match = re.search(regex,url)
33 chars are for normal drives and 19 chars are for team drives After that you can put the extracted ID in whatever formatted url you make