spider-web 介绍
spider-web 是爬虫的网页版,使用xml配置,支持大部分页面的爬取,支持爬取内容的保存、下载等。
其中配置文件格式为:
<?xml version="1.0" encoding="UTF-8"?> <content> <url type="simple"><!-- simple/complex --> <url_head>http://www.oschina.net/tweets</url_head> <url_start></url_start> <url_end></url_end> <url_suffix></url_suffix> </url> <analysis type="list"><!-- single/list --> <elem name="title"> <attr type="key" num="1"><!-- tag/class/key --> <name>link</name><!-- $http://my.oschina.net/(.)* --> <pro>http://my.oschina.net/(.)*/[0-9]*</pro> </attr> <attr type="class" num="2"><!-- tag/class/key --> <name>tweet</name> <pro>a</pro> </attr> <attr type="class" num="3"> <name>txt</name> <pro>a</pro> </attr> <attr type="tag" num="4"> <name>a</name> <pro>a</pro> </attr> </elem> <elem name="content"> <attr type="key" num="1"><!-- tag/class/key --> <name>link</name><!-- $http://my.oschina.net/(.)* --> <pro>http://my.oschina.net/(.)*/[0-9]*</pro> </attr> <attr type="class" num="2"><!-- tag/class/key --> <name>tweet</name> <pro>a</pro> </attr> <attr type="class" num="3"> <name>txt</name> <pro>a</pro> </attr> </elem> </analysis> <target type="download"><!-- download/text --> </target> </content>
spider-web 官网
http://git.oschina.net/gllfeixiang/spider-web
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。