Skip to content

Commit

Permalink
Merge pull request #30 from hodapp512/master
Browse files Browse the repository at this point in the history
Fixes Bing homepage update
  • Loading branch information
thejandroman authored Feb 1, 2020
2 parents 622dbb3 + c84271c commit 60beaa7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions bing-wallpaper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -106,14 +106,14 @@ mkdir -p "${PICTURE_DIR}"

# Parse bing.com and acquire picture URL(s)
read -ra urls < <(curl -sL $PROTO://www.bing.com | \
grep -Eo "url:'.*?'" | \
sed -e "s/url:'\([^']*\)'.*/$PROTO:\/\/bing.com\1/" | \
grep -Eo "url\(.*?\)" | \
sed -e "s/url(\([^']*\)).*/http:\/\/bing.com\1/" | \
transform_urls)

if [ -n "$BOOST" ]; then
read -ra archiveUrls < <(curl -sL "$PROTO://www.bing.com/HPImageArchive.aspx?format=js&n=$BOOST" | \
grep -Eo "url\":\".*?\"" | \
sed -e "s/url\":\"\([^\"]*\)\"/$PROTO:\/\/bing.com\1/" | \
grep -Eo "url\(.*?\)" | \
sed -e "s/url(\([^']*\)).*/http:\/\/bing.com\1/" | \
transform_urls)
urls=( "${urls[@]}" "${archiveUrls[@]}" )
fi
Expand Down

0 comments on commit 60beaa7

Please sign in to comment.