1-6 知乎搜索页“专栏”栏目结果 - 图1

抓取的结果信息包含:

  • 专栏名称
  • 专栏主页链接
  • 关注者
  • 文章数
  • 创建者
  • 专栏简介

    结果示例图:

    1-6 知乎搜索页“专栏”栏目结果 - 图2

    模板:

    1. {"_id":"zhihuzl","startUrl":["https://www.zhihu.com/search?q=%E7%8B%AC%E7%AB%8B%E5%BC%80%E5%8F%91%E8%80%85&type=column"],"selectors":[{"id":"outer","type":"SelectorElementScroll","parentSelectors":["_root"],"selector":"div.List-item","multiple":true,"delay":"2000"},{"id":"name","type":"SelectorLink","parentSelectors":
    2. ["outer"],"selector":"h2.ContentItem-title a","multiple":false,"delay":0},{"id":"follower","type":"SelectorText","parentSelectors":
    3. ["outer"],"selector":"a.Search-statusLink:nth-of-type(1)","multiple":false,"regex":"","delay":0},{"id":"articles","type":"SelectorText","parentSelectors":
    4. ["outer"],"selector":"a:nth-of-type(2)","multiple":false,"regex":"","delay":0},{"id":"author","type":"SelectorText","parentSelectors":
    5. ["outer"],"selector":"span.Search-statusLink","multiple":false,"regex":"","delay":0},{"id":"intro","type":"SelectorText","parentSelectors":["outer"],"selector":"div.ztext","multiple":false,"regex":"","delay":0}]}

    模板套用步骤:

    (1)进入知乎搜索结果专栏页面,例如:https://www.zhihu.com/search?q=%E7%8B%AC%E7%AB%8B%E5%BC%80%E5%8F%91%E8%80%85&type=column
    (2)导入模板
    (3)替换 Start URL为要抓取的网页链接
    (4)开始抓取