Files
environment/scripts/gget

15 lines
368 B
Plaintext
Raw Normal View History

2025-09-15 09:42:08 +02:00
#!/bin/fish
for url in $argv
set doc (curl -s "$url")
set filename (echo $doc | hq meta[itemprop=name] attr content)
set fileid (echo $doc | hq meta[itemprop=url] attr content | cut -c 33- | grep -o '^[^/]*')
set fileurl "https://drive.google.com/uc?export=download&confirm=yes&id=$fileid"
echo $fileurl
wget "$fileurl" -O "$filename"
end