web monitoring scripts
bandcamp artist/label page monitoring script
usage:
any linux OS, or WSL for windows
change the homepath defined in the top variables of the script to the directory where you put the script
create a file in the HOME_PATH called "artists" and a subfolder called "output"
use the xxx in xxx.bancamp.com/music in the ARTIST_LIST to define the artist or label pages you want to monitor for new releases
artist1
label1
artist2
(etc)
cd to the HOME_PATH and run the script
./checkbandcamp.sh
when done, run a
cat output/new_releases
and it will show the pages which have new releases since you last ran the script.
remember that the first time you run it, it has no history yet, so all pages will have new releases...
also don't run it too often,
once or a few times a week should be enough, and increase the sleep
line if you get 0 byte output files (timeouts)
have fun :)
xenon@xenon01:~/checkbandcamp$ cat checkbandcamp.sh
#!/bin/bash
#set -x
HOME_PATH="/home/xenon/checkbandcamp"
URL_START="https://"
URL_END=".bandcamp.com/music"
ARTIST_LIST=$HOME_PATH/artists
OUTPUT_PATH=$HOME_PATH/output
OUTPUT_LIST=$OUTPUT_PATH/new_releases
DATE_TIME="$(date +%F_%R)"
echo "New Releases" > $OUTPUT_LIST
for x in `cat $ARTIST_LIST`
do
URL_NAME=$URL_START$x$URL_END
PAGE_NAME="$x"_new
PAGE_OLD="$x"_old
#wget -P $OUTPUT_PATH -O $PAGE_NAME $URL_NAME - #Variable not resolving in wget path, workaround below
wget -O $PAGE_NAME $URL_NAME
mv $PAGE_NAME $OUTPUT_PATH/$PAGE_NAME
#compare old and new artist release pages
RELEASE_NEW=`grep data-item-id $OUTPUT_PATH/$PAGE_NAME -A 15 | grep -o -P '(?<=a href=").*(?=">)' | head -1`
RELEASE_OLD=`grep data-item-id $OUTPUT_PATH/$PAGE_OLD -A 15 | grep -o -P '(?<=a href=").*(?=">)' | head -1`
if [[ $RELEASE_NEW != $RELEASE_OLD ]]; then
echo "$RELEASE_NEW $URL_NAME" >> $OUTPUT_LIST
fi
cp -p "$OUTPUT_PATH/$PAGE_NAME" "$OUTPUT_PATH/$PAGE_OLD"
sleep 15
done
cp -p $OUTPUT_LIST "$OUTPUT_LIST"_"$DATE_TIME"
juno download artist search monitoring script
the juno script works with a search for the artist names, as the artist pages don't show their remixes etc
i may make one for labels later, but i use the bandcamp script to stay up to date for the labels
usage, see above, except for the ARTIST_LIST
just add the artist names normally as you would search for them, except if they have a space in their name, then use a "+"
artist1
art+ist2
artist3
(etc)
xenon@xenon01:~/checkjuno$ cat checkjuno.sh
#!/bin/bash
#set -x
HOME_PATH="/home/xenon/checkjuno"
URL_START="https://www.junodownload.com/search/?q%5Ball%5D%5B0%5D=%22"
URL_END="%22&solrorder=date_down"
ARTIST_LIST=$HOME_PATH/artists
OUTPUT_PATH=$HOME_PATH/output
OUTPUT_LIST=$OUTPUT_PATH/new_releases
DATE_TIME="$(date +%F_%R)"
echo "New Releases" > $OUTPUT_LIST
for x in `cat $ARTIST_LIST`
do
URL_NAME=$URL_START$x$URL_END
PAGE_NAME="$x"_new
PAGE_OLD="$x"_old
#wget -P $OUTPUT_PATH -O $PAGE_NAME $URL_NAME - #Variable not resolving in wget path, workaround below
wget -O $PAGE_NAME $URL_NAME
mv $PAGE_NAME $OUTPUT_PATH/$PAGE_NAME
#compare old and new artist release pages
RELEASE_NEW=`grep -o -P '.{0,0}release header.{0,80}'
$OUTPUT_PATH/$PAGE_NAME | head -1 | grep -o -P '(?<=href=).*(?=
class=)'`
RELEASE_OLD=`grep -o -P '.{0,0}release header.{0,80}'
$OUTPUT_PATH/$PAGE_OLD | head -1 | grep -o -P '(?<=href=).*(?=
class=)'`
if [[ $RELEASE_NEW != $RELEASE_OLD ]]; then
echo "$RELEASE_NEW $URL_NAME" >> $OUTPUT_LIST
fi
cp -p "$OUTPUT_PATH/$PAGE_NAME" "$OUTPUT_PATH/$PAGE_OLD"
sleep 15
done
cp -p $OUTPUT_LIST "$OUTPUT_LIST"_"$DATE_TIME"
beatport artist page monitoring script
the beatport script works with an artist name and id like so
https://www.beatport.com/artist/<artistname>/<artistID>
I may make one for labels later, but i use the bandcamp script to stay up to date for the labels
usage, see the bandcamp script, except for the ARTIST_LIST
add the artist
names as follows, <artistname><space><artistID>
remove the / from the line, it needs to be a space
artist1 123456
artist2 234567
artist3 567890
(etc)
xenon@xenon01:~/checkbeatport$ cat checkbeatport.sh
#!/bin/bash
#set -x
HOME_PATH="/home/xenon/checkbeatport"
URL_START="https://www.beatport.com/artist/"
ARTIST_LIST=$HOME_PATH/artists
OUTPUT_PATH=$HOME_PATH/output
OUTPUT_LIST=$OUTPUT_PATH/new_releases
DATE_TIME="$(date +%F_%R)"
echo "New Releases" > $OUTPUT_LIST
while read LINE;
do
ARTIST_NAME=`echo $LINE | awk '{print $1}'`
URL_END=`echo $LINE | awk '{print $2}'`
URL_NAME="$URL_START$ARTIST_NAME/$URL_END"
PAGE_NAME="$ARTIST_NAME"_new
PAGE_OLD="$ARTIST_NAME"_old
#wget -P $OUTPUT_PATH -O $PAGE_NAME $URL_NAME - #Variable not resolving in wget path, workaround below
wget -O $PAGE_NAME $URL_NAME
mv $PAGE_NAME $OUTPUT_PATH/$PAGE_NAME
#compare old and new artist release pages
RELEASE_NEW=`grep -o -P '.{0,0}/release/.{0,80}'
$OUTPUT_PATH/$PAGE_NAME | head -1 | grep -o -P
'(?<=release/).*(?=/)'`
RELEASE_OLD=`grep -o -P '.{0,0}/release/.{0,80}' $OUTPUT_PATH/$PAGE_OLD | head -1 | grep -o -P '(?<=release/).*(?=/)'`
if [[ $RELEASE_NEW != $RELEASE_OLD ]]; then
echo "$RELEASE_NEW $URL_NAME" >> $OUTPUT_LIST
fi
cp -p "$OUTPUT_PATH/$PAGE_NAME" "$OUTPUT_PATH/$PAGE_OLD"
sleep 15
done < $ARTIST_LIST
cp -p $OUTPUT_LIST "$OUTPUT_LIST"_"$DATE_TIME"