scraperjavascript133
BaconBossScript - Roblox UGC Script Catalog & Search Scraper
Scraper baconbossscript.com untuk mencari katalog Roblox UGC OP Scripts, detail script, extract scriptId & unlock session URL, serta info official Beecon Hub.
Vamz Spectre14 Nov 2026303 baris kode
Jalankan via Terminal / CLI:
# 1. Download file script
curl -sL "https://code.vamxapi.my.id/snippet/raw/baconboss" -o baconboss.js
# 2. Jalankan script
node baconboss.js
Dependencies npm yang Dibutuhkan:
npm install axios, cheerioPanduan Penggunaan:
curl -sL "https://code.vamxapi.my.id/snippet/raw/baconboss" -o baconboss.js node baconboss.js "latest" node baconboss.js "blox" node baconboss.js "beecon-hub"
baconboss.js(303 lines)
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
/**
* BaconBossScript Scraper
* Author: Vamz Spectre / VamxAPI
* Target: https://baconbossscript.com
*
* Download:
* curl -sL "https://code.vamxapi.my.id/snippet/raw/baconboss" -o baconboss.js
*
* Usage:
* node baconboss.js "latest"
* node baconboss.js "blox"
* node baconboss.js "free-ugc-make-it-fashion-op-script-instant-2-ugc-pastebin-4ljot"
* node baconboss.js "beecon-hub"
*/
const axios = require("axios");
const cheerio = require("cheerio");
const crypto = require("crypto");
const BASE_URL = "https://baconbossscript.com";
const DEFAULT_HEADERS = {
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36",
"Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8",
"Accept-Language": "en-US,en;q=0.9",
};
/**
* Parse script catalog items and pagination from HTML
*/
function parseScriptList(html, currentPage = 1) {
const $ = cheerio.load(html);
const items = [];
$("a[href^=\"/scripts/\"]").each((_, el) => {
const $el = $(el);
const href = $el.attr("href") || "";
const slug = href.replace(/^\/scripts\//, "").replace(/\/$/, "");
const title = $el.find("h3").text().trim();
const thumbnail = $el.find("img").attr("src") || "";
const viewsText = $el.find("span").filter((_, s) => $(s).text().includes("views")).text().trim();
const views = parseInt(viewsText.replace(/\D+/g, ""), 10) || 0;
if (slug && title) {
items.push({
title,
slug,
url: `${BASE_URL}/scripts/${slug}`,
thumbnail,
views
});
}
});
let totalPages = currentPage;
$("nav[aria-label=\"Script pages\"] a").each((_, el) => {
const pageNum = parseInt($(el).text().trim(), 10);
if (!isNaN(pageNum) && pageNum > totalPages) {
totalPages = pageNum;
}
});
return {
currentPage: Number(currentPage),
totalPages,
totalFound: items.length,
scripts: items
};
}
/**
* Fetch latest scripts
*/
async function latest(page = 1) {
try {
const { data: html } = await axios.get(`${BASE_URL}/?page=${page}`, {
headers: DEFAULT_HEADERS,
timeout: 10000
});
const parsed = parseScriptList(html, page);
return {
status: true,
creator: "Vamz Spectre",
type: "latest",
...parsed
};
} catch (err) {
return {
status: false,
creator: "Vamz Spectre",
error: err.message || "Failed to fetch latest scripts"
};
}
}
/**
* Search scripts by query
*/
async function search(query, page = 1) {
try {
const encoded = encodeURIComponent(query);
const { data: html } = await axios.get(`${BASE_URL}/?q=${encoded}&page=${page}`, {
headers: DEFAULT_HEADERS,
timeout: 10000
});
const parsed = parseScriptList(html, page);
return {
status: true,
creator: "Vamz Spectre",
type: "search",
query,
...parsed
};
} catch (err) {
return {
status: false,
creator: "Vamz Spectre",
error: err.message || "Failed to search scripts"
};
}
}
/**
* Get script detail by slug or URL
*/
async function detail(slugOrUrl) {
try {
const slug = slugOrUrl
.replace(/^https?:\/\/[^\/]+\/scripts\//, "")
.replace(/^\/scripts\//, "")
.replace(/\/$/, "");
const targetUrl = `${BASE_URL}/scripts/${slug}`;
const { data: html } = await axios.get(targetUrl, {
headers: DEFAULT_HEADERS,
timeout: 10000
});
const $ = cheerio.load(html);
const title = $("h1").text().trim();
const thumbnail = $("main img").attr("src") || "";
// Extract views
const viewsMatch = html.match(/(\d+)<!-- --> views/) || html.match(/\[(\d+),\\" views\\\"\]/);
const views = viewsMatch ? parseInt(viewsMatch[1], 10) : 0;
// Extract scriptId from Next.js RSC payload
const idMatch = html.match(/\\"scriptId\\":\\"([a-f0-9\-]+)\\"/);
const scriptId = idMatch ? idMatch[1] : null;
// Extract youtubeUrl
const ytMatch = html.match(/\\"youtubeUrl\\":\\"([^"\\]+)\\"/);
const youtubeUrl = ytMatch ? ytMatch[1] : null;
// Extract unlockProviders
let unlockProviders = [];
const provMatch = html.match(/\\"unlockProviders\\":(\[.*?\])/);
if (provMatch) {
try {
unlockProviders = JSON.parse(provMatch[1].replace(/\\"/g, '"'));
} catch (_) {}
}
if (unlockProviders.length === 0) {
const modeMatch = html.match(/\\"unlockProviderMode\\":\\"([^"\\]+)\\"/);
if (modeMatch) {
unlockProviders = modeMatch[1].split(",").map(p => p.trim());
}
}
// Generate unlock session link if scriptId is available
let unlockSession = null;
if (scriptId && unlockProviders.length > 0) {
const clientProof = crypto.randomBytes(16).toString("hex");
for (const prov of unlockProviders) {
try {
const { data: sessionData } = await axios.post(
`${BASE_URL}/api/scripts/${scriptId}/unlock-session`,
{ provider: prov, clientProof },
{
headers: {
"Content-Type": "application/json",
...DEFAULT_HEADERS
},
timeout: 7000
}
);
if (sessionData && sessionData.success) {
unlockSession = {
provider: sessionData.provider,
sessionId: sessionData.sessionId,
destinationUrl: sessionData.linkUrl
};
break;
}
} catch (_) {}
}
}
return {
status: true,
creator: "Vamz Spectre",
result: {
title,
slug,
url: targetUrl,
scriptId,
thumbnail,
views,
youtubeUrl,
unlockProviders,
unlockSession
}
};
} catch (err) {
return {
status: false,
creator: "Vamz Spectre",
error: err.message || "Failed to fetch script detail"
};
}
}
/**
* Get Beecon Hub main product info
*/
async function beeconHub() {
try {
const { data: html } = await axios.get(`${BASE_URL}/beecon-hub`, {
headers: DEFAULT_HEADERS,
timeout: 10000
});
const $ = cheerio.load(html);
const title = $("title").text().trim();
const description = $("meta[name=\"description\"]").attr("content") || "";
const steps = [];
$("ol li").each((_, el) => {
const num = $(el).find("span").first().text().trim();
const text = $(el).find("span").last().text().trim();
if (text) steps.push({ step: num, instruction: text });
});
let downloadUrl = null;
$("a[href*=\"direct-link.net\"]").each((_, el) => {
downloadUrl = $(el).attr("href");
});
let youtubeGuide = null;
$("a[href*=\"youtube.com\"]").each((_, el) => {
youtubeGuide = $(el).attr("href");
});
return {
status: true,
creator: "Vamz Spectre",
result: {
title,
description,
downloadUrl,
youtubeGuide,
discord: "https://discord.gg/xUvY22gZp4",
quickStart: steps
}
};
} catch (err) {
return {
status: false,
creator: "Vamz Spectre",
error: err.message || "Failed to fetch Beecon Hub info"
};
}
}
// Module export
module.exports = {
latest,
search,
detail,
beeconHub
};
// CLI Execution Runner
if (require.main === module) {
(async () => {
const arg = process.argv[2] ? process.argv[2].trim() : "latest";
let res;
if (arg === "beecon-hub" || arg === "beecon") {
res = await beeconHub();
} else if (arg.startsWith("http://") || arg.startsWith("https://") || arg.includes("-op-script-") || arg.includes("-pastebin-")) {
res = await detail(arg);
} else if (arg === "latest") {
const page = process.argv[3] || 1;
res = await latest(page);
} else {
const page = process.argv[3] || 1;
res = await search(arg, page);
}
console.log(JSON.stringify(res, null, 2));
})();
}