ZhuaShuShell 2.7发布

字体: | 打印

ZhuaShuShell 是基于 shell 的书籍自动下载工具,它能够自动整理成长篇 txt 格式书籍,方便电脑手机上阅读。

目前,ZhuaShuShell 支持如下站点:
http://club.book.sina.com.cn/booksearch/booksearch.php
http://book.qq.com/
http://cn.news.yahoo.com/reading/
http://msn.hongxiu.com/
http://book.mop.com/migindex.html
http://book.wuhan.net.cn/index.html
http://lianzai.culture.china.com/books/
http://www.renyu.net/
http://www.readnovel.com/
http://www.baidu.com/search/guoxue/dir/fenlei.html
http://culture.163.com/book/
http://www.shuku.net/
http://gui.hcdj.com/longgui/index.htm
http://bbs.ustc.edu.cn/cgi/bbs0an?board=Marvel
http://www.66book.net/
ZhuaShuShell 的最新版本为 2.7,你可以从这里下载

友情推介站点:http://linuxtoy.org/archives/zhuashu-shell.html

我也来说两句 查看全部评论 相关评论

  • joejoe0332 (2007-11-21 16:08:04)

    新浪(Sina)读书频道

    #!/bin/bash

    rm $3.txt

    echo
    echo "START"

    i="1"
    M="$[$2+1]"

    while [ $i -lt $M ]
    do
    echo "Downloading Chapter $i..."
    wget -p -q -nd $1/$i.shtml
    cat ./$i.shtml | grep "<p>" > $i.txt
    sed -i 's/<p>//g' $i.txt
    sed -i 's/<\/p>/\
    /g' $i.txt
    sed -i 's/<[^<]*>//g' $i.txt
    sed -i '/[:space:][^C]*/d' $i.txt
    sed -i 's/^[[:space:]]*//g' $i.txt
    cat $i.txt >> $3.txt
    rm $i.txt
    rm $i.shtml
    i=$[$i+1]
    done;

    echo "END"


    使用方法是将上文保存为sinatest,在bash shell下chmod 755 sinatest使其具有可执行权限.

    ./sinatest 书的路径 最后一章的号 保存的书名

    要下载的是http://book.sina.com.cn/nzt/history/his/shijixindu/index.shtml上介绍的书,一共有384章,那么就这样使用:
    ./sinatest http://book.sina.com.cn/nzt/history/his/shijixindu 384 shiji


    腾讯(QQ)读书频道

    #!/bin/bash

    rm $3.txt

    echo
    echo "START"

    i="1"
    M="$[$2+1]"

    while [ $i -lt $M ]
    do
    echo "Downloading Chapter $i..."
    wget -p -q -nd -A "*.shtml" $1/$i.shtml
    cat ./$i.shtml | grep "<br /><br />" > $i.txt
    sed -i 's/<[^<]*>//g' $i.txt
    cat $i.txt >> $3.txt
    echo >> $3.txt
    rm $i.txt
    rm $i.shtml
    i=$[$i+1]
    done;

    echo "END"

    保存为qqtest
    要下载的是http://book.qq.com/s/book/0/10/10165上介绍的书
    使用方法是:./qqtest http://book.qq.com/s/book/0/10/10165 20 hk
    最后书会保存为hk.txt

    雅虎(Yahoo)中国读书频道

    #!/bin/bash

    rm $2.txt
    echo
    echo "START"

    wget -r -l 1 -A "*.html" -p -q -nd $1
    cat *.html >> $2.txt
    rm *.html
    cat $2.txt | grep "<p>" >> $2
    mv $2 $2.txt

    sed -i 's/<p>//g' $2.txt
    sed -i '/<p\ /d' $2.txt
    sed -i 's/<[^<]*>//g' $2.txt
    sed -i '/\ /d' $2.txt

    echo "END" 保存为yahootest  
    要下载的是http://cn.news.yahoo.com/reading/cf319qjxc/index.html上介绍的书
    使用方法是(注意这里不需要设置章节数):
    ./yahootest http://cn.news.yahoo.com/reading/cf319qjxc/index.html lcy
    最后书会保存为lcy.txt

    MSN中国读书频道

    #/bin/bash

    rm $2.txt
    echo
    echo "START"

    wget -r -l 1 -A "*.html,*.shtml" -p -q -nd $1
    rm *.html
    cat *.shtml >> $2.txt
    rm *.shtml

    cat $2.txt | grep "<br>" > $2
    mv $2 $2.txt

    sed -i 's/<br>/\
    /g' $2.txt
    sed -i 's/<[^<]*>//g' $2.txt
    sed -i 's/\ //g' $2.txt

    echo "END"

    保存为msntest
    要下载的是http://msn.hongxiu.com/n/a/42385/上介绍的书
    使用方法是  (注意这里不需要设置章节数,最后要加上一个/):
    ./msntest http://msn.hongxiu.com/n/a/42385/ kongzi
    最后书会保存为kongzi.txt
    猫扑(Mop)读书频道

    #!/bin/bash

    rm $2.txt
    echo
    echo "START"

    wget -r -l 1 -A "*.html" -p -q -nd $1
    cat *.html >> $2.txt
    rm *.html

    cat $2.txt | grep "<br>" > $2
    mv $2 $2.txt

    sed -i 's/\ //g' $2.txt
    sed -i 's/<br>/ /g' $2.txt
    sed -i 's/<[^<]*>//g' $2.txt

    echo "END"
    保存为moptest
    要下载http://book.mop.com/ebook/NqWx5mdz.html上介绍的书
    使用方法是 (注意这里不需要设置章节数):
    ./moptest http://book.mop.com/ebook/NqWx5mdz.html hxd
    最后书会保存为hxd.txt

    Wuhan读书频道

    #!/bin/bash

    rm $3.txt
    i="1"
    M="$[$2+1]"
    ten="10"

    echo
    echo "START"

    while [ $i -lt $M ]
    do
    echo "Downloading Chapter $i..."
    if [ $i -lt $ten ]
    then
                  wget -p -q -nd -A "*.htm" $1/0$i.htm
                  cat ./0$i.htm | grep "<p>" > $i.txt
                  rm 0$i.htm
    else
                  wget -p -q -nd -A "*.htm" $1/$i.htm
                  cat ./$i.htm | grep "<p>" > $i.txt
                  rm $i.htm
    fi

    sed -i '/\ /d' $i.txt
    sed -i 's/<p>//g' $i.txt
    sed -i 's/<\/p>/\
    /g' $i.txt
    sed -i 's/<[^<]*>//g' $i.txt
    sed -i 's/^[[:space:]]*//g' $i.txt
    cat $i.txt >> $3.txt
    rm $i.txt
    i=$[$i+1]
    done;

    echo "BYEBYE"


    保存为wuhantest
    要下载的是http://book.wuhan.net.cn/xh/gcd1/gcd1.htm上介绍的书
    使用方法是(注意这里地址的变化,需要设置章节数):
    ./wuhantest http://book.wuhan.net.cn/xh/gcd1 60 gcd1
    最后书会保存为gcd1.txt

    中华网(China)读书频道

    #!/bin/bash
    echo
    echo "START"

    rm $2.txt
    wget -r -l 1 -A "*.html" -p -q -nd $1
    rm index.html
    rm weeksortbook.html

    sed -i 's/<br>/\
    /g' *.html
    cat *.html >> $2.txt
    rm *.html

    sed -i 's/\ //g' $2.txt
    sed -i 's/<[^<]*>//g' $2.txt

    echo "END"

    保存为chinatest
    要下载的是http://lianzai.culture.china.com/books/html/2189/index.html上介绍的书
    使用方法是(注意这里不需要设置章节数):
    ./chinatest http://lianzai.culture.china.com/books/html/2189/index.html gjm
    最后书会保存为gjm.txt

    美人鱼小说阅读网

    #!/bin/bash
    rm $2.txt
    echo "START"

    wget -r -l 1 -A "*.htm" -p -q -nd $1
    cat *.htm >> $2.txt
    rm *.htm

    sed -i '/<[^<]*>/d' $2.txt
    sed -i '/--/d' $2.txt
    sed -i '/font/d' $2.txt
    sed -i '/color/d' $2.txt
    sed -i '/text/d' $2.txt
    sed -i '/page/d' $2.txt

    echo "END"

    保存为renyutest
    要下载的是http://www.renyu.net/wxxs/j/jingyong/ffwz/index.html上介绍的书
    使用方法是(注意这里不需要设置章节数):
    ./renyutest  http://www.renyu.net/wxxs/j/jingyong/ffwz/index.html fh
    最后书会保存为fh.txt

    小说阅读网

    #!/bin/bash

    rm $3.txt

    echo
    echo "START"

    i="1"
    M="$[$2+1]"

    while [ $i -lt $M ]
    do
    echo "Downloading Chapter $i..."
    wget --header="User-Agent: Mozilla/4.0" -A "*.html" -p -q -nd $1/$i.html
    cat ./$i.html | grep "<P>" > $i.txt
    sed -i 's/<P>//g' $i.txt
    sed -i 's/<\/P>/\
    /g' $i.txt
    sed -i 's/<BR>//g' $i.txt
    sed -i 's/<[^<]*>//g' $i.txt
    sed -i '/[:space:][^C]*/d' $i.txt
    sed -i 's/^[[:space:]]*//g' $i.txt
    cat $i.txt >> $3.txt
    rm $i.txt
    rm $i.html
    rm leftads4.html
    i=$[$i+1]
    done;

    echo "END"


    保存为readnoveltest
    要下载的是http://www.readnovel.com/novel/26297.html上介绍的书
    使用方法是(注意地址的变化,需要加上下载的章节数,章节数可以通过http://www.readnovel.com/partlist/26297/上书目链接查到)
    ./readnoveltest http://www.readnovel.com/novel/26297 98 kangri
    最后书会保存为kangri.txt

    百度国学

    #!/bin/bash

    rm $3.txt

    echo
    echo "START"

    i="1"
    M="$[$2+1]"

    while [ $i -lt $M ]
    do
    echo "Downloading Chapter $i..."
    wget -A "*.html" -p -q -nd $1/$i.html
    cat ./$i.html | grep "<br>" > $i.txt
    sed -i 's/<br>/\
    /g' $i.txt
    sed -i 's/<[^<]*>//g' $i.txt
    sed -i 's/\ //g' $i.txt
    sed -i 's/^[[:space:]]*//g' $i.txt
    cat $i.txt >> $3.txt
    rm $i.txt
    rm $i.html
    i=$[$i+1]
    done;

    echo "END"

    保存为baidutest
    要下载的是http://guoxue.baidu.com/page/b4bac7efd7f3b4ab/index.html上介绍的书
    使用方法是(注意地址的变化,需要加上下载的章节数,章节数可以通过http://guoxue.baidu.com/page/b4bac7efd7f3b4ab/index.html上书目链接查到)
    ./baidutest http://guoxue.baidu.com/page/b4bac7efd7f3b4ab 11 zuozhuan
    最后书会保存为zuozhuan.txt

    网易文化频道-读书

    #!/bin/bash

    rm $2.txt

    echo
    echo "START"

    wget -r -l 1 -A "*24.html" -p -q -nd $1
    rm special.html
    cat *.html | grep "<P style" >> $2.txt
    rm *.html

    sed -i 's/<\/P>/\
    /g' $2.txt
    sed -i 's/<[^<]*>//g' $2.txt


    echo "END"

    保存为163test
    要下载的是http://culture.163.com/special/00281M4U/0611xinjiehun.html上介绍的书
    使用方法是(注意这里不需要设置章节数)
    ./163test http://culture.163.com/special/00281M4U/0611xinjiehun.html xjhsd
    最后书会保存为xjhsd.txt

    亦凡公益图书馆

    #!/bin/bash

    rm $2.txt

    echo
    echo "START"

    wget -r -l 1 -A "*.html" -p -q -nd $1
    cat *.html >> $2.txt
    rm robots.txt
    rm robots.txt.*
    rm *.html

    sed -i '/</d' $2.txt
    sed -i '/\ /d' $2.txt
    sed -i '/initializeimg/d' $2.txt
    sed -i '/{/d' $2.txt
    sed -i '/>/d' $2.txt
    sed -i '/}/d' $2.txt
    sed -i '/var/d' $2.txt


    echo "END"

    保存为shukutest
    要下载的是http://www.shuku.net:8082/novels/dangdai/hongfennvlang/hongfennvlang.html上介绍的书
    使用方法是(注意这里不需要设置章节数)
    ./shukutest http://www.shuku.net:8082/novels/dangdai/hongfennvlang/hongfennvlang.html fhnl
    最后书会保存为fhnl.txt

    ---------------------------------------------
    相关代码可以在Sourceforge上下载,地址是:http://sourceforge.net/projects/zhuashushell
  • joejoe0332 (2007-11-21 16:08:46)

    我喜欢的鬼故事网站(长篇频道)

    #!/bin/bash

    rm $2.txt

    echo
    echo "START"

    wget -r -l 1 -A "*.htm" -p -q -nd $1
    cat *.htm | grep "<\/P><>" >> $2.txt
    rm *.htm

    sed -i 's/<>//g' $2.txt
    sed -i 's/<\/P>/\
    /g' $2.txt
    sed -i 's/<BR>/\
    /g' $2.txt
    sed -i 's/\ //g' $2.txt
    sed -i 's/<[^<]*>//g' $2.txt


    echo "END"

    保存为hcdjtest
    要下载的是http://gui.hcdj.com/longgui/list_136.htm上介绍的书
    使用方法是(注意这里不需要设置章节数)
    ./hcdjtest http://gui.hcdj.com/longgui/list_136.htm 17ns
    最后书会保存为17ns.txt


    中科大瀚海星云BBSMarvel版精华区

    #!/bin/bash

    rm $2.txt

    echo
    echo "START"

    wget -r -l 1 -A "bbsanc*" -p -q -nd $1
    cat *.A >> $2.txt
    rm *.A

    sed -i 's/\ //g' $2.txt
    sed -i 's/<[^<]*>//g' $2.txt
    sed -i '/^$/d' $2.txt

    echo "END"

    保存为ustctest

    注意该shell程序只能下载多章节(中,长篇)故事,主要位于原创文集中和转载精华中,下载前请确认该文是否是多章节故事,如转载精华中的传统作家->周德东->三岔口
    http://bbs.ustc.edu.cn/cgi/bbs0a ... DAE8A2202/DB53DFE54


    使用方法是(注意这里不需要设置章节数)
    ./ustctest http://bbs.ustc.edu.cn/cgi/bbs0a ... DAE8A2202/DB53DFE54 sanchakou
    最后书会保存为sanchakou.txt


    溜溜读书频道

    #!/bin/bash

    rm $2.txt
    echo
    echo "START"

    wget -r -l 1 -A "read.asp*" -p -q -nd $1
    cat read.asp* >> $2.txt
    rm read.asp*
    cat $2.txt | grep "<br />" >> $2
    mv $2 $2.txt

    sed -i 's/<[^<]*>//g' $2.txt
    sed -i '/\ /d' $2.txt
    sed -i '/Copyright/d' $2.txt
    sed -i '/document/d' $2.txt

    echo "END"

    保存为66booktest
    使用方法是(注意这里不需要设置章节数)
    ./66booktest http://www.66book.net/contents.asp?bookid=3693 zgf
    最后书会保存为zgf.txt


    ---------------------------------------------
    相关代码可以在Sourceforge上下载,地址是:http://sourceforge.net/projects/zhuashushell

    声明:不要用这个东东干坏事,印刷盗版书籍哦
  • vvdounai (2007-11-28 18:00:14)

    更新至2.8版本

    1.增加对之乎书坊的支持,使用方法看这里
    2.去除了猫扑的代码,其读书频道已经变为论坛了。

    特此通知!