18-3 喜马拉雅主播搜索结果 - 图1

抓取的结果信息包含:

  • 主播名字
  • 主播主页链接
  • 发布的声音数
  • 专辑数
  • 他关注的人
  • 粉丝数

    结果示例图:

    18-3 喜马拉雅主播搜索结果 - 图2

    模板:

    1. {"_id":"ximalaya-sosou-zhubo","startUrl":["https://www.ximalaya.com/search/zhubo/%E8%B5%9A%E9%92%B1/p[1-5]"],"selectors":[{"id":"info","type":"SelectorElement","parentSelectors":
    2. ["_root"],"selector":"div.anchor-container","multiple":true,"delay":0},{"id":"name","type":"SelectorLink","parentSelectors":
    3. ["info"],"selector":"a.anchor-link","multiple":false,"delay":0},{"id":"shengyinshu","type":"SelectorText","parentSelectors":["info"],"selector":"span.anchor-playCount","multiple":false,"regex":"","delay":0},{"id":"zhuanjishu","type":"SelectorText","parentSelectors":["info"],"selector":"span.anchor-albumCount","multiple":false,"regex":"","delay":0},{"id":"guanzhu","type":"SelectorText","parentSelectors":
    4. ["info"],"selector":"span.anchor-followings","multiple":false,"regex":"","delay":0},{"id":"fensi","type":"SelectorText","parentSelectors":
    5. ["info"],"selector":"span.anchor-followers","multiple":false,"regex":"","delay":0}]}

    模板套用步骤:

    (1)进入需要抓取的主播搜索结果页面,例如:https://www.ximalaya.com/search/zhubo/%E8%B5%9A%E9%92%B1/p2
    (2)导入模板
    (3)替换 Start URL为要抓取的网页链接,(抓取多页需修改 Start URL 里的页码数)
    (4)开始抓取