From 64a678b53b1c51897fa093c562e4d8b0a3e593aa Mon Sep 17 00:00:00 2001 From: Teo-CD Date: Mon, 18 Apr 2022 10:49:25 +0100 Subject: [PATCH] Small auction tracker script --- Perso/auction_tracker.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 Perso/auction_tracker.sh diff --git a/Perso/auction_tracker.sh b/Perso/auction_tracker.sh new file mode 100755 index 0000000..7a70d98 --- /dev/null +++ b/Perso/auction_tracker.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +if [ $# -ne 1 ]; then + echo "Usage : ./auction_tracker.sh \"search terms\"" + exit -1 +fi + +result=$(curl -s https://www.bidspotter.co.uk/en-gb/search-results?searchTerm="$1" | rg -e "

.*

" | rg -oe "([1-9]+[0-9]*) item\(s\)") + +if [ "$result" ]; then + notify-send "Number of $1 listings : $result" +fi