Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lxxyx/ncu-online
NCU OnlineEdu Helper
https://github.com/lxxyx/ncu-online
Last synced: about 1 month ago
JSON representation
NCU OnlineEdu Helper
- Host: GitHub
- URL: https://github.com/lxxyx/ncu-online
- Owner: Lxxyx
- Created: 2016-03-19T08:59:23.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2016-03-19T10:51:23.000Z (almost 9 years ago)
- Last Synced: 2024-12-15T09:37:45.198Z (about 1 month ago)
- Language: JavaScript
- Size: 6.84 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
## 介绍
用于登录网络教学平台,进行爬虫操作。
## 运行方式
```javascript
npm install ncu-online --save
npm install request --save
```
### 使用:
```javascript
var request = require('request')
var nol = require('ncu-online')
// 函数内填JSON文件地址
nol.getLogin({
username: '' // 你的用户名
password: '' // 你的密码
})
.then(options => {
// 设置登录后,获取页面的地址:
options.uri = // 要获取的网址
request(options,(err,res,body) => {
// 这个进行获取到页面的操作
// 需要有使用request的基础
})
})
.catch(err => {
//处理错误
console.log(err)
})
```
## 开发
```
git clone https://github.com/Lxxyx/ncu-online
cd ncu-online
npm install
gulp
```