download in colab to drive
from google.colab import drive
drive.mount('/content/drive')
here:
COOKIE="your_cookie_here"
USER_AGENT="your_user_agent_here"
REFERER="your_referer_here"
URL="your_download_url_here"
OUTPUT_PATH="/content/filename"
# Use the placeholders in the wget command
wget --header="Cookie: $COOKIE" \
--header="User-Agent: $USER_AGENT" \
--header="Referer: $REFERER" \
--max-redirect=10 --trust-server-names -O $OUTPUT_PATH "$URL"
eg:
USER_AGENT="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36"
or
REFERER="https://www.google.com"
get coookie form browser in dev console document.cookie
direct link from pausing download
for ubuntu iso into drive
!wget -O /content/drive/MyDrive/ubuntu-24.10.iso https://releases.ubuntu.com/24.10/ubuntu-24.10-desktop-amd64.iso
Comments
Post a Comment