14-1 唯库某分类课程信息 - 图1

抓取的结果信息包含:

  • 课程名字
  • 作者
  • 课程链接
  • 价格(原价/会员价)
  • 课程节数
  • 在学人数

    结果示例图:

    14-1 唯库某分类课程信息 - 图2

    模板:

    1. {"_id":"weiku-kecheng","startUrl":["http://www.yojiang.cn/pc/lesson?label=%E8%81%8C%E5%9C%BA%E6%8A%80%E5%B7%A7"],"selectors":[{"id":"info","type":"SelectorElementScroll","parentSelectors":["_root"],"selector":"a.lesson-atom-wrap","multiple":true,"delay":"2000"},{"id":"name","type":"SelectorText","parentSelectors":
    2. ["info"],"selector":"div.lesson-name","multiple":false,"regex":"","delay":0},{"id":"author","type":"SelectorText","parentSelectors":
    3. ["info"],"selector":"div.teacher-name","multiple":false,"regex":"","delay":0},{"id":"link","type":"SelectorLink","parentSelectors":["info"],"selector":"_parent_","multiple":false,"delay":0},{"id":"price","type":"SelectorText","parentSelectors":
    4. ["link"],"selector":"div.price-zone","multiple":false,"regex":"","delay":0},{"id":"class","type":"SelectorText","parentSelectors":
    5. ["link"],"selector":"span.class-hours","multiple":false,"regex":"","delay":0},{"id":"users","type":"SelectorText","parentSelectors":
    6. ["link"],"selector":"span.sale-count","multiple":false,"regex":"","delay":0}]}

    模板套用步骤:

    (1)进入需要抓取的课程分类页面,例如:http://www.yojiang.cn/pc/lesson?label=%E8%81%8C%E5%9C%BA%E6%8A%80%E5%B7%A7
    (2)导入模板
    (3)替换 Start URL为要抓取的网页链接
    (4)开始抓取