n8n-nodes-redlib 0.1.1 → 1.0.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/README.md +101 -201
- package/dist/credentials/RedlibApi.credentials.d.ts +10 -0
- package/dist/credentials/RedlibApi.credentials.js +80 -0
- package/dist/credentials/RedlibApi.credentials.js.map +1 -0
- package/dist/icons/redlib.dark.svg +11 -0
- package/dist/icons/redlib.svg +11 -0
- package/dist/nodes/Redlib/Redlib.node.d.ts +5 -0
- package/dist/nodes/Redlib/Redlib.node.js +322 -0
- package/dist/nodes/Redlib/Redlib.node.js.map +1 -0
- package/dist/nodes/Redlib/Redlib.node.json +18 -0
- package/dist/nodes/Redlib/resources/post/get.d.ts +2 -0
- package/dist/nodes/Redlib/resources/post/get.js +31 -0
- package/dist/nodes/Redlib/resources/post/get.js.map +1 -0
- package/dist/nodes/Redlib/resources/post/getAll.d.ts +2 -0
- package/dist/nodes/Redlib/resources/post/getAll.js +60 -0
- package/dist/nodes/Redlib/resources/post/getAll.js.map +1 -0
- package/dist/nodes/Redlib/resources/post/index.d.ts +2 -0
- package/dist/nodes/Redlib/resources/post/index.js +67 -0
- package/dist/nodes/Redlib/resources/post/index.js.map +1 -0
- package/dist/nodes/Redlib/resources/post/search.d.ts +2 -0
- package/dist/nodes/Redlib/resources/post/search.js +113 -0
- package/dist/nodes/Redlib/resources/post/search.js.map +1 -0
- package/dist/nodes/Redlib/resources/postComment/get.d.ts +2 -0
- package/dist/nodes/Redlib/resources/postComment/get.js +44 -0
- package/dist/nodes/Redlib/resources/postComment/get.js.map +1 -0
- package/dist/nodes/Redlib/resources/postComment/getAll.d.ts +2 -0
- package/dist/nodes/Redlib/resources/postComment/getAll.js +44 -0
- package/dist/nodes/Redlib/resources/postComment/getAll.js.map +1 -0
- package/dist/nodes/Redlib/resources/postComment/index.d.ts +2 -0
- package/dist/nodes/Redlib/resources/postComment/index.js +67 -0
- package/dist/nodes/Redlib/resources/postComment/index.js.map +1 -0
- package/dist/nodes/Redlib/resources/postComment/search.d.ts +2 -0
- package/dist/nodes/Redlib/resources/postComment/search.js +44 -0
- package/dist/nodes/Redlib/resources/postComment/search.js.map +1 -0
- package/dist/nodes/Redlib/resources/subreddit/get.d.ts +2 -0
- package/dist/nodes/Redlib/resources/subreddit/get.js +19 -0
- package/dist/nodes/Redlib/resources/subreddit/get.js.map +1 -0
- package/dist/nodes/Redlib/resources/subreddit/getAll.d.ts +2 -0
- package/dist/nodes/Redlib/resources/subreddit/getAll.js +29 -0
- package/dist/nodes/Redlib/resources/subreddit/getAll.js.map +1 -0
- package/dist/nodes/Redlib/resources/subreddit/index.d.ts +2 -0
- package/dist/nodes/Redlib/resources/subreddit/index.js +67 -0
- package/dist/nodes/Redlib/resources/subreddit/index.js.map +1 -0
- package/dist/nodes/Redlib/resources/subreddit/search.d.ts +2 -0
- package/dist/nodes/Redlib/resources/subreddit/search.js +32 -0
- package/dist/nodes/Redlib/resources/subreddit/search.js.map +1 -0
- package/dist/nodes/Redlib/shared/utils.d.ts +85 -0
- package/dist/nodes/Redlib/shared/utils.js +313 -0
- package/dist/nodes/Redlib/shared/utils.js.map +1 -0
- package/dist/package.json +8 -7
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +8 -7
- package/dist/credentials/GithubIssuesApi.credentials.d.ts +0 -10
- package/dist/credentials/GithubIssuesApi.credentials.js +0 -37
- package/dist/credentials/GithubIssuesApi.credentials.js.map +0 -1
- package/dist/credentials/GithubIssuesOAuth2Api.credentials.d.ts +0 -9
- package/dist/credentials/GithubIssuesOAuth2Api.credentials.js +0 -54
- package/dist/credentials/GithubIssuesOAuth2Api.credentials.js.map +0 -1
- package/dist/icons/github.dark.svg +0 -3
- package/dist/icons/github.svg +0 -3
- package/dist/nodes/Example/Example.node.d.ts +0 -5
- package/dist/nodes/Example/Example.node.js +0 -61
- package/dist/nodes/Example/Example.node.js.map +0 -1
- package/dist/nodes/Example/Example.node.json +0 -18
- package/dist/nodes/Example/example.dark.svg +0 -13
- package/dist/nodes/Example/example.svg +0 -13
- package/dist/nodes/GithubIssues/GithubIssues.node.d.ts +0 -14
- package/dist/nodes/GithubIssues/GithubIssues.node.js +0 -101
- package/dist/nodes/GithubIssues/GithubIssues.node.js.map +0 -1
- package/dist/nodes/GithubIssues/GithubIssues.node.json +0 -18
- package/dist/nodes/GithubIssues/listSearch/getIssues.d.ts +0 -2
- package/dist/nodes/GithubIssues/listSearch/getIssues.js +0 -28
- package/dist/nodes/GithubIssues/listSearch/getIssues.js.map +0 -1
- package/dist/nodes/GithubIssues/listSearch/getRepositories.d.ts +0 -2
- package/dist/nodes/GithubIssues/listSearch/getRepositories.js +0 -31
- package/dist/nodes/GithubIssues/listSearch/getRepositories.js.map +0 -1
- package/dist/nodes/GithubIssues/listSearch/getUsers.d.ts +0 -2
- package/dist/nodes/GithubIssues/listSearch/getUsers.js +0 -29
- package/dist/nodes/GithubIssues/listSearch/getUsers.js.map +0 -1
- package/dist/nodes/GithubIssues/resources/issue/create.d.ts +0 -2
- package/dist/nodes/GithubIssues/resources/issue/create.js +0 -75
- package/dist/nodes/GithubIssues/resources/issue/create.js.map +0 -1
- package/dist/nodes/GithubIssues/resources/issue/get.d.ts +0 -2
- package/dist/nodes/GithubIssues/resources/issue/get.js +0 -15
- package/dist/nodes/GithubIssues/resources/issue/get.js.map +0 -1
- package/dist/nodes/GithubIssues/resources/issue/getAll.d.ts +0 -2
- package/dist/nodes/GithubIssues/resources/issue/getAll.js +0 -125
- package/dist/nodes/GithubIssues/resources/issue/getAll.js.map +0 -1
- package/dist/nodes/GithubIssues/resources/issue/index.d.ts +0 -2
- package/dist/nodes/GithubIssues/resources/issue/index.js +0 -76
- package/dist/nodes/GithubIssues/resources/issue/index.js.map +0 -1
- package/dist/nodes/GithubIssues/resources/issueComment/getAll.d.ts +0 -2
- package/dist/nodes/GithubIssues/resources/issueComment/getAll.js +0 -66
- package/dist/nodes/GithubIssues/resources/issueComment/getAll.js.map +0 -1
- package/dist/nodes/GithubIssues/resources/issueComment/index.d.ts +0 -2
- package/dist/nodes/GithubIssues/resources/issueComment/index.js +0 -48
- package/dist/nodes/GithubIssues/resources/issueComment/index.js.map +0 -1
- package/dist/nodes/GithubIssues/shared/descriptions.d.ts +0 -4
- package/dist/nodes/GithubIssues/shared/descriptions.js +0 -151
- package/dist/nodes/GithubIssues/shared/descriptions.js.map +0 -1
- package/dist/nodes/GithubIssues/shared/transport.d.ts +0 -2
- package/dist/nodes/GithubIssues/shared/transport.js +0 -16
- package/dist/nodes/GithubIssues/shared/transport.js.map +0 -1
- package/dist/nodes/GithubIssues/shared/utils.d.ts +0 -3
- package/dist/nodes/GithubIssues/shared/utils.js +0 -17
- package/dist/nodes/GithubIssues/shared/utils.js.map +0 -1
|
@@ -0,0 +1,313 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.HTMLParser = void 0;
|
|
4
|
+
exports.parseTimestamp = parseTimestamp;
|
|
5
|
+
exports.parseScore = parseScore;
|
|
6
|
+
exports.parseComments = parseComments;
|
|
7
|
+
exports.parseSubscribers = parseSubscribers;
|
|
8
|
+
exports.parsePostElement = parsePostElement;
|
|
9
|
+
exports.parseCommentElement = parseCommentElement;
|
|
10
|
+
exports.parseSubredditInfo = parseSubredditInfo;
|
|
11
|
+
class HTMLParser {
|
|
12
|
+
constructor(html) {
|
|
13
|
+
this.html = html;
|
|
14
|
+
}
|
|
15
|
+
findAll(selector) {
|
|
16
|
+
const results = [];
|
|
17
|
+
if (selector === '.post') {
|
|
18
|
+
const regex = /<div[^>]*class="post[^"]*"[^>]*id="([^"]*)"(?:[\s\S]*?)<\/div>\s*(?=<div class="post"|<hr|<\/main>|<\/body>)/gi;
|
|
19
|
+
let match;
|
|
20
|
+
while ((match = regex.exec(this.html)) !== null) {
|
|
21
|
+
results.push(new HTMLElement(match[0], this.html));
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
else if (selector === '.comment') {
|
|
25
|
+
const regex = /<div[^>]*class="comment[^"]*"(?:[\s\S]*?)<\/div>\s*(?=<div class="comment"|<\/div>\s*$)/gi;
|
|
26
|
+
let match;
|
|
27
|
+
while ((match = regex.exec(this.html)) !== null) {
|
|
28
|
+
results.push(new HTMLElement(match[0], this.html));
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
else if (selector === '#sub_title') {
|
|
32
|
+
const regex = /<h1[^>]*id="sub_title"[^>]*>([^<]+)<\/h1>/i;
|
|
33
|
+
const match = regex.exec(this.html);
|
|
34
|
+
if (match) {
|
|
35
|
+
results.push(new HTMLElement(match[0], this.html));
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
else if (selector === '#sub_name') {
|
|
39
|
+
const regex = /<p[^>]*id="sub_name"[^>]*>([^<]+)<\/p>/i;
|
|
40
|
+
const match = regex.exec(this.html);
|
|
41
|
+
if (match) {
|
|
42
|
+
results.push(new HTMLElement(match[0], this.html));
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
else if (selector === '#sub_description') {
|
|
46
|
+
const regex = /<p[^>]*id="sub_description"[^>]*>([^<]+)<\/p>/i;
|
|
47
|
+
const match = regex.exec(this.html);
|
|
48
|
+
if (match) {
|
|
49
|
+
results.push(new HTMLElement(match[0], this.html));
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
else if (selector === '#sub_details div') {
|
|
53
|
+
const regex = /<div[^>]*id="sub_details"[^>]*>[\s\S]*?<div[^>]*title="([^"]*)"[^>]*>/gi;
|
|
54
|
+
let match;
|
|
55
|
+
let count = 0;
|
|
56
|
+
while ((match = regex.exec(this.html)) !== null && count < 2) {
|
|
57
|
+
results.push(new HTMLElement(match[0], this.html));
|
|
58
|
+
count++;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
return results;
|
|
62
|
+
}
|
|
63
|
+
findFirst(selector) {
|
|
64
|
+
const results = this.findAll(selector);
|
|
65
|
+
return results.length > 0 ? results[0] : null;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
exports.HTMLParser = HTMLParser;
|
|
69
|
+
class HTMLElement {
|
|
70
|
+
constructor(element, fullHtml) {
|
|
71
|
+
this.element = element;
|
|
72
|
+
this.fullHtml = fullHtml;
|
|
73
|
+
}
|
|
74
|
+
attr(name) {
|
|
75
|
+
const regex = new RegExp(`\\s${name}="([^"]*)"`, 'i');
|
|
76
|
+
const match = this.element.match(regex);
|
|
77
|
+
return match ? match[1] : null;
|
|
78
|
+
}
|
|
79
|
+
text() {
|
|
80
|
+
return this.element
|
|
81
|
+
.replace(/<[^>]+>/g, '')
|
|
82
|
+
.replace(/ /g, ' ')
|
|
83
|
+
.replace(/&/g, '&')
|
|
84
|
+
.replace(/</g, '<')
|
|
85
|
+
.replace(/>/g, '>')
|
|
86
|
+
.replace(/"/g, '"')
|
|
87
|
+
.replace(/'/g, "'")
|
|
88
|
+
.trim();
|
|
89
|
+
}
|
|
90
|
+
html() {
|
|
91
|
+
return this.element;
|
|
92
|
+
}
|
|
93
|
+
find(selector) {
|
|
94
|
+
const results = [];
|
|
95
|
+
if (selector === '.post_title a') {
|
|
96
|
+
const regex = /<h2[^>]*class="post_title"[^>]*>[\s\S]*?<a[^>]*href="([^"]*)"[^>]*>([\s\S]*?)<\/a>/i;
|
|
97
|
+
const match = this.element.match(regex);
|
|
98
|
+
if (match) {
|
|
99
|
+
results.push(new HTMLElement(match[0], this.fullHtml));
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
else if (selector === '.post_subreddit') {
|
|
103
|
+
const regex = /<a[^>]*class="post_subreddit"[^>]*>([^<]+)<\/a>/i;
|
|
104
|
+
const match = this.element.match(regex);
|
|
105
|
+
if (match) {
|
|
106
|
+
results.push(new HTMLElement(match[0], this.fullHtml));
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
else if (selector === '.post_author') {
|
|
110
|
+
const regex = /<a[^>]*class="post_author[^"]*"[^>]*>([^<]*)<\/a>/i;
|
|
111
|
+
const match = this.element.match(regex);
|
|
112
|
+
if (match) {
|
|
113
|
+
results.push(new HTMLElement(match[0], this.fullHtml));
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
else if (selector === '.created') {
|
|
117
|
+
const regex = /<span[^>]*class="created"[^>]*title="([^"]*)"[^>]*>([^<]*)<\/span>/i;
|
|
118
|
+
const match = this.element.match(regex);
|
|
119
|
+
if (match) {
|
|
120
|
+
results.push(new HTMLElement(match[0], this.fullHtml));
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
else if (selector === '.post_score') {
|
|
124
|
+
const regex = /<div[^>]*class="post_score"[^>]*title="([^"]*)"[^>]*>[\s\S]*?<\/div>/i;
|
|
125
|
+
const match = this.element.match(regex);
|
|
126
|
+
if (match) {
|
|
127
|
+
results.push(new HTMLElement(match[0], this.fullHtml));
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
else if (selector === '.post_comments') {
|
|
131
|
+
const regex = /<a[^>]*class="post_comments"[^>]*title="([^"]*)"[^>]*href="([^"]*)"[^>]*>/i;
|
|
132
|
+
const match = this.element.match(regex);
|
|
133
|
+
if (match) {
|
|
134
|
+
results.push(new HTMLElement(match[0], this.fullHtml));
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
else if (selector === '.post_body .md') {
|
|
138
|
+
const regex = /<div[^>]*class="post_body[^"]*"[^>]*>[\s\S]*?<div[^>]*class="md"[^>]*>([\s\S]*?)<\/div>/i;
|
|
139
|
+
const match = this.element.match(regex);
|
|
140
|
+
if (match) {
|
|
141
|
+
results.push(new HTMLElement(match[0], this.fullHtml));
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
else if (selector === '.post_flair span') {
|
|
145
|
+
const regex = /<a[^>]*class="post_flair"[^>]*>[\s\S]*?<span>([^<]*)<\/span>/i;
|
|
146
|
+
const match = this.element.match(regex);
|
|
147
|
+
if (match) {
|
|
148
|
+
results.push(new HTMLElement(match[0], this.fullHtml));
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
return results;
|
|
152
|
+
}
|
|
153
|
+
findFirst(selector) {
|
|
154
|
+
const results = this.find(selector);
|
|
155
|
+
return results.length > 0 ? results[0] : null;
|
|
156
|
+
}
|
|
157
|
+
each(callback) {
|
|
158
|
+
callback(0, this);
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
function parseTimestamp(timestamp) {
|
|
162
|
+
const relativeMatch = timestamp.match(/(\d+)([dhm])\s+ago/);
|
|
163
|
+
if (relativeMatch) {
|
|
164
|
+
const value = parseInt(relativeMatch[1], 10);
|
|
165
|
+
const unit = relativeMatch[2];
|
|
166
|
+
const now = Date.now() / 1000;
|
|
167
|
+
switch (unit) {
|
|
168
|
+
case 'd':
|
|
169
|
+
return now - value * 86400;
|
|
170
|
+
case 'h':
|
|
171
|
+
return now - value * 3600;
|
|
172
|
+
case 'm':
|
|
173
|
+
return now - value * 60;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
const absoluteMatch = timestamp.match(/([A-Za-z]+ \d{2} \d{4}, \d{2}:\d{2}:\d{2}) UTC/);
|
|
177
|
+
if (absoluteMatch) {
|
|
178
|
+
const date = new Date(absoluteMatch[1] + ' UTC');
|
|
179
|
+
return date.getTime() / 1000;
|
|
180
|
+
}
|
|
181
|
+
return Date.now() / 1000;
|
|
182
|
+
}
|
|
183
|
+
function parseScore(scoreText) {
|
|
184
|
+
if (scoreText === 'Hidden' || scoreText === '•') {
|
|
185
|
+
return 0;
|
|
186
|
+
}
|
|
187
|
+
const match = scoreText.match(/(\d+)/);
|
|
188
|
+
return match ? parseInt(match[1], 10) : 0;
|
|
189
|
+
}
|
|
190
|
+
function parseComments(commentsText) {
|
|
191
|
+
const match = commentsText.match(/(\d+) comments?/);
|
|
192
|
+
return match ? parseInt(match[1], 10) : 0;
|
|
193
|
+
}
|
|
194
|
+
function parseSubscribers(subscribersText) {
|
|
195
|
+
if (subscribersText.includes('k')) {
|
|
196
|
+
return parseFloat(subscribersText.replace('k', '').replace(/,/g, '').trim()) * 1000;
|
|
197
|
+
}
|
|
198
|
+
if (subscribersText.includes('m')) {
|
|
199
|
+
return parseFloat(subscribersText.replace('m', '').replace(/,/g, '').trim()) * 1000000;
|
|
200
|
+
}
|
|
201
|
+
return parseInt(subscribersText.replace(/,/g, ''), 10) || 0;
|
|
202
|
+
}
|
|
203
|
+
function parsePostElement($, element) {
|
|
204
|
+
const id = element.attr('id') || '';
|
|
205
|
+
const titleElements = element.find('.post_title a');
|
|
206
|
+
const titleEl = titleElements.length > 0 ? titleElements[0] : null;
|
|
207
|
+
const title = titleEl ? titleEl.text().trim() : '';
|
|
208
|
+
const url = titleEl ? titleEl.attr('href') || '' : '';
|
|
209
|
+
const subredditElements = element.find('.post_subreddit');
|
|
210
|
+
const subredditEl = subredditElements.length > 0 ? subredditElements[0] : null;
|
|
211
|
+
const subreddit = subredditEl ? subredditEl.text().replace('r/', '').trim() : '';
|
|
212
|
+
const authorElements = element.find('.post_author');
|
|
213
|
+
const authorEl = authorElements.length > 0 ? authorElements[0] : null;
|
|
214
|
+
const author = authorEl ? authorEl.text().replace('u/', '').trim() : '';
|
|
215
|
+
const createdElements = element.find('.created');
|
|
216
|
+
const createdEl = createdElements.length > 0 ? createdElements[0] : null;
|
|
217
|
+
const createdText = createdEl ? (createdEl.attr('title') || createdEl.text() || '') : '';
|
|
218
|
+
const createdUtc = parseTimestamp(createdText);
|
|
219
|
+
const scoreElements = element.find('.post_score');
|
|
220
|
+
const scoreEl = scoreElements.length > 0 ? scoreElements[0] : null;
|
|
221
|
+
const scoreText = scoreEl ? (scoreEl.attr('title') || scoreEl.text() || '0') : '0';
|
|
222
|
+
const score = parseScore(scoreText.trim());
|
|
223
|
+
const commentsElements = element.find('.post_comments');
|
|
224
|
+
const commentsEl = commentsElements.length > 0 ? commentsElements[0] : null;
|
|
225
|
+
const commentsText = commentsEl ? commentsEl.attr('title') || commentsEl.text() || '0 comments' : '0 comments';
|
|
226
|
+
const numComments = parseComments(commentsText);
|
|
227
|
+
const bodyElements = element.find('.post_body .md');
|
|
228
|
+
const bodyEl = bodyElements.length > 0 ? bodyElements[0] : null;
|
|
229
|
+
let selftext = '';
|
|
230
|
+
if (bodyEl) {
|
|
231
|
+
selftext = bodyEl.html();
|
|
232
|
+
selftext = selftext
|
|
233
|
+
.replace(/<p>/gi, '\n\n')
|
|
234
|
+
.replace(/<\/p>/gi, '')
|
|
235
|
+
.replace(/<br\s*\/?>/gi, '\n')
|
|
236
|
+
.replace(/<[^>]*>/g, '')
|
|
237
|
+
.replace(/ /g, ' ')
|
|
238
|
+
.replace(/&/g, '&')
|
|
239
|
+
.replace(/</g, '<')
|
|
240
|
+
.replace(/>/g, '>')
|
|
241
|
+
.replace(/"/g, '"')
|
|
242
|
+
.replace(/'/g, "'")
|
|
243
|
+
.trim();
|
|
244
|
+
}
|
|
245
|
+
const flairElements = element.find('.post_flair span');
|
|
246
|
+
const flairEl = flairElements.length > 0 ? flairElements[0] : null;
|
|
247
|
+
const linkFlairText = flairEl ? flairEl.text().trim() : undefined;
|
|
248
|
+
const commentsLink = commentsEl ? commentsEl.attr('href') || '' : '';
|
|
249
|
+
const permalink = commentsLink || `/r/${subreddit}/comments/${id}/`;
|
|
250
|
+
return {
|
|
251
|
+
id,
|
|
252
|
+
title,
|
|
253
|
+
author,
|
|
254
|
+
subreddit,
|
|
255
|
+
selftext,
|
|
256
|
+
score,
|
|
257
|
+
num_comments: numComments,
|
|
258
|
+
created_utc: createdUtc,
|
|
259
|
+
permalink,
|
|
260
|
+
url: url.startsWith('http') ? url : `https://www.reddit.com${url}`,
|
|
261
|
+
...(linkFlairText ? { link_flair_text: linkFlairText } : {}),
|
|
262
|
+
};
|
|
263
|
+
}
|
|
264
|
+
function parseCommentElement($, element, depth = 0) {
|
|
265
|
+
const id = element.attr('data-id') || element.attr('id') || '';
|
|
266
|
+
const authorElements = element.find('.comment_author');
|
|
267
|
+
const authorEl = authorElements.length > 0 ? authorElements[0] : null;
|
|
268
|
+
const author = authorEl ? authorEl.text().replace('u/', '').trim() : '';
|
|
269
|
+
const bodyElements = element.find('.comment_body .md');
|
|
270
|
+
const bodyEl = bodyElements.length > 0 ? bodyElements[0] : null;
|
|
271
|
+
const body = bodyEl ? bodyEl.text().trim() : '';
|
|
272
|
+
const scoreElements = element.find('.comment_score');
|
|
273
|
+
const scoreEl = scoreElements.length > 0 ? scoreElements[0] : null;
|
|
274
|
+
const scoreText = scoreEl ? scoreEl.text() || '0' : '0';
|
|
275
|
+
const score = parseScore(scoreText.trim());
|
|
276
|
+
const createdElements = element.find('.created');
|
|
277
|
+
const createdEl = createdElements.length > 0 ? createdElements[0] : null;
|
|
278
|
+
const createdText = createdEl ? (createdEl.attr('title') || createdEl.text() || '') : '';
|
|
279
|
+
const createdUtc = parseTimestamp(createdText);
|
|
280
|
+
return {
|
|
281
|
+
id,
|
|
282
|
+
author,
|
|
283
|
+
body,
|
|
284
|
+
score,
|
|
285
|
+
created_utc: createdUtc,
|
|
286
|
+
depth,
|
|
287
|
+
};
|
|
288
|
+
}
|
|
289
|
+
function parseSubredditInfo($) {
|
|
290
|
+
const titleEl = $.findFirst('#sub_title');
|
|
291
|
+
const title = titleEl ? titleEl.text().trim() : '';
|
|
292
|
+
const nameEl = $.findFirst('#sub_name');
|
|
293
|
+
const name = nameEl ? nameEl.text().replace('r/', '').trim() : '';
|
|
294
|
+
const descEl = $.findFirst('#sub_description');
|
|
295
|
+
const description = descEl ? descEl.text().trim() : '';
|
|
296
|
+
const detailsEls = $.findAll('#sub_details div');
|
|
297
|
+
const membersText = detailsEls.length > 0 ? (detailsEls[0].attr('title') || detailsEls[0].text() || '0') : '0';
|
|
298
|
+
const subscribers = parseSubscribers(membersText);
|
|
299
|
+
const activeText = detailsEls.length > 1 ? (detailsEls[1].attr('title') || detailsEls[1].text() || '0') : '0';
|
|
300
|
+
const activeUsers = parseSubscribers(activeText);
|
|
301
|
+
return {
|
|
302
|
+
display_name: name,
|
|
303
|
+
title,
|
|
304
|
+
description,
|
|
305
|
+
subscribers,
|
|
306
|
+
active_users: activeUsers,
|
|
307
|
+
over18: false,
|
|
308
|
+
public_description: description,
|
|
309
|
+
subreddit_type: 'public',
|
|
310
|
+
subscribers_known: subscribers,
|
|
311
|
+
};
|
|
312
|
+
}
|
|
313
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../nodes/Redlib/shared/utils.ts"],"names":[],"mappings":";;;AAgOA,wCA0BC;AAGD,gCAMC;AAGD,sCAGC;AAGD,4CAQC;AAGD,4CAuEC;AAGD,kDAiCC;AAGD,gDA4BC;AA9ZD,MAAa,UAAU;IAGtB,YAAY,IAAY;QACvB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IAClB,CAAC;IAGD,OAAO,CAAC,QAAgB;QACvB,MAAM,OAAO,GAAkB,EAAE,CAAC;QAElC,IAAI,QAAQ,KAAK,OAAO,EAAE,CAAC;YAC3B,MAAM,KAAK,GAAG,gHAAgH,CAAC;YAC/H,IAAI,KAAK,CAAC;YACV,OAAO,CAAC,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC;gBACjD,OAAO,CAAC,IAAI,CAAC,IAAI,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;YACpD,CAAC;QACD,CAAC;aAAM,IAAI,QAAQ,KAAK,UAAU,EAAE,CAAC;YACrC,MAAM,KAAK,GAAG,2FAA2F,CAAC;YAC1G,IAAI,KAAK,CAAC;YACV,OAAO,CAAC,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC;gBACjD,OAAO,CAAC,IAAI,CAAC,IAAI,WAAW,CAAC,KAAK,CAA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AAM,WAAW,GAAG,gBAAgB,CAAC,WAAW,CAAC,CAAC;IAElD,MAAM,UAAU,GAAG,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,UAAU,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;IAC9G,MAAM,WAAW,GAAG,gBAAgB,CAAC,UAAU,CAAC,CAAC;IAEjD,OAAO;QACN,YAAY,EAAE,IAAI;QAClB,KAAK;QACL,WAAW;QACX,WAAW;QACX,YAAY,EAAE,WAAW;QACzB,MAAM,EAAE,KAAK;QACb,kBAAkB,EAAE,WAAW;QAC/B,cAAc,EAAE,QAAQ;QACxB,iBAAiB,EAAE,WAAW;KAC9B,CAAC;AACH,CAAC"}
|
package/dist/package.json
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "n8n-nodes-redlib",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "n8n
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "n8n node for fetching Reddit data through Redlib without OAuth authentication",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"keywords": [
|
|
7
|
-
"n8n-community-node-package"
|
|
7
|
+
"n8n-community-node-package",
|
|
8
|
+
"reddit",
|
|
9
|
+
"redlib",
|
|
10
|
+
"scraper"
|
|
8
11
|
],
|
|
9
12
|
"author": {
|
|
10
13
|
"name": "yuangwei",
|
|
@@ -30,12 +33,10 @@
|
|
|
30
33
|
"n8nNodesApiVersion": 1,
|
|
31
34
|
"strict": true,
|
|
32
35
|
"credentials": [
|
|
33
|
-
"dist/credentials/
|
|
34
|
-
"dist/credentials/GithubIssuesOAuth2Api.credentials.js"
|
|
36
|
+
"dist/credentials/RedlibApi.credentials.js"
|
|
35
37
|
],
|
|
36
38
|
"nodes": [
|
|
37
|
-
"dist/nodes/
|
|
38
|
-
"dist/nodes/Example/Example.node.js"
|
|
39
|
+
"dist/nodes/Redlib/Redlib.node.js"
|
|
39
40
|
]
|
|
40
41
|
},
|
|
41
42
|
"devDependencies": {
|