30-3 携程酒店评论内容-待定 - 图2

抓取的结果信息包含:

  • 评分
  • 使用类型
  • 入住时间
  • 房间类型
  • 评论内容
  • 评论时间

    结果示例图:

    image (20).png

    模板:

    1. {"_id":"ctrip","startUrl":["https://hotels.ctrip.com/hotel/beijing1#ctm_ref=hod_hp_sb_lst"],"selectors":[{"id":"info","type":"SelectorElementClick","parentSelectors":["_root"],"selector":"div[data-adposition='0']","multiple":true,"delay":"10000","clickElementSelector":"a.c_down","clickType":"clickMore","discardInitialElements":"do-not-discard","clickElementUniquenessType":"uniqueCSSSelector"},{"id":"name","type":"SelectorLink","parentSelectors":
    2. ["info"],"selector":".hotel_name a","multiple":false,"delay":0},{"id":"score","type":"SelectorText","parentSelectors":["info"],"selector":"span.hotel_value","multiple":false,"regex":"","delay":0},{"id":"price","type":"SelectorText","parentSelectors":["info"],"selector":"span.J_price_lowList","multiple":false,"regex":"","delay":0},{"id":"address","type":"SelectorText","parentSelectors":["info"],"selector":"p.hotel_item_htladdress","multiple":false,"regex":"","delay":0}]}

    模板套用步骤:

    (1)进入需要抓取的酒店页面,例如:https://hotels.ctrip.com/hotel/beijing1#ctm_ref=hod_hp_sb_lst
    (2)导入模板
    (3)替换 Start URL为要抓取的网页链接
    (4)开始抓取

需要停止时,可以断网

小提示:如需增加筛选条件,可以增大 page load delay ,然后在弹出的窗口筛选后,即可进行相应抓取