From 745aa023a80803bfb98ddeade64da823861f0a57 Mon Sep 17 00:00:00 2001 From: DebaucheryLibrarian Date: Mon, 19 Oct 2026 06:23:01 +0200 Subject: [PATCH] Using unprint in Radical API, fixed updates broken due body being string instead of data. --- seeds/00_tags.js | 7 ++++++- src/scrapers/radical.js | 21 ++++++++++----------- 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/seeds/00_tags.js b/seeds/00_tags.js index c819e07f..c22207f9 100755 --- a/seeds/00_tags.js +++ b/seeds/00_tags.js @@ -717,7 +717,12 @@ const tags = [ { name: 'gangbang', slug: 'gangbang', - description: 'Getting fucked by three or more cocks, at least two at the same time, often but not necessarily involving a [blowbang](/tag/blowbang), [spitroast](/tag/mfm), [double penetration](/tag/dp) and [airtight](/tag/airtight). If you get fucked by one guy at a time, it might be considered a [trainbang](/tag/trainbang). In a reverse gangbang, multiple women fuck one man.', /* eslint-disable-line max-len */ + description: 'Getting fucked by three or more cocks, at least two at the same time, often but not necessarily involving a [blowbang](/tag/blowbang), [spitroast](/tag/mfm), [double penetration](/tag/dp) and [airtight](/tag/airtight). If you get fucked by one guy at a time, it might be considered a [trainbang](/tag/trainbang). In a [reverse gangbang](/tag/reverse-gangbang), multiple women fuck one man.', /* eslint-disable-line max-len */ + group: 'group', + }, + { + name: 'reverse gangbang', + slug: 'reverse-gangbang', group: 'group', }, { diff --git a/src/scrapers/radical.js b/src/scrapers/radical.js index 03ae08bd..5e4ecf7b 100755 --- a/src/scrapers/radical.js +++ b/src/scrapers/radical.js @@ -3,7 +3,6 @@ const unprint = require('unprint'); const mime = require('mime'); -const http = require('../utils/http'); const slugify = require('../utils/slugify'); const { convert } = require('../utils/convert'); @@ -132,10 +131,10 @@ async function fetchLatest(channel, page, { parameters }) { ? `${channel.parent.url}/_next/data/${endpoint}/sites/${parameters.site}.json?sitename=${parameters.site}&order_by=publish_date&sort_by=desc&per_page=30&page=${page}` : `${channel.url}/_next/data/${endpoint}/${parameters.videos || 'videos'}.json?order_by=publish_date&sort_by=desc&per_page=30&page=${page}`; - const res = await http.get(url); + const res = await unprint.get(url); - if (res.ok && res.body.pageProps?.contents?.data) { - return scrapeAll(res.body.pageProps.contents.data, channel, parameters); + if (res.ok && res.data.pageProps?.contents?.data) { + return scrapeAll(res.data.pageProps.contents.data, channel, parameters); } return res.status; @@ -170,12 +169,12 @@ async function fetchScene(url, channel, baseScene, { parameters }) { const slug = new URL(url).pathname.split('/').at(-1); const endpoint = await fetchEndpoint(channel); - const res = await http.get(`${channel.url}/_next/data/${endpoint}/${parameters.videos || 'videos'}/${slug}.json?slug=${slug}`); + const res = await unprint.get(`${channel.url}/_next/data/${endpoint}/${parameters.videos || 'videos'}/${slug}.json?slug=${slug}`); - if (res.ok && res.body.pageProps?.content) { + if (res.ok && res.data.pageProps?.content) { return scrapeScene({ - ...res.body.pageProps.content, - serie: res.body.pageProps.playlist?.data[0], + ...res.data.pageProps.content, + serie: res.data.pageProps.playlist?.data[0], }, channel, parameters); } @@ -215,10 +214,10 @@ function scrapeProfile(data, channel, scenes, parameters) { async function fetchProfile(actor, { channel, parameters }) { const endpoint = await fetchEndpoint(channel); - const res = await http.get(`${channel.url}/_next/data/${endpoint}/${parameters.actors || 'models'}/${actor.slug}.json?slug=${actor.slug}`); + const res = await unprint.get(`${channel.url}/_next/data/${endpoint}/${parameters.actors || 'models'}/${actor.slug}.json?slug=${actor.slug}`); - if (res.ok && res.body.pageProps?.model) { - return scrapeProfile(res.body.pageProps.model, channel, res.body.pageProps.model_contents, parameters); + if (res.ok && res.data.pageProps?.model) { + return scrapeProfile(res.data.pageProps.model, channel, res.data.pageProps.model_contents, parameters); } return res.status;