QiYuOr2 / node-spider-csdn

一个nodejs爬虫,用来获取博客文章

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

node-spider-csdn

这是一个使用NodeJs编写的的爬虫,用来获取CSDN博客文章

目录结构

node-spider-csdn
├─ .gitignore
├─ node_modules
├─ README.md
├─ index.js
├─ package-lock.json
├─ package.json
└─ routes
   └─ csdn.js

功能

  • 获得CSDN某用户原创文章

依赖

  • express
  • cheerio
  • superagent
  • eventproxy

运行

  • 安装node.js
  • 执行npm i
  • 执行node index.js

API文档

路由

/csdn/id id为csdn的用户id

格式

{
    status_code: 0,
    data:[
        {
            id: "123456",
            title: "标题",
            link: "文章连接",
            abstract: "文章概要",
            shared_time: "发布时间",
            read_count: "阅读数量",
            comment_count: "评论数量"
        },
        ...
    ]
}

About

一个nodejs爬虫,用来获取博客文章

License:MIT License


Languages

Language:JavaScript 100.0%