From da72a7039c55a7f163ccf6e33a486a4e676746c5 Mon Sep 17 00:00:00 2001 From: gotbletu Date: Sun, 11 Aug 2019 12:26:09 -0700 Subject: [PATCH] website changed fixed --- dl_wallhaven_wallpapers.sh | 50 ++++++++++++++++++++------------------ 1 file changed, 27 insertions(+), 23 deletions(-) diff --git a/dl_wallhaven_wallpapers.sh b/dl_wallhaven_wallpapers.sh index c27de09..9489f97 100755 --- a/dl_wallhaven_wallpapers.sh +++ b/dl_wallhaven_wallpapers.sh @@ -1,18 +1,26 @@ -#!/bin/bash -# _ _ _ _ -# __ _ ___ | |_| |__ | | ___| |_ _ _ -# / _` |/ _ \| __| '_ \| |/ _ \ __| | | | -#| (_| | (_) | |_| |_) | | __/ |_| |_| | -# \__, |\___/ \__|_.__/|_|\___|\__|\__,_| -# |___/ -# http://www.youtube.com/user/gotbletu -# https://twitter.com/gotbletu -# https://plus.google.com/+gotbletu -# https://github.com/gotbletu -# gotbletu@gmail.com - -# demo video: https://www.youtube.com/watch?v=cDtVEXjiKTw -# A script to download random wallpaper and delete old wallpaper at the sametime (wallhaven.cc) +#!/usr/bin/env bash +### _ _ _ _ +### __ _ ___ | |_| |__ | | ___| |_ _ _ +### / _` |/ _ \| __| '_ \| |/ _ \ __| | | | +###| (_| | (_) | |_| |_) | | __/ |_| |_| | +### \__, |\___/ \__|_.__/|_|\___|\__|\__,_| +### |___/ +### https://www.youtube.com/user/gotbletu +### https://twitter.com/gotbletu +### https://github.com/gotbletu +### gotbletu@gmail.com +### +### Author : gotbletu +### Name : dl_wallhaven_wallpapers.sh +### Version : 0.2 +### Date : 20190811 +### Description : A script to download random wallpaper and delete old wallpaper at the sametime (wallhaven.cc) +### Depends On : bash coreutils grep findutils lynx wget +### Video Demo : https://www.youtube.com/watch?v=cDtVEXjiKTw + +### Release Notes : 20190811 -- v0.2 minor fixes to get it working again +### 20170121 -- v0.1 it has begun + # Variable (you can change any of these to your liking) real_wall_dir=~/Pictures/Wallpapers @@ -26,14 +34,9 @@ mkdir -p $temp_wall_dir cd $temp_wall_dir # get links of images and download it -get_random_url=$(lynx -dump "https://alpha.wallhaven.cc/random" | awk '/\/wallpaper\// && !/favorites/ && !/thumbTags/ && !/html/ {print $2}') - -get_images_url=$(echo "$get_random_url" | while read line; do lynx -source "$line" | grep -Po '(