1 Star 0 Fork 0

xLong1029 / xlong-spider-egg

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

xlong-spider-egg

介绍

xlong-spider-egg 是一套基于Egg + Puppeteer + Sqlite3 开发的简易版爬虫项目(仅供学习和娱乐,请勿商用)。

项目说明

1. 包含功能

  • 可通过配置的节点获取小说内容并下载
  • 可通过配置的节点获取网页相关信息
  • 可截取网页图片,存储为jpg格式图片
  • 可获取网页信息,存储为pdf文件

2. 项目用到技术、框架与插件

Node.js
Egg.js
egg-view-nunjucks
puppeteer
node-sqlite3

3. 浏览器兼容性

响应式页面,主要兼容浏览器:IE10+、IE Edge、Safai、Firefox、Chrome等。

部分项目运行截图

  • 获取小说

Image text

Image text

Image text

  • 获取截图

Image text

  • 获取数据

Image text

目录结构

│  .autod.conf.js
│  .eslintignore
│  .eslintrc
│  .gitignore
│  .travis.yml
│  app.js // 项目启动配置,连接数据库
│  appveyor.yml
│  jsconfig.json
│  package.json
│  README.md

├─.vscode // vscode配置,用于配置less

├─static // 静态文件,保存项目截图

├─database
│     spider.db // SQLite数据库
│     README.md // 数据库设计说明

├─app
│  │  router.js // 路由配置
│  │
│  │
│  ├─controller
│  │   home.js // 前台相关controller
│  │
│  ├─extend
│  │     helper.js // 用来提供一些实用的 utility 函数
│  │
│  ├─public
│  │  │
│  │  ├─common // 通用模块
│  │  │
│  │  ├─upload // 爬取信息存储位置
│  │  │
│  │  └─home // 前台项目静态资源
│  │
│  ├─service // 用来执行具体的操作
│  │    sqliteDB.js // Sqlite查询封装方法
│  │    browser.js // 浏览器相关操作 
│  │    spider.js // 爬虫相关服务
│  │    store.js // 文件存储服务 
│  │    index.js // 前台服务
│  │
│  └─view // 模板文件

├─config
│     config.default.js // 项目配置相关
│     plugin.js // 插件

└─test // 测试相关
    └─app
        └─controller
            home.test.js

本地运行

  1. 安装前台依赖

npm install

  1. 运行项目
  • 默认端口启动:

npm run dev

访问地址:http://localhost:7001

项目打包

npm run build

作者联系方式

QQ:381612175 TEL: 18376686974

github:https://github.com/xLong1029/

站酷主页:http://xlong.zcool.com.cn/

UI中国:http://i.ui.cn/ucenter/358591.html

  • 此项目做学习Angular测试使用,有什么问题可联系我讨论
MIT License Copyright (c) 2023 xLong1029 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

基于Egg + Puppeteer + Sqlite3 开发的简易版爬虫项目 展开 收起
JavaScript 等 3 种语言
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/xlong1029/xlong-spider-egg.git
git@gitee.com:xlong1029/xlong-spider-egg.git
xlong1029
xlong-spider-egg
xlong-spider-egg
master

搜索帮助