Comments (21)
Yeah, google has been doing this from a long time. Authenticated users have no limitations on download of public files/folders.
Applies to shared drive/non shared drive.
Now that you have confirmed that the issue is totally because of authentication, just have to implement authentication. Would be easy to do like google-drive-upload.
Again for this issue, will start working on it next week.
from gdrive-downloader.
Ooh, i misunderstood your problem. Seems like i have to handle it seperately if more than 100 files.
from gdrive-downloader.
Man, awesome stuff, working perfectly fine!
Thanks for working on this ❤️
from gdrive-downloader.
I looked into #7 before creating this and it seems he ran into the same problem as I did but didn't provide any details if that URL was publicly accessible or from his own drive.
from gdrive-downloader.
Confirmed, this only happens unauthenticatedly, can confirm through an incognito session as well, if the user is logged in, doesn't happen, and can download easily.
from gdrive-downloader.
Also, I can confirm that when I'm authenticated as any user and not admin/member of that gdrive, I can download the file multiple times without any quota errors.
Happens only in incognito or unauthenticatedly, we might have to implement a check or something for shared drives. I've yet to test this all on personal drive, I'm sure there won't be any probs there.
from gdrive-downloader.
Great, sure!
from gdrive-downloader.
Install test gdl
curl -Ls --compressed https://github.com/Akianonymus/gdrive-downloader/raw/master/install.sh | sh -s -- -b wip -c test_gdl
Use test_gdl
command to test.
Added -a / --auth flag to use authentication.
Read https://github.com/Akianonymus/gdrive-downloader/tree/wip#authentication for more info.
from gdrive-downloader.
Awesome, works perfectly fine with 0 fails.
Thanks for working on this!
from gdrive-downloader.
Unrelated question:
Have you taken a look at integrating API key rather than Oauth tokens for GDL? It's just that the process takes longer and you need a refresh token when you're using the saved config file after some time.
https://console.cloud.google.com/apis/credentials/
For the API key, just export it in environmental variables or we can take it as a input from user.
from gdrive-downloader.
Hey, so due to some reason, it is only downloading 100 files from the folder. I created 1000 test files, uploaded them in a directory and it is downloading 100 from every directory.
You can use the shared drive link for testing further.
Authenticated:
test_gdl https://drive.google.com/open?id=1JTslaDrtoFNnOC9APuRxQXnLv55cN8ay -p 20 --auth
Unauthenticated:
test_gdl https://drive.google.com/open?id=1JTslaDrtoFNnOC9APuRxQXnLv55cN8ay -p 20
from gdrive-downloader.
Files count:
from gdrive-downloader.
Unrelated question:
Have you taken a look at integrating API key rather than Oauth tokens for GDL? It's just that the process takes longer and you need a refresh token when you're using the saved config file after some time.
https://console.cloud.google.com/apis/credentials/
For the API key, just export it in environmental variables or we can take it as a input from user.
Yeah, it should be simple enough, just have to add key=api_key
to url instead of access_token header.
E.g: curl -o filename "${API_URL}/drive/${API_VERSION}/files/${file_id}?alt=media&key=${API_KEY}"
If i remember correctly, api keys have less qouta for downloading files, have to recheck.
from gdrive-downloader.
Hey, so due to some reason, it is only downloading 100 files from the folder. I created 1000 test files, uploaded them in a directory and it is downloading 100 from every directory.
You can use the shared drive link for testing further.
Authenticated:
test_gdl https://drive.google.com/open?id=1JTslaDrtoFNnOC9APuRxQXnLv55cN8ay -p 20 --auth
Unauthenticated:
test_gdl https://drive.google.com/open?id=1JTslaDrtoFNnOC9APuRxQXnLv55cN8ay -p 20
It's due to because you are doing too much parallel downloading, decrease that value and use retry flag to handle possible errors due to api limitation.
e.g: test_gdl 1JTslaDrtoFNnOC9APuRxQXnLv55cN8ay -p 100 -R 10
and superfast without any errors ( hopefully ) .
from gdrive-downloader.
The thing is all the files download easily, but the total count it is showing is 100.
I downloaded another directory with subfolders, each having 50+ files in them and 4 total folders. That worked fine, maybe 100+ doesn't work?
from gdrive-downloader.
Just to add here, the original directory has 1000 files.
Tested on two other directories with 176 and 376 files, it downloaded only 100 in them too.
from gdrive-downloader.
Yosh, man oh man I'm good at QA 😂
from gdrive-downloader.
So, i have added two new flags, -o/--oauth and -k/--key.
-o for oauth authentication and --key for using api key.
Providing api key is optional, if not provided, it will use in script api key.
See more info here: https://github.com/Akianonymus/gdrive-downloader/tree/wip#usage
To test, update the test_gdl
command with test_gdl -u
.
from gdrive-downloader.
I have pushed fixes for 100 files problem, update and try that too.
from gdrive-downloader.
Added option to save custom api key in config file.
from gdrive-downloader.
Awesome, lemme try.
from gdrive-downloader.
Related Issues (20)
- Oauth not working HOT 7
- [FEATURE] Dry run
- Is it possible to have ls function? HOT 2
- Command line param to easily refetch refresh token HOT 4
- How to put '. /home/$USER/.bashrc' in a sh script HOT 1
- Support for downloading documents in required formats HOT 2
- cd: - : invalid option` HOT 1
- [Feature] Batch Downloading HOT 2
- Incomplete download - Virus check HOT 7
- Stops at 1000 items HOT 5
- cannot work with large files HOT 1
- Change Google Remote OAuth - OOB Method has been deprecated HOT 3
- /.gdrive-downloader/gdl: line 18: 2: Missing string HOT 5
- Error /tmp/tmp.xxxCOOKIE: No such file HOT 3
- Attempting to use gdl currently results in an empty folder HOT 2
- Info: Account names can only contain alphabets / numbers / dashes. HOT 1
- Cannot Download Large Folder HOT 1
- /home/user/.gdrive-downloader/gdl: line 259: ${_get_export_mime "${DOCUMENT_FORMAT}"}: bad substitution ? HOT 2
- chmod flags not compatible with mac? HOT 4
- Implement A Proper Progress Bar HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gdrive-downloader.