Skip to content

Instantly share code, notes, and snippets.

@muzi502
Created February 13, 2020 09:04
Show Gist options
  • Save muzi502/1b044f8498ce8c473bd2ddb77e189095 to your computer and use it in GitHub Desktop.
Save muzi502/1b044f8498ce8c473bd2ddb77e189095 to your computer and use it in GitHub Desktop.
#!/bin/bash
# for: download conoha wallpaper
# by: muzi502
# date: 2020-02-11
set -xue
p=$(curl https://conoha.mikumo.com/wallpaper/ \
| grep li | grep data-wallpaper-design= \
| sed -e 's/<li//g' | sed -e 's/">//g' | sed -e 's/^[ \t]*//g' \
| sed -e 's/data-wallpaper-design="//g' \
| sed 's/^/https:\/\/conoha.mikumo.com\/wp-content\/themes\/conohamikumo\/images\/wallpaper\//')
for pic in ${p}
do
file_name=$(echo ${pic} | awk -F "/" '{print $9}')
wget ${pic}/1080_1920.jpg -O ${file_name}_1080.jpg
wget ${pic}/2560_1440.jpg -O ${file_name}_1440.jpg
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment