@mr-quin/dango-manifests 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,130 @@
1
+ {
2
+ "apiVersion": 1,
3
+ "id": "builtin:iqiyi",
4
+ "name": "iQIYI",
5
+ "version": "0.2.0",
6
+ "hosts": [
7
+ "mesh.if.iqiyi.com",
8
+ "pcw-api.iq.com",
9
+ "pcw-api.iqiyi.com",
10
+ "www.iqiyi.com",
11
+ "cmts.iqiyi.com"
12
+ ],
13
+ "search": {
14
+ "inputs": ["q"],
15
+ "steps": [
16
+ {
17
+ "type": "http",
18
+ "id": "search",
19
+ "request": {
20
+ "method": "GET",
21
+ "url": "'https://mesh.if.iqiyi.com/portal/lw/search/homePageV3'",
22
+ "query": "{ 'key': q, 'current_page': '1', 'mode': '1', 'source': 'input', 'pcv': '13.074.22699', 'version': '13.074.22699', 'pageNum': '1', 'pageSize': '25', 'u': 'f6440fc5d919dca1aea12b6aff56e1c7', 'scale': '200', 'userVip': '0', 'vipType': '-1', 'osShortName': 'win10' }",
23
+ "rewriteHeaders": {
24
+ "Origin": "'https://www.iqiyi.com'",
25
+ "Referer": "'https://www.iqiyi.com/'"
26
+ }
27
+ }
28
+ }
29
+ ],
30
+ "output": "[search.data.templates[template in [101,102,103]].albumInfo[pageUrl ~> /iqiyi\\.com\\/v_/].($linkId := $regexExtract(pageUrl, '/v_(\\\\w+?)\\\\.html'); $chan := channel ? channel : ''; $mediaType := $contains($chan, '电影') ? '电影' : ($contains($chan, '动漫') ? '动漫' : ($contains($chan, '综艺') ? '综艺' : ($contains($chan, '纪录片') ? '纪录片' : '电视剧'))); { 'providerIds': { 'linkId': $linkId }, 'indexedId': $linkId, 'title': $replace(title, /<[^>]+>/, ''), 'type': $mediaType, 'year': year.value ? $number(year.value) : undefined, 'imageUrl': img ? img : imgH, 'episodeCount': videos and $count(videos) > 0 ? $count(videos) : ($regexExtract(subscriptContent ? subscriptContent : '', '(\\\\d+)') ? $number($regexExtract(subscriptContent ? subscriptContent : '', '(\\\\d+)')) : undefined) })]"
31
+ },
32
+ "episodes": {
33
+ "inputs": ["linkId"],
34
+ "steps": [
35
+ {
36
+ "type": "http",
37
+ "id": "decode",
38
+ "request": {
39
+ "method": "GET",
40
+ "url": "'https://pcw-api.iq.com/api/decode/' & linkId",
41
+ "query": "{ 'platformId': '3', 'modeCode': 'intl', 'langCode': 'sg' }"
42
+ },
43
+ "extract": { "tvid": "$string(data)" }
44
+ },
45
+ {
46
+ "type": "assign",
47
+ "id": "p",
48
+ "values": {
49
+ "params": "{ 'entity_id': decode.tvid, 'device_id': 'qd5fwuaj4hunxxdgzwkcqmefeb3ww5hx', 'auth_cookie': '', 'user_id': '0', 'vip_type': '-1', 'vip_status': '0', 'conduit_id': '', 'pcv': '13.082.22866', 'app_version': '13.082.22866', 'ext': '', 'app_mode': 'standard', 'scale': '100', 'timestamp': $string($millis()), 'src': 'pca_tvg', 'os': '', 'ad_ext': '{\"r\":\"2.2.0-ares6-pure\"}' }"
50
+ }
51
+ },
52
+ {
53
+ "type": "assign",
54
+ "id": "signed",
55
+ "values": {
56
+ "params": "$merge([p.params, { 'sign': $uppercase($md5($sortedRawString(p.params) & '&secret_key=howcuteitis')) }])"
57
+ }
58
+ },
59
+ {
60
+ "type": "http",
61
+ "id": "base",
62
+ "request": {
63
+ "method": "GET",
64
+ "url": "'https://www.iqiyi.com/prelw/tvg/v2/lw/base_info'",
65
+ "query": "signed.params",
66
+ "rewriteHeaders": { "Referer": "'https://www.iqiyi.com/'" }
67
+ },
68
+ "extract": {
69
+ "videoListEps": "[data.template.tabs[0].blocks[bk_type='video_list' and 'episodes' in tag].data.data.videos.data[content_type=1]]",
70
+ "albumGroups": "[data.template.tabs[0].blocks[bk_type='album_episodes' and 'episodes' in tag].data.data]"
71
+ }
72
+ },
73
+ {
74
+ "type": "forEach",
75
+ "id": "selectorPages",
76
+ "in": "[base.albumGroups[$type(videos) = 'string'].videos]",
77
+ "as": "selectorUrl",
78
+ "concurrency": 2,
79
+ "throttleMs": 0,
80
+ "request": {
81
+ "method": "GET",
82
+ "url": "selectorUrl",
83
+ "rewriteHeaders": { "Referer": "'https://www.iqiyi.com/'" }
84
+ },
85
+ "collect": "[data.videos.feature_paged.*[content_type=1]]"
86
+ }
87
+ ],
88
+ "output": "[[$append(base.videoListEps, $append(selectorPages, [base.albumGroups[$type(videos) = 'object'].videos.feature_paged.*[content_type=1]]))].($tvid := $regexExtract(play_url ? play_url : '', 'tvid=(\\\\d+)'); $tvid ? { 'providerIds': { 'tvid': $tvid }, 'indexedId': $tvid, 'title': $trim((short_display_name ? short_display_name : (title ? title : '')) & ' ' & (subtitle ? subtitle : '')), 'episodeNumber': album_order ? $number(album_order) : undefined } : undefined)]"
89
+ },
90
+ "danmaku": {
91
+ "inputs": ["tvid"],
92
+ "steps": [
93
+ {
94
+ "type": "http",
95
+ "id": "info",
96
+ "request": {
97
+ "method": "GET",
98
+ "url": "'https://pcw-api.iqiyi.com/video/video/baseinfo/' & tvid",
99
+ "rewriteHeaders": { "Referer": "'https://www.iqiyi.com/'" }
100
+ },
101
+ "extract": {
102
+ "durationSec": "data.durationSec",
103
+ "albumId": "$string(data.albumId)",
104
+ "categoryId": "$string(data.channelId ? data.channelId : data.categoryId)"
105
+ }
106
+ },
107
+ {
108
+ "type": "forEach",
109
+ "id": "segments",
110
+ "in": "$range(1, $ceil(info.durationSec / 300) + 1)",
111
+ "as": "i",
112
+ "concurrency": 3,
113
+ "throttleMs": 100,
114
+ "request": {
115
+ "method": "GET",
116
+ "url": "'https://cmts.iqiyi.com/bullet/' & $substring(tvid, $length(tvid) - 4, 2) & '/' & $substring(tvid, $length(tvid) - 2, 2) & '/' & tvid & '_300_' & $string(i) & '.z'",
117
+ "query": "{ 'rn': '0.123456789', 'business': 'danmu', 'is_iqiyi': 'true', 'is_video_page': 'true', 'tvid': tvid, 'albumid': info.albumId, 'categoryid': info.categoryId, 'qypid': '010102101000000000' }",
118
+ "format": "xml",
119
+ "decompress": "deflate",
120
+ "rewriteHeaders": { "Referer": "'https://www.iqiyi.com/'" }
121
+ },
122
+ "extract": {
123
+ "items": "[danmu.data.entry.list.bulletInfo]"
124
+ },
125
+ "collect": "items"
126
+ }
127
+ ],
128
+ "output": "[segments.{ 'p': $string($number(showTime)) & ',1,' & $string(color ? $hexToInt(color) : 16777215) & ',' & (contentId ? $string(contentId) : ''), 'm': content }]"
129
+ }
130
+ }
@@ -0,0 +1,96 @@
1
+ {
2
+ "apiVersion": 1,
3
+ "id": "builtin:maiduidui",
4
+ "name": "Maiduidui",
5
+ "version": "0.2.0",
6
+ "hosts": ["mob.mddcloud.com.cn"],
7
+ "search": {
8
+ "inputs": ["q"],
9
+ "steps": [
10
+ {
11
+ "type": "assign",
12
+ "id": "sig",
13
+ "values": {
14
+ "time": "$millis()",
15
+ "suffix": "'/searchApi/search/getAllSearchResult4820.action'",
16
+ "data": "{ 'keyWord': q }"
17
+ }
18
+ },
19
+ {
20
+ "type": "http",
21
+ "id": "search",
22
+ "request": {
23
+ "method": "POST",
24
+ "url": "'https://mob.mddcloud.com.cn' & sig.suffix",
25
+ "headers": {
26
+ "Content-Type": "'application/json'"
27
+ },
28
+ "rewriteHeaders": {
29
+ "User-Agent": "'Mdd/5.8.00 (Android+32+)'",
30
+ "Referer": "'mdd'"
31
+ },
32
+ "body": "{ 'channel': '1000', 'data': sig.data, 'deviceNum': '853BDD7A1DC011F1C341455071C03AEB', 'deviceType': 0, 'jsonSign': 0, 'os': 'Android', 'sign': $md5('os:Android|version:5.8.00|action:' & sig.suffix & '|time:' & $string(sig.time) & '|appToken:|privateKey:e1be6b4cf4021b3d181170d1879a530a9e4130b69032144d5568abfd6cd6c1c2|data:' & $sortedRawString(sig.data) & '&'), 'sourceVersion': 0, 'terminalType': 'APP', 'thirdStatus': 0, 'time': sig.time, 'version': '5.8.00', 'visitorStatus': 0 }"
33
+ }
34
+ }
35
+ ],
36
+ "output": "[search.data[typeName in ['剧集', '电影', '综艺']].($tn := typeName; vodList.{ 'providerIds': { 'vodUuid': uuid }, 'indexedId': uuid, 'title': name, 'type': $tn, 'year': $exists(year) ? $number(year) : undefined, 'imageUrl': coverImage, 'episodeCount': undefined })]"
37
+ },
38
+ "episodes": {
39
+ "inputs": ["vodUuid"],
40
+ "steps": [
41
+ {
42
+ "type": "assign",
43
+ "id": "sig",
44
+ "values": {
45
+ "time": "$millis()",
46
+ "suffix": "'/api/vod/listVodSactions.action'",
47
+ "data": "{ 'hasIntroduction': 0, 'vodUuid': vodUuid }"
48
+ }
49
+ },
50
+ {
51
+ "type": "http",
52
+ "id": "ep",
53
+ "request": {
54
+ "method": "POST",
55
+ "url": "'https://mob.mddcloud.com.cn' & sig.suffix",
56
+ "headers": {
57
+ "Content-Type": "'application/json'"
58
+ },
59
+ "rewriteHeaders": {
60
+ "User-Agent": "'Mdd/5.8.00 (Android+32+)'",
61
+ "Referer": "'mdd'"
62
+ },
63
+ "body": "{ 'channel': '1000', 'data': sig.data, 'deviceNum': '853BDD7A1DC011F1C341455071C03AEB', 'deviceType': 0, 'jsonSign': 0, 'os': 'Android', 'sign': $md5('os:Android|version:5.8.00|action:' & sig.suffix & '|time:' & $string(sig.time) & '|appToken:|privateKey:e1be6b4cf4021b3d181170d1879a530a9e4130b69032144d5568abfd6cd6c1c2|data:' & $sortedRawString(sig.data) & '&'), 'sourceVersion': 0, 'terminalType': 'APP', 'thirdStatus': 0, 'time': sig.time, 'version': '5.8.00', 'visitorStatus': 0 }"
64
+ }
65
+ }
66
+ ],
67
+ "output": "[ep.data.($idx := $; { 'providerIds': { 'sactionUuid': uuid, 'vodUuid': $$.vodUuid, 'durationSec': $exists(duration) ? $number(duration) : 0 }, 'indexedId': uuid, 'title': name ? name : ('第' & $string(sort) & '集'), 'episodeNumber': $exists(sort) ? $number(sort) : undefined })]"
68
+ },
69
+ "danmaku": {
70
+ "inputs": ["sactionUuid", "vodUuid", "durationSec"],
71
+ "steps": [
72
+ {
73
+ "type": "forEach",
74
+ "id": "segments",
75
+ "in": "$range(0, $ceil((durationSec > 0 ? durationSec : 5400) / 60))",
76
+ "as": "i",
77
+ "concurrency": 5,
78
+ "throttleMs": 50,
79
+ "request": {
80
+ "method": "POST",
81
+ "url": "'https://mob.mddcloud.com.cn/api/barrage/vodBarrage396.action'",
82
+ "headers": {
83
+ "Content-Type": "'application/json'"
84
+ },
85
+ "rewriteHeaders": {
86
+ "User-Agent": "'Mdd/5.8.00 (Android+32+)'",
87
+ "Referer": "'mdd'"
88
+ },
89
+ "body": "($t := $millis(); $sx := '/api/barrage/vodBarrage396.action'; $d := { 'sactionUuid': sactionUuid, 'times': i * 60, 'vodUuid': vodUuid }; { 'channel': '1000', 'data': $d, 'deviceNum': '853BDD7A1DC011F1C341455071C03AEB', 'deviceType': 0, 'jsonSign': 0, 'os': 'Android', 'sign': $md5('os:Android|version:5.8.00|action:' & $sx & '|time:' & $string($t) & '|appToken:|privateKey:e1be6b4cf4021b3d181170d1879a530a9e4130b69032144d5568abfd6cd6c1c2|data:' & $sortedRawString($d) & '&'), 'sourceVersion': 0, 'terminalType': 'APP', 'thirdStatus': 0, 'time': $t, 'version': '5.8.00', 'visitorStatus': 0 })"
90
+ },
91
+ "collect": "[data.barrageList]"
92
+ }
93
+ ],
94
+ "output": "[segments.{ 'p': $string(times) & ',1,' & $string($hexToInt($replace(color ? color : '#FFFFFF', /^#/, ''))) & ',' & (uuid ? $string(uuid) : ''), 'm': content }]"
95
+ }
96
+ }
@@ -0,0 +1,114 @@
1
+ {
2
+ "apiVersion": 1,
3
+ "id": "builtin:mango",
4
+ "name": "Mango TV",
5
+ "version": "0.2.0",
6
+ "hosts": [
7
+ "mobileso.bz.mgtv.com",
8
+ "pcweb.api.mgtv.com",
9
+ "galaxy.bz.mgtv.com",
10
+ "*.mgtv.com",
11
+ "*.hitv.com"
12
+ ],
13
+ "search": {
14
+ "inputs": ["q"],
15
+ "steps": [
16
+ {
17
+ "type": "http",
18
+ "id": "search",
19
+ "request": {
20
+ "method": "GET",
21
+ "url": "'https://mobileso.bz.mgtv.com/msite/search/v2'",
22
+ "query": "{ 'q': q, 'pc': '30', 'pn': '1', 'sort': '-99', 'ty': '0', 'du': '0', 'pt': '0', 'corr': '1', 'abroad': '0', '_support': '10000000000000000' }",
23
+ "rewriteHeaders": { "Referer": "'https://www.mgtv.com/'" }
24
+ }
25
+ }
26
+ ],
27
+ "output": "[search.data.contents[type='media'].data[source='imgo'].($cid := $regexExtract(url, '/b/(\\\\d+)'); { 'providerIds': { 'collectionId': $cid }, 'indexedId': $cid, 'title': $replace(title, /<[^>]+>/, ''), 'type': $substringBefore(desc[0], '/') ~> $replace('类型:', '') ~> $trim, 'year': $number($regexExtract(desc[0], '([12][890][0-9][0-9])')), 'imageUrl': img, 'episodeCount': videoCount })[providerIds.collectionId]]"
28
+ },
29
+ "episodes": {
30
+ "inputs": ["collectionId"],
31
+ "steps": [
32
+ {
33
+ "type": "http",
34
+ "id": "bootstrap",
35
+ "request": {
36
+ "method": "GET",
37
+ "url": "'https://pcweb.api.mgtv.com/variety/showlist'",
38
+ "query": "{ 'allowedRC': '1', 'collection_id': collectionId, 'month': '', 'page': '1', '_support': '10000000' }",
39
+ "rewriteHeaders": { "Referer": "'https://www.mgtv.com/'" }
40
+ },
41
+ "extract": {
42
+ "months": "data.tab_m.m"
43
+ }
44
+ },
45
+ {
46
+ "type": "forEach",
47
+ "id": "pages",
48
+ "in": "bootstrap.months",
49
+ "as": "month",
50
+ "request": {
51
+ "method": "GET",
52
+ "url": "'https://pcweb.api.mgtv.com/variety/showlist'",
53
+ "query": "{ 'allowedRC': '1', 'collection_id': collectionId, 'month': month, 'page': '1', '_support': '10000000' }",
54
+ "rewriteHeaders": { "Referer": "'https://www.mgtv.com/'" }
55
+ },
56
+ "extract": {
57
+ "items": "data.list"
58
+ },
59
+ "collect": "items",
60
+ "throttleMs": 100
61
+ }
62
+ ],
63
+ "output": "[$filter(pages, function($p) { $p.src_clip_id = collectionId }).($n := $regexExtract(t1 & t2, '第(\\\\d+)集'); { 'providerIds': { 'vid': video_id, 'cid': $string($$.collectionId) }, 'indexedId': $string(video_id), 'title': $trim(t1 & ' ' & t2), 'episodeNumber': $n ? $number($n) : undefined })]"
64
+ },
65
+ "danmaku": {
66
+ "inputs": ["cid", "vid"],
67
+ "steps": [
68
+ {
69
+ "type": "http",
70
+ "id": "info",
71
+ "request": {
72
+ "method": "GET",
73
+ "url": "'https://pcweb.api.mgtv.com/video/info'",
74
+ "query": "{ 'cid': cid, 'vid': vid }",
75
+ "rewriteHeaders": { "Referer": "'https://www.mgtv.com/'" }
76
+ },
77
+ "extract": {
78
+ "durationSec": "$timeToSeconds(data.info.time)"
79
+ }
80
+ },
81
+ {
82
+ "type": "http",
83
+ "id": "ctl",
84
+ "request": {
85
+ "method": "GET",
86
+ "url": "'https://galaxy.bz.mgtv.com/getctlbarrage'",
87
+ "query": "{ 'version': '8.1.39', 'abroad': '0', 'uuid': '', 'os': '10.15.7', 'platform': '0', 'mac': '', 'vid': vid, 'pid': '', 'cid': cid, 'ticket': '' }",
88
+ "rewriteHeaders": { "Referer": "'https://www.mgtv.com/'" }
89
+ },
90
+ "extract": {
91
+ "cdn": "$substringBefore(data.cdn_list, ',')",
92
+ "version": "data.cdn_version"
93
+ }
94
+ },
95
+ {
96
+ "type": "forEach",
97
+ "id": "segments",
98
+ "in": "(ctl.cdn and ctl.version) ? $range(0, $ceil(info.durationSec / 60)) : []",
99
+ "as": "i",
100
+ "request": {
101
+ "method": "GET",
102
+ "url": "'https://' & ctl.cdn & '/' & ctl.version & '/' & $string(i) & '.json'"
103
+ },
104
+ "extract": {
105
+ "items": "data.items"
106
+ },
107
+ "collect": "items",
108
+ "throttleMs": 50,
109
+ "concurrency": 4
110
+ }
111
+ ],
112
+ "output": "[segments.{ 'p': $string($number(time) / 1000) & ',1,16777215,' & $string(uid), 'm': content }]"
113
+ }
114
+ }
@@ -2,7 +2,7 @@
2
2
  "apiVersion": 1,
3
3
  "id": "builtin:migu",
4
4
  "name": "Migu Video",
5
- "version": "1.0.0",
5
+ "version": "0.2.0",
6
6
  "hosts": ["jadeite.migu.cn", "v3-sc.miguvideo.com", "webapi.miguvideo.com"],
7
7
  "search": {
8
8
  "inputs": ["q"],
@@ -51,7 +51,7 @@
51
51
  }
52
52
  }
53
53
  ],
54
- "output": "($epsIdStr := $string(epsId); [picked.items.{ 'providerIds': { 'epsId': $epsIdStr, 'pId': $string(pID) }, 'indexedId': $string(pID), 'title': name, 'episodeNumber': $exists(episodeNumber) ? episodeNumber : name }])"
54
+ "output": "($epsIdStr := $string(epsId); [picked.items.{ 'providerIds': { 'epsId': $epsIdStr, 'pId': $string(pID) }, 'indexedId': $string(pID), 'title': name, 'episodeNumber': $exists(episodeNumber) ? episodeNumber : undefined }])"
55
55
  },
56
56
  "danmaku": {
57
57
  "inputs": ["epsId", "pId"],
@@ -99,6 +99,6 @@
99
99
  "collect": "comments"
100
100
  }
101
101
  ],
102
- "output": "[segments.{ 'cid': $number(cid), 'p': $string(playtime) & ',1,' & $string($hexToInt(textcolor)), 'm': msg }]"
102
+ "output": "[segments.{ 'cid': $number(cid), 'p': $string(playtime) & ',1,' & $string(textcolor ? $hexToInt(textcolor) : 16777215), 'm': msg }]"
103
103
  }
104
104
  }
@@ -0,0 +1,122 @@
1
+ {
2
+ "apiVersion": 1,
3
+ "id": "builtin:renren",
4
+ "name": "Renren",
5
+ "version": "0.2.0",
6
+ "hosts": ["api.gorafie.com", "static-dm.qwdjapp.com"],
7
+ "search": {
8
+ "inputs": ["q"],
9
+ "steps": [
10
+ {
11
+ "type": "assign",
12
+ "id": "sig",
13
+ "values": {
14
+ "ts": "$millis()",
15
+ "path": "'/qwtv/search'",
16
+ "params": "{ 'searchWord': q, 'num': 30, 'searchNext': '', 'well': 'match' }"
17
+ }
18
+ },
19
+ {
20
+ "type": "http",
21
+ "id": "search",
22
+ "request": {
23
+ "method": "GET",
24
+ "url": "'https://api.gorafie.com' & sig.path",
25
+ "query": "sig.params",
26
+ "headers": {
27
+ "clientVersion": "'1.2.2'",
28
+ "p": "'Android'",
29
+ "deviceid": "'tWEtIN7JG2DTDkBBigvj6A%3D%3D'",
30
+ "token": "''",
31
+ "aliid": "'aYN4D0XfSREDAJaw3UAjG33K'",
32
+ "umid": "''",
33
+ "clienttype": "'android_qwtv_RRSP'",
34
+ "pkt": "'rrmj'",
35
+ "t": "$string(sig.ts)",
36
+ "sign": "$md5(sig.path & 't' & $string(sig.ts) & 'num' & $string(sig.params.num) & 'searchNext' & sig.params.searchNext & 'searchWord' & sig.params.searchWord & 'well' & sig.params.well & 'cf65GPholnICgyw1xbrpA79XVkizOdMq')",
37
+ "isAgree": "'1'",
38
+ "et": "'2'"
39
+ },
40
+ "rewriteHeaders": { "User-Agent": "'okhttp/3.12.13'" }
41
+ }
42
+ }
43
+ ],
44
+ "output": "[search.data[id and title].{ 'providerIds': { 'seriesId': $string(id) }, 'indexedId': $string(id), 'title': title, 'type': classify ? classify : 'Renren', 'year': $exists(year) ? $number(year) : undefined, 'imageUrl': cover }]"
45
+ },
46
+ "episodes": {
47
+ "inputs": ["seriesId"],
48
+ "steps": [
49
+ {
50
+ "type": "assign",
51
+ "id": "sig",
52
+ "values": {
53
+ "ts": "$millis()",
54
+ "path": "'/qwtv/drama/details'",
55
+ "params": "{ 'isAgeLimit': 'false', 'seriesId': seriesId, 'episodeId': '', 'clarity': 'HD', 'caption': '0', 'hevcOpen': '1' }"
56
+ }
57
+ },
58
+ {
59
+ "type": "http",
60
+ "id": "detail",
61
+ "request": {
62
+ "method": "GET",
63
+ "url": "'https://api.gorafie.com' & sig.path",
64
+ "query": "sig.params",
65
+ "headers": {
66
+ "clientVersion": "'1.2.2'",
67
+ "p": "'Android'",
68
+ "deviceid": "'tWEtIN7JG2DTDkBBigvj6A%3D%3D'",
69
+ "token": "''",
70
+ "aliid": "'aYN4D0XfSREDAJaw3UAjG33K'",
71
+ "umid": "''",
72
+ "clienttype": "'android_qwtv_RRSP'",
73
+ "pkt": "'rrmj'",
74
+ "t": "$string(sig.ts)",
75
+ "sign": "$md5(sig.path & 't' & $string(sig.ts) & 'caption' & sig.params.caption & 'clarity' & sig.params.clarity & 'episodeId' & sig.params.episodeId & 'hevcOpen' & sig.params.hevcOpen & 'isAgeLimit' & sig.params.isAgeLimit & 'seriesId' & sig.params.seriesId & 'cf65GPholnICgyw1xbrpA79XVkizOdMq')",
76
+ "isAgree": "'1'",
77
+ "et": "'2'"
78
+ },
79
+ "rewriteHeaders": { "User-Agent": "'okhttp/3.12.13'" }
80
+ }
81
+ }
82
+ ],
83
+ "output": "[detail.data.episodeList[sid].{ 'providerIds': { 'sid': $string(sid) }, 'indexedId': $string(sid), 'title': title and $length(title) > 0 ? title : ('第' & $string(episodeNo ? episodeNo : 1) & '集'), 'episodeNumber': $exists(episodeNo) ? $number(episodeNo) : undefined }]"
84
+ },
85
+ "danmaku": {
86
+ "inputs": ["sid"],
87
+ "steps": [
88
+ {
89
+ "type": "assign",
90
+ "id": "sig",
91
+ "values": {
92
+ "ts": "$millis()",
93
+ "path": "'/v1/produce/danmu/EPISODE/' & sid"
94
+ }
95
+ },
96
+ {
97
+ "type": "http",
98
+ "id": "fetch",
99
+ "request": {
100
+ "method": "GET",
101
+ "url": "'https://static-dm.qwdjapp.com' & sig.path",
102
+ "headers": {
103
+ "clientVersion": "'1.2.2'",
104
+ "p": "'Android'",
105
+ "deviceid": "'tWEtIN7JG2DTDkBBigvj6A%3D%3D'",
106
+ "token": "''",
107
+ "aliid": "'aYN4D0XfSREDAJaw3UAjG33K'",
108
+ "umid": "''",
109
+ "clienttype": "'android_qwtv_RRSP'",
110
+ "pkt": "'rrmj'",
111
+ "t": "$string(sig.ts)",
112
+ "sign": "$md5(sig.path & 't' & $string(sig.ts) & 'cf65GPholnICgyw1xbrpA79XVkizOdMq')",
113
+ "isAgree": "'1'",
114
+ "et": "'2'"
115
+ },
116
+ "rewriteHeaders": { "User-Agent": "'okhttp/3.12.13'" }
117
+ }
118
+ }
119
+ ],
120
+ "output": "[(fetch.data ? fetch.data : fetch).($parts := $split(p, ','); { 'p': $parts[0] & ',1,' & $parts[3] & ',' & $parts[6], 'm': d })]"
121
+ }
122
+ }
@@ -0,0 +1,70 @@
1
+ {
2
+ "apiVersion": 1,
3
+ "id": "builtin:sohu",
4
+ "name": "Sohu",
5
+ "version": "0.2.0",
6
+ "hosts": ["m.so.tv.sohu.com", "api.tv.sohu.com", "api.danmu.tv.sohu.com"],
7
+ "search": {
8
+ "inputs": ["q"],
9
+ "steps": [
10
+ {
11
+ "type": "http",
12
+ "id": "search",
13
+ "request": {
14
+ "method": "GET",
15
+ "url": "'https://m.so.tv.sohu.com/search/pc/keyword'",
16
+ "query": "{ 'key': q, 'type': '1', 'page': '1', 'page_size': '20', 'tabsChosen': '0', 'poster': '4', 'tuple': '6', 'extSource': '1', 'show_star_detail': '3', 'pay': '1', 'hl': '3', 'uid': $string($millis() * 1000), 'plat': '-1', 'ssl': '0' }",
17
+ "rewriteHeaders": {
18
+ "Referer": "'https://so.tv.sohu.com/'",
19
+ "Origin": "'https://so.tv.sohu.com'"
20
+ }
21
+ }
22
+ }
23
+ ],
24
+ "output": "[search.data.items[aid and album_name and site = 1 and (is_trailer ? is_trailer != 1 : true) and (corner_mark.text ? corner_mark.text != '预告' : true)].($metaTxt := [meta.txt][$contains($, '|')][0]; $type := $metaTxt ? $trim($split($metaTxt, '|')[0]) : 'Sohu'; { 'providerIds': { 'aid': $string(aid) }, 'indexedId': $string(aid), 'title': $replace(album_name, /<<<|>>>/, ''), 'type': $type, 'year': year ? $number(year) : undefined, 'imageUrl': ver_big_pic, 'episodeCount': total_video_count > 0 ? total_video_count : undefined })]"
25
+ },
26
+ "episodes": {
27
+ "inputs": ["aid"],
28
+ "steps": [
29
+ {
30
+ "type": "http",
31
+ "id": "album",
32
+ "request": {
33
+ "method": "GET",
34
+ "url": "'https://api.tv.sohu.com/v4/album/videos/' & aid & '.json'",
35
+ "query": "{ 'page': '1', 'page_size': '500' }",
36
+ "rewriteHeaders": { "Referer": "'https://tv.sohu.com/'" }
37
+ }
38
+ }
39
+ ],
40
+ "output": "[album.data.videos[$exists(vid)].{ 'providerIds': { 'vid': $string(vid), 'aid': $string(aid), 'durationSec': total_duration > 0 ? $number(total_duration) : 0 }, 'indexedId': $string(vid), 'title': video_name ? video_name : ('第' & $string(albumAbsoluteOrder ? albumAbsoluteOrder : 1) & '集'), 'episodeNumber': albumAbsoluteOrder ? $number(albumAbsoluteOrder) : undefined }]"
41
+ },
42
+ "danmaku": {
43
+ "inputs": ["vid", "aid", "durationSec"],
44
+ "steps": [
45
+ {
46
+ "type": "assign",
47
+ "id": "info",
48
+ "values": {
49
+ "maxTime": "durationSec > 0 ? $ceil(durationSec) : 10800"
50
+ }
51
+ },
52
+ {
53
+ "type": "forEach",
54
+ "id": "segments",
55
+ "in": "$range(0, $ceil(info.maxTime / 300))",
56
+ "as": "i",
57
+ "concurrency": 5,
58
+ "throttleMs": 50,
59
+ "request": {
60
+ "method": "GET",
61
+ "url": "'https://api.danmu.tv.sohu.com/dmh5/dmListAll'",
62
+ "query": "{ 'act': 'dmlist_v2', 'vid': vid, 'aid': aid, 'pct': '2', 'time_begin': $string(i * 300), 'time_end': $string((i + 1) * 300), 'dct': '1', 'request_from': 'h5_js' }",
63
+ "rewriteHeaders": { "Referer": "'https://tv.sohu.com/'" }
64
+ },
65
+ "collect": "info.comments"
66
+ }
67
+ ],
68
+ "output": "[segments.($cr := $string(t.c ? t.c : '16777215'); $color := $contains($cr, '#') ? $hexToInt($replace($cr, '#', '')) : $number($cr); $vt := v ? $string(v) : '0'; { 'p': $vt & ',1,' & $string($color) & ',' & (uid ? $string(uid) : ''), 'm': c })]"
69
+ }
70
+ }
@@ -2,7 +2,7 @@
2
2
  "apiVersion": 1,
3
3
  "id": "builtin:tencent",
4
4
  "name": "Tencent Video",
5
- "version": "1.0.0",
5
+ "version": "0.2.0",
6
6
  "hosts": ["pbaccess.video.qq.com", "dm.video.qq.com"],
7
7
  "urlMatch": [
8
8
  {
@@ -60,7 +60,7 @@
60
60
  "throttleMs": 100
61
61
  }
62
62
  ],
63
- "output": "[pages.{ 'providerIds': { 'vid': vid, 'cid': cid }, 'indexedId': vid, 'title': play_title, 'episodeNumber': title, 'alternativeTitle': union_title and union_title != '' ? [union_title] : undefined, 'imageUrl': image_url }]"
63
+ "output": "[pages.{ 'providerIds': { 'vid': vid, 'cid': cid }, 'indexedId': vid, 'title': play_title, 'episodeNumber': $match(title, /^\\d+$/) ? $number(title) : (title and title != '' ? title : undefined), 'alternativeTitle': union_title and union_title != '' ? [union_title] : undefined, 'imageUrl': image_url }]"
64
64
  },
65
65
  "danmaku": {
66
66
  "inputs": ["vid"],
@@ -102,7 +102,8 @@
102
102
  "collect": "barrage_list"
103
103
  }
104
104
  ],
105
- "output": "[segments.($s := content_style and content_style != '' ? $jsonParse(content_style) : null; $g := $s.gradient_colors; $hex := $exists($g[0]) and $g[0] != '' ? $g[0] : $s.color; $color := $exists($hex) and $hex != '' ? $hexToInt($replace($hex, /^#/, '')) : 16777215; { 'p': $string($number(time_offset) / 1000) & ',1,' & $string($color) & ',' & (vuid ? $string(vuid) : ''), 'm': content })]"
105
+ "output": "[segments]",
106
+ "map": "($s := content_style and content_style != '' ? $jsonParse(content_style) : null; $g := $s.gradient_colors; $hex := $exists($g[0]) and $g[0] != '' ? $g[0] : $s.color; $color := $exists($hex) and $hex != '' ? $hexToInt($replace($hex, /^#/, '')) : 16777215; { 'p': $string($number(time_offset) / 1000) & ',1,' & $string($color) & ',' & (vuid ? $string(vuid) : ''), 'm': content })"
106
107
  },
107
108
  "cookieSet": {
108
109
  "url": "https://v.qq.com",
@@ -173,6 +174,6 @@
173
174
  }
174
175
  }
175
176
  ],
176
- "output": "{ 'seasonInsert': { 'providerIds': { 'cid': picked.season.item_params.`report.cid` }, 'indexedId': picked.season.item_params.`report.cid`, 'title': picked.season.item_params.title, 'type': $string(picked.season.item_type), 'imageUrl': picked.season.item_params.new_pic_vt, 'episodeCount': picked.season.item_params.episode_all }, 'episodeMeta': $exists(picked.ep) ? { 'providerIds': { 'vid': picked.ep.vid }, 'indexedId': picked.ep.vid, 'title': picked.ep.play_title, 'episodeNumber': picked.ep.title, 'alternativeTitle': picked.ep.union_title and picked.ep.union_title != '' ? [picked.ep.union_title] : undefined, 'imageUrl': picked.ep.image_url } : undefined }"
177
+ "output": "{ 'seasonInsert': { 'providerIds': { 'cid': picked.season.item_params.`report.cid` }, 'indexedId': picked.season.item_params.`report.cid`, 'title': picked.season.item_params.title, 'type': $string(picked.season.item_type), 'imageUrl': picked.season.item_params.new_pic_vt, 'episodeCount': picked.season.item_params.episode_all }, 'episodeMeta': $exists(picked.ep) ? { 'providerIds': { 'vid': picked.ep.vid }, 'indexedId': picked.ep.vid, 'title': picked.ep.play_title, 'episodeNumber': $match(picked.ep.title, /^\\d+$/) ? $number(picked.ep.title) : (picked.ep.title and picked.ep.title != '' ? picked.ep.title : undefined), 'alternativeTitle': picked.ep.union_title and picked.ep.union_title != '' ? [picked.ep.union_title] : undefined, 'imageUrl': picked.ep.image_url } : undefined }"
177
178
  }
178
179
  }