18-8 喜马拉雅某声音所有评论 - 图1

抓取的结果信息包含:

  • 评论内容
  • 评论时间
  • 点赞数

    结果示例图:

    18-8 喜马拉雅某声音所有评论 - 图2

    模板:

    1. {"_id":"ximalaya-comments","startUrl":["https://www.ximalaya.com/xiangsheng/9723091/45982332/p[1-5]"],"selectors":[{"id":"info","type":"SelectorElement","parentSelectors":
    2. ["_root"],"selector":".comment-list-box > div","multiple":true,"delay":0},{"id":"content","type":"SelectorText","parentSelectors":
    3. ["info"],"selector":"> div > p.comment-body","multiple":false,"regex":"","delay":0},{"id":"time","type":"SelectorText","parentSelectors":
    4. ["info"],"selector":"> div > div.comment-footer span.comment-time","multiple":false,"regex":"","delay":0},{"id":"likes","type":"SelectorText","parentSelectors":
    5. ["info"],"selector":"> div > div.comment-footer i","multiple":false,"regex":"","delay":0}]}

    模板套用步骤:

    (1)进入需要抓取的声音评论页面,例如:https://www.ximalaya.com/xiangsheng/9723091/45982332
    (2)导入模板
    (3)替换 Start URL为要抓取的网页链接,(抓取多页需修改 Start URL 里的页码数)
    (4)开始抓取