If your in a situation like I just described on the subject, you will be thanking me and the person I am about to link too.
I was in a situation today where I needed to download some large files from Google Drive, but needed it to be done from the Linux command line with wget. I could see how it worked, but didn’t have the time to sit down and figure it out exactly. After a bit of searching I came across a blog post here by someone else. They already did the hard yards and wrote a perl script.
All I can say is a big thank you to the author on that blog who wrote the gdown.pl perl script. It worked great. Saved me a few hours in fact.
In addition I also worked out that if you take the id=value from the Google Drive File Share link, you can data mine a bit of information associated to the file in question.
Check out the page here, and use the Try it link. Insert in you File ID and it will tell you from which account its being shared etc.