-
Notifications
You must be signed in to change notification settings - Fork 2
/
examples.js
44 lines (32 loc) · 1.8 KB
/
examples.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
let { createDoubanDataGetter, getDoubanItemInfo } = require('./src/douban-data-getter-func-creater');
let saveDoubanData = require('./src/save-douban-data-to-local');
let DoubanTypeEnum = require('./src/config/doubanEnum');
// 存储文件夹路径
const STORE_PATH = 'douban-data-backup';
// 豆瓣帐号
const userName = "hqweay";
let getDoubanWatchedMovies = createDoubanDataGetter(DoubanTypeEnum.watchedMovies);
let getDoubanWishMovies = createDoubanDataGetter(DoubanTypeEnum.wishMovies);
let getDoubanWatchingMovies = createDoubanDataGetter(DoubanTypeEnum.watchingMovies);
let getDoubanReadBooks = createDoubanDataGetter(DoubanTypeEnum.readBooks);
let getDoubanWishBooks = createDoubanDataGetter(DoubanTypeEnum.wishBooks);
let getDoubanReadingBooks = createDoubanDataGetter(DoubanTypeEnum.readingBooks);
let getDoubanListenedMusics = createDoubanDataGetter(DoubanTypeEnum.listenedMusic);
let getDoubanWishMusics = createDoubanDataGetter(DoubanTypeEnum.wishMusics);
let getDoubanListeningMusics = createDoubanDataGetter(DoubanTypeEnum.listeningMusics);
let getDoubanPlayedGames = createDoubanDataGetter(DoubanTypeEnum.playedGames);
let getDoubanWishGames = createDoubanDataGetter(DoubanTypeEnum.wishGames);
let getDoubanPlayingGames = createDoubanDataGetter(DoubanTypeEnum.playingGames);
// getDoubanItemInfo(DoubanTypeEnum.movie, 6424756).then(data => {
// console.log(data);
// });
getDoubanItemInfo(DoubanTypeEnum.book, 35732399).then(data => {
console.log(data);
});
// getDoubanReadBooks(userName, pageStart = 1, pageEnd = 2, sleepTimer = 1500).then(function (data) {
// // 数据、路径、文件名
// saveDoubanData(data, STORE_PATH + "/hqweay/book/", "readBooks");
// })
// getDoubanWishMovies(userName, pageStart = 1, pageEnd = 1, sleepTimer = 1500).then(function (data) {
// console.log("sssssss");
// });