0
votes

I'm trying to download a JSON file from Googledrive (https://drive.google.com/file/d/10A_pBcJxBLDVJk_L_e1HcHsc8hz38Sau/view).

When I use wget (or curl) I downloaded the file, but it is in html.

curl -L -o inventory_keywords_downloaded_adjusted.json "https://drive.google.com/file/d/13lzO4-4w479kVDx7wxa5mx7x1kxEnUUs/view?usp=sharing"

wget 'https://drive.google.com/file/d/10A_pBcJxBLDVJk_L_e1HcHsc8hz38Sau/view?usp=sharing' -O inventory_keywords_downloaded.json

I either one of those commands should yield a json file, but instead I am getting a html file.

1

1 Answers

1
votes

Try using the Google Drive direct download link instead of the sharing link:

It should be https://drive.google.com/uc?export=download&id=10A_pBcJxBLDVJk_L_e1HcHsc8hz38Sau for the link you posted.

If you only have the links in that format, you could use sed or some other method to get the ID of the file and put it in the format above.