6-2 今日头条某个作者所有文章 - 图1

抓取的结果信息包含:

  • 文章标题
  • 文章内容链接
  • 阅读数
  • 评论数
  • 时间

    结果示例图:

    6-2 今日头条某个作者所有文章 - 图2

    模板:

    1. {"_id":"toutiao-zuozhe","startUrl":["https://www.toutiao.com/c/user/71675144104/#mid=1580777298289678"],"selectors":[{"id":"info","type":"SelectorElementScroll","parentSelectors":["_root"],"selector":"li.item","multiple":true,"delay":"2000"},{"id":"title","type":"SelectorLink","parentSelectors":["info"],"selector":"a.link","multiple":false,"delay":0},{"id":"reads","type":"SelectorText","parentSelectors":["info"],"selector":"a[ga_event='article_read_count']","multiple":false,"regex":"","delay":0},{"id":"comments","type":"SelectorText","parentSelectors":["info"],"selector":"a.comment","multiple":false,"regex":"","delay":0},{"id":"time","type":"SelectorText","parentSelectors":["info"],"selector":"span.lbtn","multiple":false,"regex":"","delay":0}]}

    模板套用步骤:

    (1)进入需要抓取的作者文章页面,例如:https://www.toutiao.com/c/user/71675144104/#mid=1580777298289678
    (2)导入模板
    (3)替换 Start URL为要抓取的网页链接
    (4)开始抓取