Fixed media module trying to fetch invalid source URLs. Added Accidental Gangbang to Adult Time.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user