tt-help-cli-ycl 1.0.7 → 1.1.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.
package/src/lib/filter.js CHANGED
@@ -1,66 +1,66 @@
1
- export function parseFilter(filterStr) {
2
- if (!filterStr) return null;
3
-
4
- const filter = {};
5
- const pairs = filterStr.split('&');
6
-
7
- for (const pair of pairs) {
8
- const [key, value] = pair.split('=');
9
- if (!key || value === undefined) continue;
10
-
11
- const trimmedKey = key.trim();
12
- const trimmedValue = value.trim();
13
-
14
- // 处理布尔值
15
- if (trimmedValue === 'true') {
16
- filter[trimmedKey] = true;
17
- } else if (trimmedValue === 'false') {
18
- filter[trimmedKey] = false;
19
- } else {
20
- // 支持逗号分隔的多个值(如 locationCreated=DE,ES)
21
- filter[trimmedKey] = trimmedValue.split(',').map(v => v.trim());
22
- }
23
- }
24
-
25
- return Object.keys(filter).length > 0 ? filter : null;
26
- }
27
-
28
- export function applyFilter(results, filter) {
29
- if (!filter || results.length === 0) return results;
30
-
31
- return results.filter(item => {
32
- for (const [key, expectedValue] of Object.entries(filter)) {
33
- const actualValue = item[key];
34
-
35
- // 如果字段不存在,过滤掉
36
- if (actualValue === undefined || actualValue === null) {
37
- return false;
38
- }
39
-
40
- // 数组值匹配(如 locationCreated=DE,ES)
41
- if (Array.isArray(expectedValue)) {
42
- if (!expectedValue.includes(String(actualValue))) {
43
- return false;
44
- }
45
- }
46
- // 布尔值或精确匹配
47
- else if (actualValue !== expectedValue) {
48
- return false;
49
- }
50
- }
51
- return true;
52
- });
53
- }
54
-
55
- export function formatFilterDescription(filter) {
56
- if (!filter) return '';
57
-
58
- const parts = Object.entries(filter).map(([key, value]) => {
59
- if (Array.isArray(value)) {
60
- return `${key}=${value.join(',')}`;
61
- }
62
- return `${key}=${value}`;
63
- });
64
-
65
- return parts.join(' & ');
66
- }
1
+ export function parseFilter(filterStr) {
2
+ if (!filterStr) return null;
3
+
4
+ const filter = {};
5
+ const pairs = filterStr.split('&');
6
+
7
+ for (const pair of pairs) {
8
+ const [key, value] = pair.split('=');
9
+ if (!key || value === undefined) continue;
10
+
11
+ const trimmedKey = key.trim();
12
+ const trimmedValue = value.trim();
13
+
14
+ // 处理布尔值
15
+ if (trimmedValue === 'true') {
16
+ filter[trimmedKey] = true;
17
+ } else if (trimmedValue === 'false') {
18
+ filter[trimmedKey] = false;
19
+ } else {
20
+ // 支持逗号分隔的多个值(如 locationCreated=DE,ES)
21
+ filter[trimmedKey] = trimmedValue.split(',').map(v => v.trim());
22
+ }
23
+ }
24
+
25
+ return Object.keys(filter).length > 0 ? filter : null;
26
+ }
27
+
28
+ export function applyFilter(results, filter) {
29
+ if (!filter || results.length === 0) return results;
30
+
31
+ return results.filter(item => {
32
+ for (const [key, expectedValue] of Object.entries(filter)) {
33
+ const actualValue = item[key];
34
+
35
+ // 如果字段不存在,过滤掉
36
+ if (actualValue === undefined || actualValue === null) {
37
+ return false;
38
+ }
39
+
40
+ // 数组值匹配(如 locationCreated=DE,ES)
41
+ if (Array.isArray(expectedValue)) {
42
+ if (!expectedValue.includes(String(actualValue))) {
43
+ return false;
44
+ }
45
+ }
46
+ // 布尔值或精确匹配
47
+ else if (actualValue !== expectedValue) {
48
+ return false;
49
+ }
50
+ }
51
+ return true;
52
+ });
53
+ }
54
+
55
+ export function formatFilterDescription(filter) {
56
+ if (!filter) return '';
57
+
58
+ const parts = Object.entries(filter).map(([key, value]) => {
59
+ if (Array.isArray(value)) {
60
+ return `${key}=${value.join(',')}`;
61
+ }
62
+ return `${key}=${value}`;
63
+ });
64
+
65
+ return parts.join(' & ');
66
+ }
@@ -1,6 +1,6 @@
1
- import { createRequire } from 'module';
2
-
3
- const require = createRequire(import.meta.url);
4
- const core = require('../get-user-videos-core.cjs');
5
-
1
+ import { createRequire } from 'module';
2
+
3
+ const require = createRequire(import.meta.url);
4
+ const core = require('../get-user-videos-core.cjs');
5
+
6
6
  export const runGetUserVideos = core.runGetUserVideos;
package/src/lib/io.js CHANGED
@@ -1,76 +1,76 @@
1
- import { writeFileSync, readFileSync } from 'fs';
2
-
3
- let lastBarCount = 0;
4
-
5
- export function writeOutput(data, outputFile) {
6
- const output = JSON.stringify(data, null, 2);
7
- const target = outputFile || 'tiktok_data.json';
8
- writeFileSync(target, output, 'utf-8');
9
- console.log(`结果已写入: ${target}`);
10
- }
11
-
12
- export function readUrlFile(filePath) {
13
- const content = readFileSync(filePath, 'utf-8');
14
- return content.split(/\r?\n/).map(l => l.trim()).filter(l => l.startsWith('http'));
15
- }
16
-
17
- export function createProgressBar(current, total, maxWidth = 30) {
18
- const filled = Math.round((current / total) * maxWidth);
19
- return '█'.repeat(filled).padEnd(maxWidth);
20
- }
21
-
22
- export function calculateConcurrency(total) {
23
- return Math.min(5, Math.max(1, Math.floor(total / 10)), total);
24
- }
25
-
26
- export function extractUrlDisplay(url) {
27
- try {
28
- const pathname = new URL(url).pathname;
29
- const parts = pathname.split('/').filter(Boolean);
30
- return parts.slice(-2).join('/');
31
- } catch {
32
- return url;
33
- }
34
- }
35
-
36
- export function createMultiProgressBars(count) {
37
- return Array.from({ length: count }, () => ({
38
- current: 0,
39
- total: 0,
40
- status: 'pending',
41
- url: '',
42
- }));
43
- }
44
-
45
- export function renderMultiProgressBars(bars, maxWidth = 30) {
46
- const activeBars = bars.filter(bar => bar.total > 0);
47
-
48
- if (activeBars.length === 0) return;
49
-
50
- const lines = activeBars.map((bar) => {
51
- const prog = createProgressBar(bar.current, bar.total, maxWidth);
52
- const icon = bar.status === 'done' ? '✓' :
53
- bar.status === 'error' ? '' : '⟳';
54
- const urlDisplay = bar.url ? extractUrlDisplay(bar.url) : '';
55
- return ` [${prog}] ${bar.current}/${bar.total} ${icon} ${urlDisplay}`;
56
- });
57
-
58
- const output = lines.join('\n');
59
-
60
- if (lastBarCount > 0) {
61
- process.stdout.write(`\x1b[${lastBarCount}A`);
62
- }
63
-
64
- process.stdout.write('\x1b[0J');
65
- process.stdout.write(output + '\n');
66
-
67
- lastBarCount = activeBars.length;
68
- }
69
-
70
- export function clearProgressBars() {
71
- if (lastBarCount > 0) {
72
- process.stdout.write(`\x1b[${lastBarCount}A`);
73
- process.stdout.write('\x1b[0J');
74
- lastBarCount = 0;
75
- }
76
- }
1
+ import { writeFileSync, readFileSync } from 'fs';
2
+
3
+ let lastBarCount = 0;
4
+
5
+ export function writeOutput(data, outputFile) {
6
+ const output = JSON.stringify(data, null, 2);
7
+ const target = outputFile || 'tiktok_data.json';
8
+ writeFileSync(target, output, 'utf-8');
9
+ console.log(`结果已写入: ${target}`);
10
+ }
11
+
12
+ export function readUrlFile(filePath) {
13
+ const content = readFileSync(filePath, 'utf-8');
14
+ return content.split(/\r?\n/).map(l => l.trim()).filter(l => l.startsWith('http'));
15
+ }
16
+
17
+ export function createProgressBar(current, total, maxWidth = 30) {
18
+ const filled = Math.round((current / total) * maxWidth);
19
+ return '█'.repeat(filled).padEnd(maxWidth);
20
+ }
21
+
22
+ export function calculateConcurrency(total) {
23
+ return Math.min(5, Math.max(1, Math.floor(total / 10)), total);
24
+ }
25
+
26
+ export function extractUrlDisplay(url) {
27
+ try {
28
+ const pathname = new URL(url).pathname;
29
+ const parts = pathname.split('/').filter(Boolean);
30
+ return parts.slice(-2).join('/');
31
+ } catch {
32
+ return url;
33
+ }
34
+ }
35
+
36
+ export function createMultiProgressBars(count) {
37
+ return Array.from({ length: count }, () => ({
38
+ current: 0,
39
+ total: 0,
40
+ status: 'pending',
41
+ url: '',
42
+ }));
43
+ }
44
+
45
+ export function renderMultiProgressBars(bars, maxWidth = 30) {
46
+ const activeBars = bars.filter(bar => bar.total > 0);
47
+
48
+ if (activeBars.length === 0) return;
49
+
50
+ const lines = activeBars.map((bar) => {
51
+ const prog = createProgressBar(bar.current, bar.total, maxWidth);
52
+ const icon = bar.status === 'done' ? '✓' :
53
+ bar.status === 'error' ? '' : '⟳';
54
+ const urlDisplay = bar.url ? extractUrlDisplay(bar.url) : '';
55
+ return ` [${prog}] ${bar.current}/${bar.total} ${icon} ${urlDisplay}`;
56
+ });
57
+
58
+ const output = lines.join('\n');
59
+
60
+ if (lastBarCount > 0) {
61
+ process.stdout.write(`\x1b[${lastBarCount}A`);
62
+ }
63
+
64
+ process.stdout.write('\x1b[0J');
65
+ process.stdout.write(output + '\n');
66
+
67
+ lastBarCount = activeBars.length;
68
+ }
69
+
70
+ export function clearProgressBars() {
71
+ if (lastBarCount > 0) {
72
+ process.stdout.write(`\x1b[${lastBarCount}A`);
73
+ process.stdout.write('\x1b[0J');
74
+ lastBarCount = 0;
75
+ }
76
+ }
package/src/lib/output.js CHANGED
@@ -1,80 +1,80 @@
1
- export function deduplicate(results) {
2
- const seen = new Set();
3
- return results.filter(r => {
4
- if (r.id) {
5
- const key = r.id;
6
- if (seen.has(key)) return false;
7
- seen.add(key);
8
- return true;
9
- }
10
- const key = r.secUid || r.uniqueId;
11
- if (seen.has(key)) return false;
12
- seen.add(key);
13
- return true;
14
- });
15
- }
16
-
17
- export function formatTable(data) {
18
- if (data.length === 0) return '';
19
-
20
- if (data.length === 1) {
21
- const lines = [];
22
- for (const [key, val] of Object.entries(data[0])) {
23
- if (typeof val === 'string' && val.length > 80) {
24
- lines.push(` ${key}: ${val.substring(0, 80)}...`);
25
- } else {
26
- lines.push(` ${key}: ${val}`);
27
- }
28
- }
29
- return lines.join('\n');
30
- }
31
-
32
- const cols = [
33
- { key: 'uniqueId', label: '用户名', width: 20 },
34
- { key: 'locationCreated', label: '地区', width: 6 },
35
- { key: 'nickname', label: '昵称', width: 20 },
36
- { key: 'ttSeller', label: 'TT卖家', width: 8 },
37
- { key: 'verified', label: '已认证', width: 8 },
38
- { key: 'followerCount', label: '粉丝', width: 10 },
39
- { key: 'videoCount', label: '视频', width: 8 },
40
- ];
41
-
42
- for (const row of data) {
43
- for (const col of cols) {
44
- const val = String(row[col.key] ?? '-');
45
- col.width = Math.max(col.width, val.length, col.label.length);
46
- }
47
- }
48
-
49
- const sep = (w) => '-'.repeat(w);
50
- const pad = (s, w) => s.padEnd(w);
51
-
52
- const header = cols.map(c => pad(c.label, c.width)).join(' │ ');
53
- const divider = cols.map(c => sep(c.width)).join('-+-');
54
- const rows = data.map(r =>
55
- cols.map(c => pad(String(r[c.key] ?? '-'), c.width)).join(' │ ')
56
- );
57
-
58
- return [header, divider, ...rows].join('\n');
59
- }
60
-
61
- export function formatOutput(data, format) {
62
- if (format === 'table') return formatTable(data);
63
-
64
- if (format === 'raw') {
65
- if (Array.isArray(data) && data.length > 0 && 'url' in data[0]) {
66
- return data.map(d => d.url).join('\n');
67
- }
68
- if (Array.isArray(data) && data.length > 0 && 'uniqueId' in data[0]) {
69
- return data.map(d => `https://www.tiktok.com/@${d.uniqueId}`).join('\n');
70
- }
71
- return JSON.stringify(data, null, 2);
72
- }
73
-
74
- // Default JSON output, but for explore results (url-only) output pure text
75
- if (Array.isArray(data) && data.length > 0 && 'url' in data[0]) {
76
- return data.map(d => d.url).join('\n');
77
- }
78
-
79
- return JSON.stringify(data, null, 2);
80
- }
1
+ export function deduplicate(results) {
2
+ const seen = new Set();
3
+ return results.filter(r => {
4
+ if (r.id) {
5
+ const key = r.id;
6
+ if (seen.has(key)) return false;
7
+ seen.add(key);
8
+ return true;
9
+ }
10
+ const key = r.secUid || r.uniqueId;
11
+ if (seen.has(key)) return false;
12
+ seen.add(key);
13
+ return true;
14
+ });
15
+ }
16
+
17
+ export function formatTable(data) {
18
+ if (data.length === 0) return '';
19
+
20
+ if (data.length === 1) {
21
+ const lines = [];
22
+ for (const [key, val] of Object.entries(data[0])) {
23
+ if (typeof val === 'string' && val.length > 80) {
24
+ lines.push(` ${key}: ${val.substring(0, 80)}...`);
25
+ } else {
26
+ lines.push(` ${key}: ${val}`);
27
+ }
28
+ }
29
+ return lines.join('\n');
30
+ }
31
+
32
+ const cols = [
33
+ { key: 'uniqueId', label: '用户名', width: 20 },
34
+ { key: 'locationCreated', label: '地区', width: 6 },
35
+ { key: 'nickname', label: '昵称', width: 20 },
36
+ { key: 'ttSeller', label: 'TT卖家', width: 8 },
37
+ { key: 'verified', label: '已认证', width: 8 },
38
+ { key: 'followerCount', label: '粉丝', width: 10 },
39
+ { key: 'videoCount', label: '视频', width: 8 },
40
+ ];
41
+
42
+ for (const row of data) {
43
+ for (const col of cols) {
44
+ const val = String(row[col.key] ?? '-');
45
+ col.width = Math.max(col.width, val.length, col.label.length);
46
+ }
47
+ }
48
+
49
+ const sep = (w) => '-'.repeat(w);
50
+ const pad = (s, w) => s.padEnd(w);
51
+
52
+ const header = cols.map(c => pad(c.label, c.width)).join(' │ ');
53
+ const divider = cols.map(c => sep(c.width)).join('-+-');
54
+ const rows = data.map(r =>
55
+ cols.map(c => pad(String(r[c.key] ?? '-'), c.width)).join(' │ ')
56
+ );
57
+
58
+ return [header, divider, ...rows].join('\n');
59
+ }
60
+
61
+ export function formatOutput(data, format) {
62
+ if (format === 'table') return formatTable(data);
63
+
64
+ if (format === 'raw') {
65
+ if (Array.isArray(data) && data.length > 0 && 'url' in data[0]) {
66
+ return data.map(d => d.url).join('\n');
67
+ }
68
+ if (Array.isArray(data) && data.length > 0 && 'uniqueId' in data[0]) {
69
+ return data.map(d => `https://www.tiktok.com/@${d.uniqueId}`).join('\n');
70
+ }
71
+ return JSON.stringify(data, null, 2);
72
+ }
73
+
74
+ // Default JSON output, but for explore results (url-only) output pure text
75
+ if (Array.isArray(data) && data.length > 0 && 'url' in data[0]) {
76
+ return data.map(d => d.url).join('\n');
77
+ }
78
+
79
+ return JSON.stringify(data, null, 2);
80
+ }
package/src/lib/parser.js CHANGED
@@ -1,47 +1,47 @@
1
- import { USER_SECTION_SIZE } from './constants.js';
2
-
3
- export function extractUserSection(html) {
4
- const idx = html.indexOf('"uniqueId"');
5
- if (idx < 0) return null;
6
- return html.substring(idx, idx + USER_SECTION_SIZE);
7
- }
8
-
9
- export function parseUserSection(section) {
10
- const data = {};
11
-
12
- for (const key of ['uniqueId', 'uid', 'secUid']) {
13
- const m = section.match(new RegExp(`"${key}":"([^"]*)`));
14
- if (m) data[key] = m[1];
15
- }
16
-
17
- for (const key of ['nickname', 'signature']) {
18
- const m = section.match(new RegExp(`"${key}":"((?:[^"\\\\]|\\\\.)*)"`, 'g'));
19
- if (m) {
20
- const raw = m[0].replace(`"${key}":"`, '').replace(/"$/, '');
21
- data[key] = raw.replace(/\\n/g, '\n').replace(/\\\\/g, '\\');
22
- }
23
- }
24
-
25
- for (const key of ['ttSeller', 'verified']) {
26
- const m = section.match(new RegExp(`"${key}":\\s*(true|false)`));
27
- data[key] = m ? m[1] === 'true' : undefined;
28
- }
29
-
30
- for (const key of ['followerCount', 'followingCount', 'heartCount', 'videoCount', 'diggCount']) {
31
- const m = section.match(new RegExp(`"${key}":(\\d+)`));
32
- if (m) data[key] = parseInt(m[1], 10);
33
- }
34
-
35
- const mt = section.match(/"createTime":(\d+)/);
36
- if (mt) data.createTime = parseInt(mt[1], 10);
37
-
38
- const ma = section.match(/"avatarLarger":"([^"]*)/);
39
- if (ma) data.avatarLarger = ma[1].replace(/\\u002F/g, '/');
40
-
41
- return data;
42
- }
43
-
44
- export function extractLocationCreated(html) {
45
- const m = html.match(/"locationCreated":"([^"]*)/);
46
- return m ? m[1] : null;
47
- }
1
+ import { USER_SECTION_SIZE } from './constants.js';
2
+
3
+ export function extractUserSection(html) {
4
+ const idx = html.indexOf('"uniqueId"');
5
+ if (idx < 0) return null;
6
+ return html.substring(idx, idx + USER_SECTION_SIZE);
7
+ }
8
+
9
+ export function parseUserSection(section) {
10
+ const data = {};
11
+
12
+ for (const key of ['uniqueId', 'uid', 'secUid']) {
13
+ const m = section.match(new RegExp(`"${key}":"([^"]*)`));
14
+ if (m) data[key] = m[1];
15
+ }
16
+
17
+ for (const key of ['nickname', 'signature']) {
18
+ const m = section.match(new RegExp(`"${key}":"((?:[^"\\\\]|\\\\.)*)"`, 'g'));
19
+ if (m) {
20
+ const raw = m[0].replace(`"${key}":"`, '').replace(/"$/, '');
21
+ data[key] = raw.replace(/\\n/g, '\n').replace(/\\\\/g, '\\');
22
+ }
23
+ }
24
+
25
+ for (const key of ['ttSeller', 'verified']) {
26
+ const m = section.match(new RegExp(`"${key}":\\s*(true|false)`));
27
+ data[key] = m ? m[1] === 'true' : undefined;
28
+ }
29
+
30
+ for (const key of ['followerCount', 'followingCount', 'heartCount', 'videoCount', 'diggCount']) {
31
+ const m = section.match(new RegExp(`"${key}":(\\d+)`));
32
+ if (m) data[key] = parseInt(m[1], 10);
33
+ }
34
+
35
+ const mt = section.match(/"createTime":(\d+)/);
36
+ if (mt) data.createTime = parseInt(mt[1], 10);
37
+
38
+ const ma = section.match(/"avatarLarger":"([^"]*)/);
39
+ if (ma) data.avatarLarger = ma[1].replace(/\\u002F/g, '/');
40
+
41
+ return data;
42
+ }
43
+
44
+ export function extractLocationCreated(html) {
45
+ const m = html.match(/"locationCreated":"([^"]*)/);
46
+ return m ? m[1] : null;
47
+ }
@@ -1,6 +1,6 @@
1
- import { createRequire } from 'module';
2
-
3
- const require = createRequire(import.meta.url);
4
- const core = require('../scraper/core.cjs');
5
-
1
+ import { createRequire } from 'module';
2
+
3
+ const require = createRequire(import.meta.url);
4
+ const core = require('../scraper/core.cjs');
5
+
6
6
  export const runScrape = core.runScrape;
package/src/lib/scrape.js CHANGED
@@ -1,39 +1,39 @@
1
- import { extractUserSection, parseUserSection, extractLocationCreated } from './parser.js';
2
- import { fetchHtml, makeProfileUrl, isProfileUrl, isVideoUrl, extractProfileHandle } from './fetcher.js';
3
-
4
- export async function extractUserData(profileUrl, proxyUrl) {
5
- const profileHtml = await fetchHtml(profileUrl, proxyUrl);
6
- const section = extractUserSection(profileHtml);
7
- if (!section) throw new Error('无法解析用户信息');
8
- const data = parseUserSection(section);
9
- data.locationCreated = extractLocationCreated(profileHtml);
10
- return data;
11
- }
12
-
13
- export async function extractVideoLocation(videoUrl, proxyUrl) {
14
- const videoHtml = await fetchHtml(videoUrl, proxyUrl);
15
- return extractLocationCreated(videoHtml);
16
- }
17
-
18
- export async function processUrl(url, proxyUrl) {
19
- if (isProfileUrl(url)) {
20
- const profileUrl = makeProfileUrl(url);
21
- const profileData = await extractUserData(profileUrl, proxyUrl);
22
- return [profileData];
23
- }
24
-
25
- if (isVideoUrl(url)) {
26
- const profileHandle = extractProfileHandle(url);
27
- if (!profileHandle) throw new Error(`无法从视频URL提取用户主页: ${url}`);
28
-
29
- const profileUrl = makeProfileUrl(profileHandle);
30
- const [profileData, locationCreated] = await Promise.all([
31
- extractUserData(profileUrl, proxyUrl),
32
- extractVideoLocation(url, proxyUrl),
33
- ]);
34
-
35
- return [{ ...profileData, locationCreated }];
36
- }
37
-
38
- return [];
39
- }
1
+ import { extractUserSection, parseUserSection, extractLocationCreated } from './parser.js';
2
+ import { fetchHtml, makeProfileUrl, isProfileUrl, isVideoUrl, extractProfileHandle } from './fetcher.js';
3
+
4
+ export async function extractUserData(profileUrl, proxyUrl) {
5
+ const profileHtml = await fetchHtml(profileUrl, proxyUrl);
6
+ const section = extractUserSection(profileHtml);
7
+ if (!section) throw new Error('无法解析用户信息');
8
+ const data = parseUserSection(section);
9
+ data.locationCreated = extractLocationCreated(profileHtml);
10
+ return data;
11
+ }
12
+
13
+ export async function extractVideoLocation(videoUrl, proxyUrl) {
14
+ const videoHtml = await fetchHtml(videoUrl, proxyUrl);
15
+ return extractLocationCreated(videoHtml);
16
+ }
17
+
18
+ export async function processUrl(url, proxyUrl) {
19
+ if (isProfileUrl(url)) {
20
+ const profileUrl = makeProfileUrl(url);
21
+ const profileData = await extractUserData(profileUrl, proxyUrl);
22
+ return [profileData];
23
+ }
24
+
25
+ if (isVideoUrl(url)) {
26
+ const profileHandle = extractProfileHandle(url);
27
+ if (!profileHandle) throw new Error(`无法从视频URL提取用户主页: ${url}`);
28
+
29
+ const profileUrl = makeProfileUrl(profileHandle);
30
+ const [profileData, locationCreated] = await Promise.all([
31
+ extractUserData(profileUrl, proxyUrl),
32
+ extractVideoLocation(url, proxyUrl),
33
+ ]);
34
+
35
+ return [{ ...profileData, locationCreated }];
36
+ }
37
+
38
+ return [];
39
+ }