1-12 知乎某话题下的所有精华 - 图1

抓取的结果信息包含:

  • 问答标题
  • 问答详情链接
  • 赞同数
  • 评论数
  • 作者

    结果示例图:

    1-12 知乎某话题下的所有精华 - 图2

    模板:

    1. {"_id":"jinghua111","startUrl":
    2. ["https://www.zhihu.com/topic/19555550/hot"],"selectors":[{"id":"outer","type":"SelectorElementScroll","parentSelectors":["_root"],"selector":"div.List-item","multiple":true,"delay":"2000"},{"id":"name","type":"SelectorLink","parentSelectors":
    3. ["outer"],"selector":"h2.ContentItem-title a","multiple":false,"delay":0},{"id":"agrees","type":"SelectorText","parentSelectors":["outer"],"selector":"button.VoteButton--up","multiple":false,"regex":"","delay":0},{"id":"comments","type":"SelectorText","parentSelectors":["outer"],"selector":"button.ContentItem-action:nth-of-type(1)","multiple":false,"regex":"","delay":0},{"id":"author","type":"SelectorText","parentSelectors":["outer"],"selector":"div.AuthorInfo-content","multiple":false,"regex":"","delay":0}]}

    模板套用步骤:

    (1)进入需要抓取的精华页面,例如:https://www.zhihu.com/topic/19555550/top-answers
    (2)导入模板
    (3)替换 Start URL为要抓取的网页链接
    (4)开始抓取