unsplash
This commit is contained in:
parent
0ad24a1bf0
commit
4a7e46f933
@ -17,14 +17,16 @@ fetch_pic_url() {
|
||||
;;
|
||||
unsplash)
|
||||
curl -fks --max-time 3 \
|
||||
"https://source.unsplash.com/1920x1080/daily?wallpapers" |
|
||||
sed -E 's#^.*href="([^?]+)\?.*$#\1?fm=jpg\&fit=crop\&w=1920\&h=1080#'
|
||||
--header "Authorization: Client-ID kmFIroj2ELqXJPtC0XUoyww-Tr_lDU8Ho8uxjptIrCo" \
|
||||
"https://api.unsplash.com/photos/random?count=1&orientation=landscape" |
|
||||
jsonfilter -e "@[0]['urls']['regular']"
|
||||
;;
|
||||
unsplash_*)
|
||||
local collection_id=${WEB_PIC_SRC#unsplash_}
|
||||
curl -fks --max-time 3 \
|
||||
"https://source.unsplash.com/collection/${collection_id}/1920x1080" |
|
||||
sed -E 's#^.*href="([^?]+)\?.*$#\1?fm=jpg\&fit=crop\&w=1920\&h=1080#'
|
||||
--header "Authorization: Client-ID kmFIroj2ELqXJPtC0XUoyww-Tr_lDU8Ho8uxjptIrCo" \
|
||||
"https://api.unsplash.com/photos/random?count=1&orientation=landscape" |
|
||||
jsonfilter -e "@[0]['urls']['regular']"
|
||||
;;
|
||||
wallhaven)
|
||||
curl -fks --max-time 3 \
|
||||
|
Loading…
x
Reference in New Issue
Block a user