[download]
local/bin/episodes
1
2
3 for i in "$@"; do
4 case $i in
5 *movi*) curl -s $i | xmllint --html --xpath '//h3/a[@episode_id]/text()' -;;
6 *imdb*) curl -s $i | xmllint --html --xpath '//a[@itemprop="name"]/text()' -;;
7 *wiki*) w3m -dump -cols 900 $i | grep -o '"[^"]*"' | cut -d \" -f 2;;
8 *lost*) torify curl -s $i | xmllint --html --xpath '//td[@class="gamma"]/div/span/text()' - | tac;;
9 esac | nl
10 done 2>&-
|