diff --git a/otakukit b/otakukit index 4139c9f..23ce743 100755 --- a/otakukit +++ b/otakukit @@ -38,13 +38,13 @@ while true; do grep -o '' tmp.html | sed -n 's/.*title="\([^"]*\).*/\1/p' | grep -v 'comment.*' > titles.bw # get sizes - pup 'td.text-center text{}' -f tmp.html | awk -v RS='' '{print $1, $2}' | sed -r '/^\s*$/d' > sizes.bw + pup 'td.text-center text{}' -f tmp.html | sed '/^[[:blank:]]*$/d' | sed -n '1~5p' > sizes.bw # get seeders - pup 'td.text-center text{}' -f tmp.html | awk -v RS='' '{print $5}' | sed -r '/^\s*$/d' > seeders.bw + pup 'td.text-center text{}' -f tmp.html | sed '/^[[:blank:]]*$/d' | sed -n '3~5p' > seeders.bw # get leechers - pup 'td.text-center text{}' -f tmp.html | awk -v RS='' '{print $6}' | sed -r '/^\s*$/d' > leechers.bw + pup 'td.text-center text{}' -f tmp.html | sed '/^[[:blank:]]*$/d' | sed -n '4~5p' > leechers.bw # generate line numbers awk '{print NR " - "$0""}' titles.bw > titlesNumbered.bw @@ -55,7 +55,7 @@ while true; do #gets line number (that groupthe user selected in dmenu) LINE=$(paste -d\| titlesNumbered.bw seeders.bw leechers.bw sizes.bw | \ - sed 's/|||//' | dmenu -i -l 25 | cut -d- -f1) + sed 's/|||//' | column -t -s '|' | dmenu -i -l 25 | cut -d- -f1) [ "$LINE" = "next" ] && let "page+=1" && continue