Updated Jules Jordan scraper.
This commit is contained in:
@@ -166,6 +166,47 @@ const movieFields = `
|
||||
}
|
||||
`;
|
||||
|
||||
const campaignFields = `
|
||||
id
|
||||
url
|
||||
affiliate {
|
||||
id
|
||||
url
|
||||
parameters
|
||||
}
|
||||
banner {
|
||||
id
|
||||
type
|
||||
width
|
||||
height
|
||||
ratio
|
||||
entity {
|
||||
id
|
||||
type
|
||||
name
|
||||
slug
|
||||
parent {
|
||||
id
|
||||
type
|
||||
name
|
||||
slug
|
||||
}
|
||||
}
|
||||
}
|
||||
entity {
|
||||
id
|
||||
type
|
||||
name
|
||||
slug
|
||||
parent {
|
||||
id
|
||||
type
|
||||
name
|
||||
slug
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
const campaignsFragment = `
|
||||
campaigns(filter: {
|
||||
or: [
|
||||
@@ -187,44 +228,7 @@ const campaignsFragment = `
|
||||
}
|
||||
]
|
||||
}) {
|
||||
id
|
||||
url
|
||||
affiliate {
|
||||
id
|
||||
url
|
||||
parameters
|
||||
}
|
||||
banner {
|
||||
id
|
||||
type
|
||||
width
|
||||
height
|
||||
ratio
|
||||
entity {
|
||||
id
|
||||
type
|
||||
name
|
||||
slug
|
||||
parent {
|
||||
id
|
||||
type
|
||||
name
|
||||
slug
|
||||
}
|
||||
}
|
||||
}
|
||||
entity {
|
||||
id
|
||||
type
|
||||
name
|
||||
slug
|
||||
parent {
|
||||
id
|
||||
type
|
||||
name
|
||||
slug
|
||||
}
|
||||
}
|
||||
${campaignFields}
|
||||
}
|
||||
`;
|
||||
|
||||
@@ -670,6 +674,7 @@ export {
|
||||
actorFields,
|
||||
actorStashesFields,
|
||||
batchFragment,
|
||||
campaignFields,
|
||||
campaignsFragment,
|
||||
mediaFields,
|
||||
mediaFragment,
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user