LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-12-2020, 12:13 AM   #1
orangepeel190
Member
 
Registered: Aug 2016
Posts: 69

Rep: Reputation: Disabled
Download File from Google Drive


Hi All,

I have tried searching the forums - but when I did the search resulted in a website error. Sorry if its a double up but at this point in time, I cannot tell/search for results.


I am wishing to download a publicly accessible file stored on Google Drive.

I thought that I was downloading it correctly, however upon closer inspection, the file just seems to be HTML. I am not sure if there is some server-side encoding/compression happening or redirection that is preventing me from downloading the file.

Here is the file that gets downloaded:

I have tried searching the Forums (but appears the search function is currently down).

I thought that I will pulling down the Google Drive file correctly - however upon closer inspection, it simply looks like HTML code
Quote:
<!DOCTYPE html><html lang=en><meta charset=utf-8><meta name=viewport content="initial-scale=1, minimum-scale=1, width=device-width"><title>Error 400 (Bad request)!!1</title><style>*{margin:0;padding:0}html,code{font:15px/22px arial,sans-serif}html{background:#fff;color:#222;padding:15px}body{color:#222;text-align:unset;margin:7% auto 0;max-width:390px;min-height:180px;padding:30px 0 15px;}* > body{background:url(//www.google.com/images/errors/robot.png) 100% 5px no-repeat;padding-right:205px}p{margin:11px 0 22px;overflow:hidden}pre{white-space:pre-wrap;}ins{color:#777;text-decoration:none}a img{border:0}@media screen and (max-width:772px){body{background:none;margin-top:0;max-width:none;padding-right:0}}#logo{background:url(//www.google.com/images/branding/googlelogo/1x/googlelogo_color_150x54dp.png) no-repeat;margin-left:-5px}@media only screen and (min-resolution:192dpi){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat 0% 0%/100% 100%;-moz-border-image:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) 0}}@media only screen and (-webkit-min-device-pixel-ratio:2){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat;-webkit-background-size:100% 100%}}#logo{display:inline-block;height:54px;width:150px}</style><div id="af-error-container"><a href=//www.google.com><span id=logo aria-label=Google></span></a><p><b>400.</b> <ins>That’s an error.</ins><p>The server cannot process the request because it is malformed. It should not be retried. <ins>That’s all we know.</ins></div>
Malformed?? The last bit - Which part - the website or the attempted download?

I am wishing to use Curl...?

Code:
/usr/bin/curl -SkLo $SAVEFILE https://drive.google.com/drive/folders/lotsoflettersandnumbers/$DOWNLOAD_FILE
Is there a work around to get this file (Audio file) downloaded correctly? or a trick/tip?

Any help/guidance would be appreciated
** Apologise for any typos - on iPad then Mac with fat fingers! **

Last edited by orangepeel190; 07-12-2020 at 12:14 AM.
 
Old 07-12-2020, 02:00 AM   #2
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Did you try the suggestions in https://stackoverflow.com/questions/...wget/48133859?

By the way, I have never tried it. I just googled the question. On an ipad, too!
 
Old 07-12-2020, 04:05 AM   #3
orangepeel190
Member
 
Registered: Aug 2016
Posts: 69

Original Poster
Rep: Reputation: Disabled
Thanks for your reply.

Yes, I have browsed and tried most of the suggestions on that webpage.
A lot reference Google Docs, however I cannot see many successful links to Google Drive -- similar to:
https://drive.google.com/drive/folde...e_to_download>

Not sure if there has been a "recent" change in Google - however the link where the files are viewable on Google Drive - the URL does not have any reference to triggers such as "id=" and as you can see, the URL, where the files are, does not start with https://drive.google.com/uc?

I have browsed and searched the curl dump of the URL where the file is stored (in the google drive folder) - however I cannot see any reference to any identifiable identification/addresses etc etc to assist with narrowing down a workable download URL.

Anyone had recent luck with download scripts and Google Drive?

Last edited by orangepeel190; 07-12-2020 at 04:06 AM.
 
Old 07-12-2020, 04:24 AM   #4
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
This is another reason why people should absolutely avoid Google and its products.
They make it deliberately hard to auomate such things. They want you to use a browser (preferably their own) and click on things (meanwhile javascript helps them aquire your data, which their business is based on).

That said, you can try gdrive.
 
Old 07-12-2020, 07:22 AM   #5
shruggy
Senior Member
 
Registered: Mar 2020
Posts: 3,670

Rep: Reputation: Disabled
I'd probably start with rclone and see what it would put into rclone.conf.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: How To Speed Up Google Drive OCamlFUSE (Tool To Mount Google Drive On Linux) LXer Syndicated Linux News 0 06-27-2019 06:20 PM
[SOLVED] Rsyncing to Google Drive Using google-drive-ocamlfuse scottm7 Linux - Newbie 5 10-27-2017 12:34 PM
LXer: Mount Google Drive On Linux With Google Drive Ocamlfuse Client LXer Syndicated Linux News 0 09-11-2017 01:25 PM
LXer: Google Reader: Google Giveth and Google taketh away. Keep Calm and Carry On LXer Syndicated Linux News 0 04-09-2013 06:41 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:19 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration