From 3cdc1d018d7381a5eb052d5e3eba332f5da9ddaa Mon Sep 17 00:00:00 2001 From: pinto0309 Date: Sat, 26 Mar 2022 11:09:18 +0900 Subject: [PATCH] Support for Google Drive specification changes --- 271_HRNet/download.sh | 6 +++--- 272_CSFlow/download_iter10.sh | 6 +++--- 272_CSFlow/download_iter20.sh | 6 +++--- 273_OPN/download_opn.sh | 6 +++--- 273_OPN/download_tcn.sh | 6 +++--- 274_DeepFillv2/download.sh | 6 +++--- 275_FD-GAN/download.sh | 6 +++--- 7 files changed, 21 insertions(+), 21 deletions(-) diff --git a/271_HRNet/download.sh b/271_HRNet/download.sh index 9200573e24..4792a74766 100644 --- a/271_HRNet/download.sh +++ b/271_HRNet/download.sh @@ -1,8 +1,8 @@ #!/bin/bash -curl -sc /tmp/cookie "https://drive.google.com/uc?export=download&id=150kZB-0ATX53TLLUmDWeoCH0av3ABzS3" > /dev/null -CODE="$(awk '/_warning_/ {print $NF}' /tmp/cookie)" -curl -Lb /tmp/cookie "https://drive.google.com/uc?export=download&confirm=${CODE}&id=150kZB-0ATX53TLLUmDWeoCH0av3ABzS3" -o resources.tar.gz +fileid="150kZB-0ATX53TLLUmDWeoCH0av3ABzS3" +html=`curl -c ./cookie -s -L "https://drive.google.com/uc?export=download&id=${fileid}"` +curl -Lb ./cookie "https://drive.google.com/uc?export=download&`echo ${html}|grep -Po '(confirm=[a-zA-Z0-9\-_]+)'`&id=${fileid}" -o resources.tar.gz tar -zxvf resources.tar.gz rm resources.tar.gz diff --git a/272_CSFlow/download_iter10.sh b/272_CSFlow/download_iter10.sh index f23099c45f..97f2e7c83b 100644 --- a/272_CSFlow/download_iter10.sh +++ b/272_CSFlow/download_iter10.sh @@ -1,8 +1,8 @@ #!/bin/bash -curl -sc /tmp/cookie "https://drive.google.com/uc?export=download&id=1kl9jWnN_MhOOT3xZunadnaYia0bgTpOE" > /dev/null -CODE="$(awk '/_warning_/ {print $NF}' /tmp/cookie)" -curl -Lb /tmp/cookie "https://drive.google.com/uc?export=download&confirm=${CODE}&id=1kl9jWnN_MhOOT3xZunadnaYia0bgTpOE" -o resources.tar.gz +fileid="1kl9jWnN_MhOOT3xZunadnaYia0bgTpOE" +html=`curl -c ./cookie -s -L "https://drive.google.com/uc?export=download&id=${fileid}"` +curl -Lb ./cookie "https://drive.google.com/uc?export=download&`echo ${html}|grep -Po '(confirm=[a-zA-Z0-9\-_]+)'`&id=${fileid}" -o resources.tar.gz tar -zxvf resources.tar.gz rm resources.tar.gz diff --git a/272_CSFlow/download_iter20.sh b/272_CSFlow/download_iter20.sh index 06b7c9b0a2..c79fb3f34c 100644 --- a/272_CSFlow/download_iter20.sh +++ b/272_CSFlow/download_iter20.sh @@ -1,8 +1,8 @@ #!/bin/bash -curl -sc /tmp/cookie "https://drive.google.com/uc?export=download&id=1mjYegy8kMVtLn7u2v4D_EVU77ciEqdcD" > /dev/null -CODE="$(awk '/_warning_/ {print $NF}' /tmp/cookie)" -curl -Lb /tmp/cookie "https://drive.google.com/uc?export=download&confirm=${CODE}&id=1mjYegy8kMVtLn7u2v4D_EVU77ciEqdcD" -o resources.tar.gz +fileid="1mjYegy8kMVtLn7u2v4D_EVU77ciEqdcD" +html=`curl -c ./cookie -s -L "https://drive.google.com/uc?export=download&id=${fileid}"` +curl -Lb ./cookie "https://drive.google.com/uc?export=download&`echo ${html}|grep -Po '(confirm=[a-zA-Z0-9\-_]+)'`&id=${fileid}" -o resources.tar.gz tar -zxvf resources.tar.gz rm resources.tar.gz diff --git a/273_OPN/download_opn.sh b/273_OPN/download_opn.sh index aa3b859101..6ac7795175 100644 --- a/273_OPN/download_opn.sh +++ b/273_OPN/download_opn.sh @@ -1,8 +1,8 @@ #!/bin/bash -curl -sc /tmp/cookie "https://drive.google.com/uc?export=download&id=162UuC6UA_by5IKxKrgSenc1KHb-HvFHs" > /dev/null -CODE="$(awk '/_warning_/ {print $NF}' /tmp/cookie)" -curl -Lb /tmp/cookie "https://drive.google.com/uc?export=download&confirm=${CODE}&id=162UuC6UA_by5IKxKrgSenc1KHb-HvFHs" -o resources.tar.gz +fileid="162UuC6UA_by5IKxKrgSenc1KHb-HvFHs" +html=`curl -c ./cookie -s -L "https://drive.google.com/uc?export=download&id=${fileid}"` +curl -Lb ./cookie "https://drive.google.com/uc?export=download&`echo ${html}|grep -Po '(confirm=[a-zA-Z0-9\-_]+)'`&id=${fileid}" -o resources.tar.gz tar -zxvf resources.tar.gz rm resources.tar.gz diff --git a/273_OPN/download_tcn.sh b/273_OPN/download_tcn.sh index d882d91f54..3e32be2295 100644 --- a/273_OPN/download_tcn.sh +++ b/273_OPN/download_tcn.sh @@ -1,8 +1,8 @@ #!/bin/bash -curl -sc /tmp/cookie "https://drive.google.com/uc?export=download&id=1rHr7INemfpFtQJ-9D8pdUgLhKLGWIEIZ" > /dev/null -CODE="$(awk '/_warning_/ {print $NF}' /tmp/cookie)" -curl -Lb /tmp/cookie "https://drive.google.com/uc?export=download&confirm=${CODE}&id=1rHr7INemfpFtQJ-9D8pdUgLhKLGWIEIZ" -o resources.tar.gz +fileid="1rHr7INemfpFtQJ-9D8pdUgLhKLGWIEIZ" +html=`curl -c ./cookie -s -L "https://drive.google.com/uc?export=download&id=${fileid}"` +curl -Lb ./cookie "https://drive.google.com/uc?export=download&`echo ${html}|grep -Po '(confirm=[a-zA-Z0-9\-_]+)'`&id=${fileid}" -o resources.tar.gz tar -zxvf resources.tar.gz rm resources.tar.gz diff --git a/274_DeepFillv2/download.sh b/274_DeepFillv2/download.sh index e427fe6151..3261314fdc 100644 --- a/274_DeepFillv2/download.sh +++ b/274_DeepFillv2/download.sh @@ -1,8 +1,8 @@ #!/bin/bash -curl -sc /tmp/cookie "https://drive.google.com/uc?export=download&id=1g74aHCsG755s-BGMIk8abkIPG9fnuP4o" > /dev/null -CODE="$(awk '/_warning_/ {print $NF}' /tmp/cookie)" -curl -Lb /tmp/cookie "https://drive.google.com/uc?export=download&confirm=${CODE}&id=1g74aHCsG755s-BGMIk8abkIPG9fnuP4o" -o resources.tar.gz +fileid="1g74aHCsG755s-BGMIk8abkIPG9fnuP4o" +html=`curl -c ./cookie -s -L "https://drive.google.com/uc?export=download&id=${fileid}"` +curl -Lb ./cookie "https://drive.google.com/uc?export=download&`echo ${html}|grep -Po '(confirm=[a-zA-Z0-9\-_]+)'`&id=${fileid}" -o resources.tar.gz tar -zxvf resources.tar.gz rm resources.tar.gz diff --git a/275_FD-GAN/download.sh b/275_FD-GAN/download.sh index 1964ef4beb..b85de3a0d5 100644 --- a/275_FD-GAN/download.sh +++ b/275_FD-GAN/download.sh @@ -1,8 +1,8 @@ #!/bin/bash -curl -sc /tmp/cookie "https://drive.google.com/uc?export=download&id=10-Ml0HKtVkbzDZlI7tz7aFgPvsjfWaS6" > /dev/null -CODE="$(awk '/_warning_/ {print $NF}' /tmp/cookie)" -curl -Lb /tmp/cookie "https://drive.google.com/uc?export=download&confirm=${CODE}&id=10-Ml0HKtVkbzDZlI7tz7aFgPvsjfWaS6" -o resources.tar.gz +fileid="10-Ml0HKtVkbzDZlI7tz7aFgPvsjfWaS6" +html=`curl -c ./cookie -s -L "https://drive.google.com/uc?export=download&id=${fileid}"` +curl -Lb ./cookie "https://drive.google.com/uc?export=download&`echo ${html}|grep -Po '(confirm=[a-zA-Z0-9\-_]+)'`&id=${fileid}" -o resources.tar.gz tar -zxvf resources.tar.gz rm resources.tar.gz