Download Full songs from a site one by one according to the film name
#!/bin/bash
URL="http://sensongs.com"
lynx -dump $URL | grep -o "http:.*" | grep -E "HindiSongs.htm|MalayalamSongs.htm|TamilSongs.htm" |sort -u > link
for i in `cat link`
do
IURL="$i"
NAME=`echo ${i:20} | cut -d. -f1`
if [ -d ~/Music ]; then
cd ~/Music
else
mkdir -p ~/Music
cd ~/Music
fi
if [ -d ~/Music/sensongs.com ]; then
cd ~/Music/sensongs.com
else
mkdir ~/Music/sensongs.com
cd ~/Music/sensongs.com
fi
if [ -d "$NAME" ]; then
cd $NAME
else
mkdir $NAME
cd $NAME
fi
lynx -dump $IURL | grep -o "http:.*" | grep -vE "TamilSongs|NFls|Home|Telugu|Hindi|Pakistani|Malayalam|Kannada|OtherSongs|ContactUs" > songs.txt
for j in `cat songs.txt`
do
MP3=`echo ${j:20} | cut -d. -f1`
if [ -d "$MP3" ]; then
cd $MP3
else
mkdir $MP3
cd $MP3
fi
lynx -dump $j|grep -o "http:.*"|grep ".mp3$|.wma$" |xargs wget -c
cd ..done
done
No comments:
Post a Comment