-
Notifications
You must be signed in to change notification settings - Fork 285
Expand file tree
/
Copy path播客[听].js
More file actions
85 lines (84 loc) · 2.6 KB
/
播客[听].js
File metadata and controls
85 lines (84 loc) · 2.6 KB
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
/*
@header({
searchable: 0,
filterable: 0,
quickSearch: 0,
title: '播客[听]',
'类型': '听书',
lang: 'ds'
})
*/
var rule = {
类型: '听书',
title: '播客[听]',
host: 'https://getpodcast.xyz',
url: '/fyclass',
searchUrl: '',
searchable: 0,
quickSearch: 0,
headers: {
'User-Agent': 'PC_UA'
},
timeout: 5000,
class_name: '播客&人文&NEWS热点&影视与读书&教育&历史&音乐&情感&有声书',
class_url: '0&1&2&3&4&5&6&7&8',
cate_exclude: '',
play_parse: true,
lazy: async function () {
let {input} = this;
return {jx: 0, url: input, parse: 0}
},
limit: 6,
推荐: async function () {
let {input, HOST, pdfh, pd, pdfa} = this;
let d = [];
let html = await request(HOST);
let list = pdfa(html, 'body&&.pic_list:eq(0)&&li');
list.forEach(it => {
d.push({
title: pdfh(it, '.title&&Text'),
pic_url: pdfh(it, 'img&&src'),
url: pd(it, 'a&&href') + '|' + pdfh(it, '.title&&Text') + '|' + pdfh(it, 'img&&src')
});
})
return setResult(d);
},
一级: async function () {
let {input, HOST, MY_CATE, pdfh, pd, pdfa} = this;
let d = [];
let html = await request(HOST);
let list = pdfa(html, 'body&&.pic_list:eq(list_idx)&&li'.replace("list_idx", MY_CATE));
list.forEach(it => {
d.push({
title: pdfh(it, '.title&&Text'),
pic_url: pdfh(it, 'img&&src'),
url: pd(it, 'a&&href') + '|' + pdfh(it, '.title&&Text') + '|' + pdfh(it, 'img&&src')
});
})
return setResult(d);
},
二级: async function () {
let {input, pdfh, pdfa} = this;
let purl = input.split('|')[0];
let title = input.split('|')[1];
let pic = input.split('|')[2];
let html = await request(purl);
let VOD = {};
VOD.vod_name = title;
VOD.vod_pic = pic;
if (typeof play_url === 'undefined') {
var play_url = ''
}
let episodes = pdfa(html, 'body&&item');
// log('episodes =========>' + episodes);
let vod_play_url = episodes.map(function (it) {
let ititle = it.match(/<title>(.*?)<\/title>/)[1].replace(/<!\[CDATA\[|\]\]>||<!\[CDATA\[|\]\]>/g, '');
let iurl = pdfh(it, 'enclosure&&url');
return ititle + '$' + iurl
}).join('#')
VOD.vod_play_from = '道长在线';
VOD.vod_play_url = vod_play_url
return VOD
},
搜索: '',
}