dawei-demo 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- package/index.js +12 -0
- package/package.json +17 -0
package/index.js
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
const { API } = require('dawei-core');
|
2
|
+
const axios = require('axios');
|
3
|
+
var instance = axios.create({
|
4
|
+
timeout: 1000,
|
5
|
+
headers: {'Cookie': 'll="118220"; bid=tNypoyRM11A; __utmc=30149280; __utmc=223695111; _vwo_uuid_v2=DFD2D78435504BB4E0C51FD3376E50429|7ac37f323b01b254dd2692e7d2ee8f56; gr_user_id=32dcc12a-13b5-48dc-b1b1-cf90e3391bc5; dbcl2="216486244:y5psqpV++FU"; ck=BhQ9; __utmz=223695111.1655369071.3.3.utmcsr=accounts.douban.com|utmccn=(referral)|utmcmd=referral|utmcct=/; push_noty_num=0; push_doumail_num=0; __utmv=30149280.21648; __utmz=30149280.1655947247.8.6.utmcsr=google|utmccn=(organic)|utmcmd=organic|utmctr=(not%20provided); __gads=ID=d833ede0323c5ade-229464cea9d40046:T=1655947249:RT=1655947249:S=ALNI_MZ0lheRgujXZY53BFds9o19eVYnWg; __gpi=UID=000006e1b0618030:T=1655947249:RT=1655947249:S=ALNI_MbciCThFK4VU2CM9UXUIvV6mFvjiw; _pk_ref.100001.4cf6=%5B%22%22%2C%22%22%2C1656318359%2C%22https%3A%2F%2Faccounts.douban.com%2F%22%5D; _pk_ses.100001.4cf6=*; __utma=30149280.43860434.1654302856.1655947247.1656318360.9; __utmt_douban=1; __utma=223695111.1165112140.1654302856.1655797016.1656318360.6; __utmb=223695111.0.10.1656318360; __utmt=1; __utmb=30149280.22.10.1656318360; _pk_id.100001.4cf6=9875ddc9447a4ccf.1654302855.6.1656318693.1655797679.'}
|
6
|
+
});
|
7
|
+
const getFilems = () => instance.get(API)
|
8
|
+
|
9
|
+
module.exports = getFilems;
|
10
|
+
|
11
|
+
// 测试代码,发布时删除
|
12
|
+
getFilems().then((res) => console.log(res.data.subjects));
|
package/package.json
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
{
|
2
|
+
"name": "dawei-demo",
|
3
|
+
"version": "0.0.1",
|
4
|
+
"description": "",
|
5
|
+
"main": "index.js",
|
6
|
+
"scripts": {
|
7
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
8
|
+
},
|
9
|
+
"keywords": [],
|
10
|
+
"author": "",
|
11
|
+
"license": "ISC",
|
12
|
+
"dependencies": {
|
13
|
+
"axios": "^0.27.2",
|
14
|
+
"dawei-core": "^0.0.1"
|
15
|
+
},
|
16
|
+
"gitHead": "45da64009edcaf89ad5d4d0c2d9ee44f7e99bf24"
|
17
|
+
}
|