Permalink
Browse files

+ mangafox.com: manga mass downloader

  • Loading branch information...
l29ah committed Feb 16, 2012
1 parent 48fe867 commit 7cbea09b70555f2ed703e3f21c3cf2d6b8eb8edb
Showing with 12 additions and 0 deletions.
  1. +12 −0 mangafox.com/mangafox
View
@@ -0,0 +1,12 @@
#!/bin/sh
for u in `curl -s "http://www.mangafox.com/manga/$1/" | sed -n -e 's#.*href="\(http://www.mangafox.com/manga/[^"]*\)".*#\1#p' | sed -n -e '2,$p'`; do
pn="`curl -s "$u" | sed -n -e 's#.*\tof \([0-9]*\).*#\1#p' | sed q`"
[ -z "$pn" ] && continue
bu="`dirname "$u"`"
for p in `seq 1 $pn`; do
cu="$bu/$p.html"
f="`echo $cu | sed 's#http://www.mangafox.com/manga/##;s/html$/jpeg/'`"
mkdir -p "`dirname "$f"`"
wget "`curl -s "$cu" | sed -n -e 's#.*enlarge()"><img src="\([^"]*\)".*#\1#p'`" -O "$f"
done
done

0 comments on commit 7cbea09

Please sign in to comment.