nadimkobeissi / mkbsd

Download all the wallpapers in MKBHD's "Panels" app
Do What The F*ck You Want To Public License
2.43k stars 180 forks source link

jq + wget shell one-liner #35

Open fluffy-critter opened 1 day ago

fluffy-critter commented 1 day ago
curl https://storage.googleapis.com/panels-api/data/20240916/media-1a-i-p~s | jq '.data | .[] | select(.dhd) | .dhd' | xargs wget
lilyvxv commented 22 hours ago

jq <3

parkerlreed commented 22 hours ago

If you want you can have that go to a file and pass it in to wget -i so it will reuse the same connection as to not constantly disconnect and reconnect to the server.

lvxnull commented 18 hours ago

Use wget -qO- instead of curl so there's one dependency less

vs4vijay commented 12 hours ago

File is saved with wrong extension -AdamM~Pixelized~Key3.jpeg@expires=1728508444399&fm=jpg&s=23cac714f045d42bd940bb17c58a2e0f%0D

fluffy-critter commented 6 hours ago

File is saved with wrong extension -AdamM~Pixelized~Key3.jpeg@expires=1728508444399&fm=jpg&s=23cac714f045d42bd940bb17c58a2e0f%0D

Yeah there's probably some obscure wget option to make that work better, I've just been doing something like

for i in *@* ; do mv "$i" "$(echo $i | cut -f1 -d@)"

but the -d parameter varies by operating system (like on macOS and Linux it's ?).