Manually adding Bright Data domains

This commit is contained in:
SukkaW
2025-01-11 17:15:15 +08:00
parent 0374a1672f
commit 0937ed3107
3 changed files with 52 additions and 13 deletions

View File

@@ -0,0 +1,17 @@
import { fetchRemoteTextByLine } from './lib/fetch-text-by-line';
import tldts from 'tldts';
(async () => {
const lines = await Array.fromAsync(await fetchRemoteTextByLine('https://raw.githubusercontent.com/durablenapkin/block/master/luminati.txt', true));
const set = new Set<string>();
lines.forEach((line) => {
const apexDomain = tldts.getDomain(line.slice(8));
if (apexDomain) {
set.add(apexDomain);
}
});
console.log(Array.from(set).map(line => '.' + line).join('\n'));
})();