2-4 豆瓣小组搜索结果 - 图1

抓取的结果信息包含:

  • 小组名字
  • 小组详情链接
  • 成员数
  • 简介

    结果示例图:

    2-4 豆瓣小组搜索结果 - 图2

    模板:

    ```

{“_id”:”douban-xiaozu”,”startUrl”:[“https://www.douban.com/search?cat=1019&q=%E5%91%A8%E6%9D%B0%E4%BC%A6"],"selectors":[{"id":"aaa","type":"SelectorElementClick","parentSelectors":["_root"],"selector":"div.result","multiple":true,"delay":"3000","clickElementSelector":"a.j","clickType":"clickMore","discardInitialElements":"do-not-discard","clickElementUniquenessType":"uniqueCSSSelector"},{"id":"name","type":"SelectorLink","parentSelectors“: [“aaa”],”selector”:”h3 a”,”multiple”:false,”delay”:0},{“id”:”peoples”,”type”:”SelectorText”,”parentSelectors”:[“aaa”],”selector”:”div.info”,”multiple”:false,”regex”:””,”delay”:0},{“id”:”intro”,”type”:”SelectorText”,”parentSelectors”:[“aaa”],”selector”:”p”,”multiple”:false,”regex”:””,”delay”:0}]} ``` 模板套用步骤:
(1)进入需要抓取的小组搜索结果页面,例如:https://www.douban.com/search?cat=1019&q=%E5%91%A8%E6%9D%B0%E4%BC%A6
(2)导入模板
(3)替换 Start URL为要抓取的网页链接
(4)开始抓取