Fixed 8K Members not mapped in scraper index.

This commit is contained in:
DebaucheryLibrarian 2026-01-09 04:54:23 +01:00
parent 5c12122e04
commit 86669a89c6
3 changed files with 70 additions and 3 deletions

View File

@ -137,7 +137,7 @@ const scrapers = {
julesjordan,
karups,
kellymadison,
'5kvids': kellymadison,
'8kmembers': kellymadison,
killergram,
kink,
// kinkvr: badoink,
@ -219,7 +219,6 @@ const scrapers = {
bamvisions,
bang,
bangbros: aylo,
bellesa,
bjraw: radical,
blacked: vixen,
blackedraw: vixen,
@ -272,7 +271,7 @@ const scrapers = {
julesjordan,
karups,
kellymadison,
'5kvids': kellymadison,
'8kmembers': kellymadison,
killergram,
kink,
kinkmen: kink,

21
tests/.eslintrc Executable file
View File

@ -0,0 +1,21 @@
{
"extends": "airbnb-base",
"parserOptions": {
"parser": "@babel/eslint-parser",
"sourceType": "script"
},
"rules": {
"strict": 0,
"indent": "off",
"no-tabs": "off",
"no-unused-vars": ["error", {"argsIgnorePattern": "^_"}],
"no-console": 0,
"max-len": 0,
"no-underscore-dangle": 0,
"default-param-last": 0,
"prefer-destructuring": "off",
"arrow-body-style": 0,
"template-curly-spacing": "off",
"object-curly-newline": "off"
}
}

47
tests/profiles.js Normal file
View File

@ -0,0 +1,47 @@
'use strict';
const test = require('node:test');
const assert = require('node:assert/strict');
const argv = require('../src/argv');
const scrapers = require('../src/scrapers/scrapers');
const { fetchEntitiesBySlug } = require('../src/entities');
const actorScrapers = scrapers.actors;
// profiler in this context is shorthand for profile scraper
async function init() {
const entitiesBySlug = await fetchEntitiesBySlug(Object.keys(actorScrapers), { types: ['channel', 'network', 'info'], prefer: argv.prefer });
Object.entries(actorScrapers).reduce(async (chain, [entitySlug, scraper]) => {
await chain;
const entity = entitiesBySlug[entitySlug] || null;
const profilers = Array.from(new Set(Object.entries(scraper) // some layouts will use the same profiler
.flatMap(([fnKey, fnOrLayout]) => {
if (fnOrLayout.fetchProfile) {
// layout
return fnOrLayout.fetchProfile;
}
if (fnKey === 'fetchProfile') {
// primary
return fnOrLayout;
}
return null;
}).filter(Boolean)));
await test(`${entitySlug} (${entity?.name})`, async () => {
await test('has entity', () => assert.notEqual(entity, null));
await test('has profilers', () => assert.ok(profilers.length > 0));
await test('foo', () => {
assert.strictEqual(5, 5);
});
});
}, Promise.resolve());
}
init();