Compare commits

...

2 Commits

Author SHA1 Message Date
57efb4555f Switch over to https 2017-11-27 18:45:25 +01:00
11f224221b Don't add http: before image URLs anymore 2017-11-27 18:44:19 +01:00

View File

@ -64,13 +64,13 @@ fi
tags=`echo -n "$tags" | sed "s/ /%20/g"` tags=`echo -n "$tags" | sed "s/ /%20/g"`
while [ 0 ]; do while [ 0 ]; do
json=`curl "http://konachan.com/post.json?tags=$tags&limit=1"` json=`curl "https://konachan.com/post.json?tags=$tags&limit=1"`
id=`echo $json | jq -r '.[0].id'` id=`echo $json | jq -r '.[0].id'`
url=`echo $json | jq -r '.[0].file_url'` url=`echo $json | jq -r '.[0].file_url'`
ext=`echo $url | sed "s/.*\.//g"` ext=`echo $url | sed "s/.*\.//g"`
url="http:$url" url="$url"
local_url="$picdir/$id.$ext" local_url="$picdir/$id.$ext"
echo "Updating wallpaper to $id..." echo "Updating wallpaper to $id..."