Added Upclose to Gamma.

This commit is contained in:
DebaucheryLibrarian 2024-07-09 01:44:17 +02:00
parent 215528171d
commit ad9113f624
2 changed files with 15 additions and 2 deletions

View File

@ -504,6 +504,15 @@ const sites = [
tags: ['lesbian'],
parent: 'adulttime',
},
{
name: 'Upclose',
slug: 'upclose',
url: 'https://getupclose.com',
parent: 'adulttime',
parameters: {
querySlug: 'getupclose',
},
},
// ADULT TIME no API results
/*
{

View File

@ -654,10 +654,11 @@ function scrapeApiProfile(data, releases, siteSlug) {
async function fetchLatestApi(site, page = 1, options, preData, upcoming = false) {
const referer = options.parameters?.referer || `${options.parameters?.networkReferer ? site.parent.url : site.url}/en/videos`;
const { apiUrl } = await fetchApiCredentials(referer, site);
const slug = options.parameters.querySlug || site.slug;
const params = `query=&hitsPerPage=36&maxValuesPerFacet=100&page=${page - 1}&facetFilters=[["lesbian:"],["bisex:"],["shemale:"],["upcoming:${upcoming ? 1 : 0}"]]${options.parameters.queryChannel
? `&filters=channels.id:${options.parameters.queryChannel === true ? site.slug : options.parameters.queryChannel}`
: `&filters=sitename:${site.slug}`}`;
? `&filters=channels.id:${options.parameters.queryChannel === true ? slug : options.parameters.queryChannel}`
: `&filters=sitename:${slug}`}`;
const res = await http.post(apiUrl, {
requests: [
@ -674,7 +675,10 @@ async function fetchLatestApi(site, page = 1, options, preData, upcoming = false
encodeJSON: true,
});
console.log(res.status);
if (res.status === 200 && res.body.results?.[0]?.hits) {
console.log(res.body.results);
return scrapeApiReleases(res.body.results[0].hits, site, options);
}