wattpad-scrape (363B)
1 #!/usr/bin/env bash 2 current_directory=`pwd` 3 if [ $# -eq 0 ]; 4 then 5 echo "Pass the URL as an argument." 6 exit 0 7 fi 8 cd ~/.bin/wattpad-ebook-scraper/ 9 python3 scrape.py $1 10 book_title=`ls | grep *.epub` 11 mv $book_title $current_directory/ 12 folder_title=`echo $book_title | sed s/\.epub//g` 13 rm -r $folder_title 14 cd $current_directory 15 echo "Book $book_title extracted!"