Fixed 8K Members not mapped in scraper index.
This commit is contained in:
parent
5c12122e04
commit
86669a89c6
|
|
@ -137,7 +137,7 @@ const scrapers = {
|
||||||
julesjordan,
|
julesjordan,
|
||||||
karups,
|
karups,
|
||||||
kellymadison,
|
kellymadison,
|
||||||
'5kvids': kellymadison,
|
'8kmembers': kellymadison,
|
||||||
killergram,
|
killergram,
|
||||||
kink,
|
kink,
|
||||||
// kinkvr: badoink,
|
// kinkvr: badoink,
|
||||||
|
|
@ -219,7 +219,6 @@ const scrapers = {
|
||||||
bamvisions,
|
bamvisions,
|
||||||
bang,
|
bang,
|
||||||
bangbros: aylo,
|
bangbros: aylo,
|
||||||
bellesa,
|
|
||||||
bjraw: radical,
|
bjraw: radical,
|
||||||
blacked: vixen,
|
blacked: vixen,
|
||||||
blackedraw: vixen,
|
blackedraw: vixen,
|
||||||
|
|
@ -272,7 +271,7 @@ const scrapers = {
|
||||||
julesjordan,
|
julesjordan,
|
||||||
karups,
|
karups,
|
||||||
kellymadison,
|
kellymadison,
|
||||||
'5kvids': kellymadison,
|
'8kmembers': kellymadison,
|
||||||
killergram,
|
killergram,
|
||||||
kink,
|
kink,
|
||||||
kinkmen: kink,
|
kinkmen: kink,
|
||||||
|
|
|
||||||
|
|
@ -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"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -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();
|
||||||
Loading…
Reference in New Issue