2-8 豆瓣豆列下所有文章 - 图2

抓取的结果信息包含:

  • 文章名称
  • 文章内容链接
  • 简介
  • 喜欢数
  • 发布时间

    结果示例图:

    2-8 豆瓣豆列下所有文章 - 图3

    模板:

    1. {"_id":"doulie","startUrl":["https://www.douban.com/doulist/37059404/?start=[0-300:25]&sort=time&playable=0&sub_type="],"selectors":[{"id":"outer","type":"SelectorElement","parentSelectors":
    2. ["_root"],"selector":"div:nth-of-type(n+6) div.mod","multiple":true,"delay":"2000"},{"id":"title","type":"SelectorLink","parentSelectors":
    3. ["outer"],"selector":"div.title a","multiple":false,"delay":0},{"id":"intro","type":"SelectorText","parentSelectors":["outer"],"selector":"div.abstract","multiple":false,"regex":"","delay":0},{"id":"likes","type":"SelectorText","parentSelectors":["outer"],"selector":"span.count","multiple":false,"regex":"","delay":0},{"id":"time","type":"SelectorText","parentSelectors":
    4. ["outer"],"selector":".time span","multiple":false,"regex":"","delay":0}]}

    模板套用步骤:

    (1)进入需要抓取的豆列页面,例如:https://www.douban.com/doulist/37059404/?start=0&sort=time&playable=0&sub_type=
    (2)导入模板
    (3)替换 Start URL为要抓取的网页链接(抓取多页需修改 Start URL 里的页码数)
    (4)开始抓取