diff --git a/public/img/logos/zerotolerance/lazy/addicted2girls.png b/public/img/logos/zerotolerance/lazy/addicted2girls.png index f8c3c98b..14f3be66 100644 Binary files a/public/img/logos/zerotolerance/lazy/addicted2girls.png and b/public/img/logos/zerotolerance/lazy/addicted2girls.png differ diff --git a/public/img/logos/zerotolerance/lazy/favicon.png b/public/img/logos/zerotolerance/lazy/favicon.png index 293ddec1..dcf6c232 100644 Binary files a/public/img/logos/zerotolerance/lazy/favicon.png and b/public/img/logos/zerotolerance/lazy/favicon.png differ diff --git a/public/img/logos/zerotolerance/lazy/favicon_dark.png b/public/img/logos/zerotolerance/lazy/favicon_dark.png index 97b46b51..e4938a58 100644 Binary files a/public/img/logos/zerotolerance/lazy/favicon_dark.png and b/public/img/logos/zerotolerance/lazy/favicon_dark.png differ diff --git a/public/img/logos/zerotolerance/lazy/favicon_light.png b/public/img/logos/zerotolerance/lazy/favicon_light.png index 97b46b51..e4938a58 100644 Binary files a/public/img/logos/zerotolerance/lazy/favicon_light.png and b/public/img/logos/zerotolerance/lazy/favicon_light.png differ diff --git a/public/img/logos/zerotolerance/lazy/genderx.png b/public/img/logos/zerotolerance/lazy/genderx.png index 09f8d19f..31bfc4cf 100644 Binary files a/public/img/logos/zerotolerance/lazy/genderx.png and b/public/img/logos/zerotolerance/lazy/genderx.png differ diff --git a/public/img/logos/zerotolerance/lazy/network.png b/public/img/logos/zerotolerance/lazy/network.png index 8fd3644c..8adebbce 100644 Binary files a/public/img/logos/zerotolerance/lazy/network.png and b/public/img/logos/zerotolerance/lazy/network.png differ diff --git a/public/img/logos/zerotolerance/lazy/zerotolerance.png b/public/img/logos/zerotolerance/lazy/zerotolerance.png index c0a1d8ec..59ca977b 100644 Binary files a/public/img/logos/zerotolerance/lazy/zerotolerance.png and b/public/img/logos/zerotolerance/lazy/zerotolerance.png differ diff --git a/public/img/logos/zerotolerance/lazy/zerotolerancefilms.png b/public/img/logos/zerotolerance/lazy/zerotolerancefilms.png index 5e07f731..1b99b1f6 100644 Binary files a/public/img/logos/zerotolerance/lazy/zerotolerancefilms.png and b/public/img/logos/zerotolerance/lazy/zerotolerancefilms.png differ diff --git a/public/img/logos/zerotolerance/thumbs/addicted2girls.png b/public/img/logos/zerotolerance/thumbs/addicted2girls.png index cbcb27b7..18044171 100644 Binary files a/public/img/logos/zerotolerance/thumbs/addicted2girls.png and b/public/img/logos/zerotolerance/thumbs/addicted2girls.png differ diff --git a/public/img/logos/zerotolerance/thumbs/favicon.png b/public/img/logos/zerotolerance/thumbs/favicon.png index 293ddec1..dcf6c232 100644 Binary files a/public/img/logos/zerotolerance/thumbs/favicon.png and b/public/img/logos/zerotolerance/thumbs/favicon.png differ diff --git a/public/img/logos/zerotolerance/thumbs/favicon_dark.png b/public/img/logos/zerotolerance/thumbs/favicon_dark.png index 97b46b51..e4938a58 100644 Binary files a/public/img/logos/zerotolerance/thumbs/favicon_dark.png and b/public/img/logos/zerotolerance/thumbs/favicon_dark.png differ diff --git a/public/img/logos/zerotolerance/thumbs/favicon_light.png b/public/img/logos/zerotolerance/thumbs/favicon_light.png index 97b46b51..e4938a58 100644 Binary files a/public/img/logos/zerotolerance/thumbs/favicon_light.png and b/public/img/logos/zerotolerance/thumbs/favicon_light.png differ diff --git a/public/img/logos/zerotolerance/thumbs/genderx.png b/public/img/logos/zerotolerance/thumbs/genderx.png index 7560701a..f00de314 100644 Binary files a/public/img/logos/zerotolerance/thumbs/genderx.png and b/public/img/logos/zerotolerance/thumbs/genderx.png differ diff --git a/public/img/logos/zerotolerance/thumbs/network.png b/public/img/logos/zerotolerance/thumbs/network.png index 93391395..137e9a8e 100644 Binary files a/public/img/logos/zerotolerance/thumbs/network.png and b/public/img/logos/zerotolerance/thumbs/network.png differ diff --git a/public/img/logos/zerotolerance/thumbs/zerotolerance.png b/public/img/logos/zerotolerance/thumbs/zerotolerance.png index 48e7d347..9916977e 100644 Binary files a/public/img/logos/zerotolerance/thumbs/zerotolerance.png and b/public/img/logos/zerotolerance/thumbs/zerotolerance.png differ diff --git a/public/img/logos/zerotolerance/thumbs/zerotolerancefilms.png b/public/img/logos/zerotolerance/thumbs/zerotolerancefilms.png index 3ac681b0..56f067a5 100644 Binary files a/public/img/logos/zerotolerance/thumbs/zerotolerancefilms.png and b/public/img/logos/zerotolerance/thumbs/zerotolerancefilms.png differ diff --git a/seeds/02_sites.js b/seeds/02_sites.js index 7eb2baa5..5d36d9c8 100644 --- a/seeds/02_sites.js +++ b/seeds/02_sites.js @@ -10922,16 +10922,17 @@ const sites = [ parent: 'zerotolerance', parameters: { scene: 'https://www.addicted2girls.com/en/video/addicted2girls', + movie: 'https://www.addicted2girls.com/en/dvd', }, }, { - slug: 'genderx', - name: 'GenderX', - url: 'https://www.genderx.com', + slug: 'genderxfilms', + name: 'GenderXFilms', + url: 'https://www.genderxfilms.com', tags: ['transsexual'], parent: 'zerotolerance', parameters: { - scene: 'https://www.genderx.com/en/video', + movie: 'https://www.genderxfilms.com/en/dvd', }, }, { @@ -10939,6 +10940,9 @@ const sites = [ name: 'Zero Tolerance Films', url: 'https://www.zerotolerancefilms.com', parent: 'zerotolerance', + parameters: { + scene: 'https://www.zerotolerancefilms.com/en/video/zerotolerancefilms', + }, }, ]; diff --git a/src/scrapers/gamma.js b/src/scrapers/gamma.js index 4e5ee037..0ecdbd8d 100644 --- a/src/scrapers/gamma.js +++ b/src/scrapers/gamma.js @@ -200,6 +200,18 @@ async function getPhotosApi(entryId, site, parameters) { return photos.concat(thumbs.slice(photos.length)); } +function getImageSources(source) { + return [ + `https://images-fame.gammacdn.com/movies${source}`, + `https://images01-fame.gammacdn.com/movies${source}`, + `https://images02-fame.gammacdn.com/movies${source}`, + `https://images03-fame.gammacdn.com/movies${source}`, + `https://images04-fame.gammacdn.com/movies${source}`, + `https://images-evilangel.gammacdn.com/movies${source}`, + `https://transform.gammacdn.com/movies${source}`, + ]; +} + async function scrapeApiReleases(json, site) { return json.map((scene) => { if (site.parameters?.extract && scene.sitename !== site.parameters.extract) { @@ -402,13 +414,14 @@ async function scrapeScene({ query }, url, channel, baseRelease, mobileItem, opt return release; } -async function scrapeSceneApi(data, site, options) { +async function scrapeReleaseApi(data, site, options) { const release = {}; - release.entryId = data.clip_id; + release.entryId = data.clip_id || data.movie_id; release.title = data.title; release.duration = data.length; - release.date = new Date(data.date * 1000) || qu.parseDate(data.release_date, 'YYYY-MM-DD'); + release.date = (data.date && new Date(data.date * 1000)) || qu.parseDate(data.release_date || data.last_modified, 'YYYY-MM-DD'); + release.director = data.directors[0]?.name || null; release.actors = data.actors.map((actor) => ({ entryId: actor.actor_id, @@ -423,33 +436,9 @@ async function scrapeSceneApi(data, site, options) { if (data.pictures) { release.poster = [ - ...(data.pictures['1920x1080'] ? [ - `https://images-fame.gammacdn.com/movies${data.pictures['1920x1080']}`, - `https://images01-fame.gammacdn.com/movies${data.pictures['1920x1080']}`, - `https://images02-fame.gammacdn.com/movies${data.pictures['1920x1080']}`, - `https://images03-fame.gammacdn.com/movies${data.pictures['1920x1080']}`, - `https://images04-fame.gammacdn.com/movies${data.pictures['1920x1080']}`, - `https://images-evilangel.gammacdn.com/movies${data.pictures['1920x1080']}`, - `https://transform.gammacdn.com/movies${data.pictures['1920x1080']}`, - ] : []), - ...(data.pictures.resized ? [ - `https://images-fame.gammacdn.com/movies${data.pictures.resized}`, - `https://images01-fame.gammacdn.com/movies${data.pictures.resized}`, - `https://images02-fame.gammacdn.com/movies${data.pictures.resized}`, - `https://images03-fame.gammacdn.com/movies${data.pictures.resized}`, - `https://images04-fame.gammacdn.com/movies${data.pictures.resized}`, - `https://images-evilangel.gammacdn.com/movies${data.pictures.resized}`, - `https://transform.gammacdn.com/movies${data.pictures.resized}`, - ] : []), - ...(data.pictures['960x544'] ? [ - `https://images-fame.gammacdn.com/movies${data.pictures['960x544']}?width=1950`, - `https://images01-fame.gammacdn.com/movies${data.pictures['960x544']}?width=1950`, - `https://images02-fame.gammacdn.com/movies${data.pictures['960x544']}?width=1950`, - `https://images03-fame.gammacdn.com/movies${data.pictures['960x544']}?width=1950`, - `https://images04-fame.gammacdn.com/movies${data.pictures['960x544']}?width=1950`, - `https://images-evilangel.gammacdn.com/movies${data.pictures['960x544']}?width=1950`, - `https://transform.gammacdn.com/movies${data.pictures['960x544']}?width=1950`, - ] : []), + ...(data.pictures['1920x1080'] ? getImageSources(data.pictures['1920x1080']) : []), + ...(data.pictures.resized ? getImageSources(data.pictures.resized) : []), + ...(data.pictures['960x544'] ? getImageSources(data.pictures['960x544']) : []), ]; } @@ -457,15 +446,22 @@ async function scrapeSceneApi(data, site, options) { release.photos = await getPhotosApi(data.photoset_id, site, options.parameters); } + if (data.cover_path) { + release.covers = [ + getImageSources(`/${data.cover_path}_front_400x625.jpg?width=450&height=636&format=webp`), + getImageSources(`/${data.cover_path}_back_400x625.jpg?width=450&height=636&format=webp`), + ]; + } + if (data.trailers) { release.trailer = Object.entries(data.trailers).map(([quality, source]) => ({ src: source, quality })); } - if (data.movie_id) { + if (data.movie_id && !data.movie_path) { release.movie = { entryId: data.movie_id, title: data.movie_title, - url: qu.prefixUrl(`/en/movie/${data.url_movie_title}/${data.movie_id}`, site.url), + url: qu.prefixUrl(`${data.url_movie_title}/${data.movie_id}`, options.parameters.movie ? options.parameters.movie : `${site.url}/en/movie`), }; } @@ -642,8 +638,6 @@ async function fetchLatestApi(site, page = 1, preData, include, upcoming = false encodeJSON: true, }); - console.log(res.body.results); - if (res.status === 200 && res.body.results?.[0]?.hits) { return scrapeApiReleases(res.body.results[0].hits, site); } @@ -681,7 +675,39 @@ async function fetchSceneApi(url, site, baseRelease, options) { }); if (res.status === 200 && res.body.results?.[0]?.hits) { - return scrapeSceneApi(res.body.results[0].hits[0], site, options); + return scrapeReleaseApi(res.body.results[0].hits[0], site, options); + } + + return res.status; +} + +async function fetchMovieApi(url, site, baseRelease, options) { + const referer = options.parameters?.referer || `${site.parameters?.networkReferer ? site.parent.url : site.url}/en/movies`; + const { apiUrl } = await fetchApiCredentials(referer, site); + + const entryId = (baseRelease?.path || new URL(url).pathname).match(/\/(\d{2,})(\/|$)/)?.[1]; + + const res = await http.post(apiUrl, { + requests: [ + { + indexName: 'all_movies', + params: `query=&page=0&facets=[]&tagFilters=&facetFilters=[["movie_id:${entryId}"]]`, + }, + { + indexName: 'all_movies', + params: 'query=&page=0&hitsPerPage=1&attributesToRetrieve=[]&attributesToHighlight=[]&attributesToSnippet=[]&tagFilters=&analytics=false&clickAnalytics=false&facets=clip_id', + }, + ], + }, { + headers: { + Referer: referer, + }, + }, { + encodeJSON: true, + }); + + if (res.status === 200 && res.body.results?.[0]?.hits) { + return scrapeReleaseApi(res.body.results[0].hits[0], site, options); } return res.status; @@ -894,7 +920,8 @@ module.exports = { fetchProfile: fetchApiProfile, // fetchScene, fetchScene: fetchSceneApi, - scrapeMovie, + // scrapeMovie, + fetchMovie: fetchMovieApi, }, getPhotos, scrapeApiProfile,