Fixed media module trying to fetch invalid source URLs. Added Accidental Gangbang to Adult Time.

This commit is contained in:
DebaucheryLibrarian
2022-09-27 20:09:46 +02:00
parent 3db8b80164
commit 0fc37e46d2
29 changed files with 4857 additions and 2451 deletions

View File

@@ -150,7 +150,7 @@ async function getFullPhotos(entryId, site) {
},
});
if (res.ok) {
if (res.ok && typeof res.body === 'object') { // gives 200 OK even when redirected to signup page
return Object.values(res.body);
}
@@ -442,7 +442,7 @@ async function scrapeReleaseApi(data, site, options) {
];
}
if (data.photoset_id && options.includePhotos) {
if (data.photoset_id && options.includePhotos && options.parameters?.includePhotos !== false) {
release.photos = await getPhotosApi(data.photoset_id, site, options.parameters);
}

View File

@@ -132,13 +132,9 @@ async function scrapeProfile({ query }, actorUrl, include) {
async function fetchLatest(site, page = 1) {
// const res = await qu.getAll(`${site.url}/latest/page/${page}`, '.shoot-list .shoot', {
const res = await qu.getAll(`https://www.kink.com/channel/bound-gang-bangs/latest/page/${page}`, '.shoot-list .shoot', {
Host: 'www.kink.com',
'User-Agent': 'HTTPie/2.6.0',
'Accept-Encoding': 'gzip, deflate, br',
Accept: '*/*',
Connection: 'keep-alive',
// const res = await qu.getAll(`https://www.kink.com/channel/bound-gang-bangs/latest/page/${page}`, '.shoot-list .shoot', {
const res = await qu.getAll(`https://www.kink.com/search?type=shoots&channelIds=${site.slug}&sort=published&page=${page}`, '.shoot-list .shoot', {
ct: 2,
}, {
includeDefaultHeaders: false,
followRedirects: false,

View File

@@ -119,11 +119,7 @@ function scrapeProfile(actor, entity) {
}
async function fetchLatest(channel, page = 1, { parameters }) {
const res = await http.get(`${parameters.videos}/_search?q=site.seo.seoSlug:"${parameters.id}"&sort=publishedDate:desc&size=30&from=${(page - 1) * 30}`, {
bypassCloudflare: true,
});
console.log(res.status);
const res = await http.get(`${parameters.videos}/_search?q=site.seo.seoSlug:"${parameters.id}"&sort=publishedDate:desc&size=30&from=${(page - 1) * 30}`);
if (res.ok) {
return scrapeAll(res.body.hits.hits, channel);