🏗️ Parse the reponse from the API
This commit is contained in:
parent
bdb8bb9847
commit
0d93102765
1 changed files with 7 additions and 0 deletions
|
@ -3,3 +3,10 @@
|
||||||
# Get the JSON file, pull out just the URLs and put them in an array
|
# Get the JSON file, pull out just the URLs and put them in an array
|
||||||
images=$(wget -qO- https://peapix.com/bing/feed?country=gb)
|
images=$(wget -qO- https://peapix.com/bing/feed?country=gb)
|
||||||
|
|
||||||
|
# Get URL for download
|
||||||
|
latest_image_url=$(echo $images | jq '.[0].imageUrl' | tr -d '"')
|
||||||
|
|
||||||
|
# Get metadata for the watermark
|
||||||
|
latest_image_title=$(echo $images | jq '.[0].title' | tr -d '"')
|
||||||
|
latest_image_copyright=$(echo $images | jq '.[0].copyright' | tr -d '"')
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue