5-4 简书某个专题下所有文章 - 图1

抓取的结果信息包含:

  • 文章标题
  • 文章内容链接
  • 作者
  • 评论数
  • 点赞数
  • 时间
  • 文章字数
  • 简书钻数目

    结果示例图:

    5-4 简书某个专题下所有文章 - 图2

    模板:

    1. {"_id":"jianshu-zt","startUrl":
    2. ["https://www.jianshu.com/c/3612ba73476b"],"selectors":[{"id":"info","type":"SelectorElementScroll","parentSelectors":["_root"],"selector":"div.content","multiple":true,"delay":"2000"},{"id":"title","type":"SelectorLink","parentSelectors":["info"],"selector":"a.title","multiple":false,"delay":0},{"id":"author","type":"SelectorText","parentSelectors":["info"],"selector":"a.nickname","multiple":false,"regex":"","delay":0},{"id":"comments","type":"SelectorText","parentSelectors":
    3. ["info"],"selector":"a:nth-of-type(2)","multiple":false,"regex":"","delay":0},{"id":"likes","type":"SelectorText","parentSelectors":
    4. ["title"],"selector":"[aria-label='给文章点赞'] span","multiple":false,"regex":"","delay":0},{"id":"reads","type":"SelectorText","parentSelectors":
    5. ["title"],"selector":".s-dsoj span:nth-of-type(3)","multiple":false,"regex":"","delay":0},{"id":"time","type":"SelectorText","parentSelectors":["title"],"selector":"time","multiple":false,"regex":"","delay":0},{"id":"words","type":"SelectorText","parentSelectors":
    6. ["title"],"selector":".s-dsoj span:nth-of-type(2)","multiple":false,"regex":"","delay":0},{"id":"zuan","type":"SelectorText","parentSelectors":
    7. ["title"],"selector":"._3tCVn5 span","multiple":false,"regex":"","delay":0}]}

    模板套用步骤:

    (1)进入需要抓取的专题页面,例如:https://www.jianshu.com/c/3612ba73476b
    (2)导入模板
    (3)替换 Start URL为要抓取的网页链接
    (4)开始抓取