价格(原价/现价)
结果示例图:
模板:
{"_id":"weiku-sosou","startUrl":
["http://www.yojiang.cn/pc/search/lesson?kw=%E8%B5%9A%E9%92%B1"],"selectors":[{"id":"info","type":"SelectorElement","parentSelectors":
["_root"],"selector":"a.lesson-item","multiple":true,"delay":0},{"id":"name","type":"SelectorText","parentSelectors":["info"],"selector":"h2","multiple":false,"regex":"","delay":0},{"id":"author","type":"SelectorText","parentSelectors":["info"],"selector":"p","multiple":false,"regex":"","delay":0},{"id":"link","type":"SelectorLink","parentSelectors":["info"],"selector":"_parent_","multiple":false,"delay":0},{"id":"class","type":"SelectorText","parentSelectors":
["link"],"selector":"span.class-hours","multiple":false,"regex":"","delay":0},{"id":"students","type":"SelectorText","parentSelectors":
["link"],"selector":"span.sale-count","multiple":false,"regex":"","delay":0},{"id":"price","type":"SelectorText","parentSelectors":
["link"],"selector":"div.price-zone","multiple":false,"regex":"","delay":0}]}
模板套用步骤:
(1)进入需要抓取的课程搜索结果页面,例如:http://www.yojiang.cn/pc/search/lesson?kw=%E8%B5%9A%E9%92%B1
(2)导入模板
(3)替换 Start URL为要抓取的网页链接
(4)开始抓取