Updated Jules Jordan scraper.

This commit is contained in:
DebaucheryLibrarian
2023-07-06 00:14:38 +02:00
parent 66439b3b17
commit 0905847ffa
609 changed files with 391 additions and 277 deletions

View File

@@ -1,5 +1,12 @@
import { graphql, patch } from '../api';
import { releaseFields, batchFragment, actorStashesFields } from '../fragments';
import {
releaseFields,
batchFragment,
campaignFields,
actorStashesFields,
} from '../fragments';
import { curateRelease, curateActor, curateNotification } from '../curate';
function initUiActions(store, _router) {
@@ -240,29 +247,7 @@ function initUiActions(store, _router) {
$maxRatio: BigFloat
) {
randomCampaign: getRandomCampaign(minRatio: $minRatio, maxRatio: $maxRatio) {
url
affiliate {
url
}
banner {
id
type
ratio
entity {
type
slug
parent {
type
slug
}
}
}
entity {
slug
}
parent {
slug
}
${campaignFields}
}
}
`, {
@@ -273,6 +258,23 @@ function initUiActions(store, _router) {
return randomCampaign;
}
async function fetchCampaign(context, campaignId) {
console.log(campaignId);
const { campaign } = await graphql(`
query Campaign(
$campaignId: Int!
) {
campaign(id: $campaignId) {
${campaignFields}
}
}
`, {
campaignId: Number(campaignId),
});
return campaign;
}
async function fetchStats() {
const {
scenes,
@@ -312,6 +314,7 @@ function initUiActions(store, _router) {
setBatch,
setSfw,
setTheme,
fetchCampaign,
fetchRandomCampaign,
fetchNotifications,
fetchStats,