Skip to content

Commit

Permalink
Fix Google Drive URL to avoid Virus scan warning (#3787)
Browse files Browse the repository at this point in the history
  • Loading branch information
albertvillanova committed Mar 7, 2022
1 parent bc7e6a8 commit b60c99c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/datasets/utils/file_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -574,6 +574,9 @@ def get_from_cache(
url += "&confirm=" + v
cookies = response.cookies
connected = True
# Fix Google Drive URL to avoid Virus scan warning
if "drive.google.com" in url and "confirm=" not in url:
url += "&confirm=t"
# In some edge cases, head request returns 400 but the connection is actually ok
elif (
(response.status_code == 400 and "firebasestorage.googleapis.com" in url)
Expand Down

0 comments on commit b60c99c

Please sign in to comment.