7-6 微博某个帖子所有评论 - 图1

抓取的结果信息包含:

  • 评论内容

    结果示例图:

    7-6 微博某个帖子所有评论 - 图2

    模板:

    1. {"_id":"weibo-comments","startUrl":
    2. ["https://weibo.com/1627825392/IoraybEng?filter=hot&root_comment_id=0&type=comment"],"selectors":[{"id":"help","type":"SelectorElementScroll","parentSelectors":["_root"],"selector":"aaa","multiple":false,"delay":"2000"},{"id":"info","type":"SelectorElementClick","parentSelectors":["_root"],"selector":"div.list_li.S_line1.clearfix","multiple":true,"delay":"3000","clickElementSelector":"span.more_txt","clickType":"clickMore","discardInitialElements":"do-not-discard","clickElementUniquenessType":"uniqueCSSSelector"},{"id":"content","type":"SelectorText","parentSelectors":["info"],"selector":"div.WB_text","multiple":false,"regex":"","delay":0}]}

    模板套用步骤:

    (1)进入需要抓取的帖子评论页面,例如:https://weibo.com/1627825392/IoraybEng?filter=hot&root_comment_id=0&type=comment
    (2)导入模板
    (3)替换 Start URL为要抓取的网页链接
    (4)开始抓取