Compare commits
2 Commits
f1c9ac4207
...
21a3bc44e6
Author | SHA1 | Date |
---|---|---|
|
21a3bc44e6 | |
|
b00b8f4a96 |
|
@ -1,12 +1,12 @@
|
||||||
{
|
{
|
||||||
"name": "traxxx",
|
"name": "traxxx",
|
||||||
"version": "1.214.1",
|
"version": "1.214.2",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "traxxx",
|
"name": "traxxx",
|
||||||
"version": "1.214.1",
|
"version": "1.214.2",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@casl/ability": "^5.2.2",
|
"@casl/ability": "^5.2.2",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "traxxx",
|
"name": "traxxx",
|
||||||
"version": "1.214.1",
|
"version": "1.214.2",
|
||||||
"description": "All the latest porn releases in one place",
|
"description": "All the latest porn releases in one place",
|
||||||
"main": "src/app.js",
|
"main": "src/app.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
const slugify = require('../utils/slugify');
|
const slugify = require('../utils/slugify');
|
||||||
const qu = require('../utils/qu');
|
const qu = require('../utils/qu');
|
||||||
|
|
||||||
async function getPhotos(albumUrl) {
|
async function getPhotos(albumUrl, channel) {
|
||||||
const res = await qu.get(albumUrl);
|
const res = await qu.get(albumUrl);
|
||||||
|
|
||||||
if (!res.ok) {
|
if (!res.ok) {
|
||||||
|
@ -14,12 +14,21 @@ async function getPhotos(albumUrl) {
|
||||||
const lastPhotoIndex = parseInt(lastPhotoPage.match(/\d+.jpg/)[0], 10);
|
const lastPhotoIndex = parseInt(lastPhotoPage.match(/\d+.jpg/)[0], 10);
|
||||||
|
|
||||||
const photoUrls = Array.from({ length: lastPhotoIndex }, (value, index) => {
|
const photoUrls = Array.from({ length: lastPhotoIndex }, (value, index) => {
|
||||||
const pageUrl = `https://blacksonblondes.com${lastPhotoPage.replace(/\d+.jpg/, `${(index + 1).toString().padStart(3, '0')}.jpg`)}`;
|
const pageUrl = `${channel.url}${lastPhotoPage.replace(/\d+.jpg/, `${(index + 1).toString().padStart(3, '0')}.jpg`)}`;
|
||||||
|
const networkPageUrl = `https://dogfartnetwork.com${lastPhotoPage.replace('tourx', 'tour').replace(/\d+.jpg/, `${(index + 1).toString().padStart(3, '0')}.jpg`)}`;
|
||||||
|
|
||||||
return {
|
const extract = ({ query }) => query.img('.scenes-module img');
|
||||||
url: pageUrl,
|
|
||||||
extract: ({ query }) => query.img('.scenes-module img'),
|
return [
|
||||||
};
|
{
|
||||||
|
url: pageUrl,
|
||||||
|
extract,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
url: networkPageUrl,
|
||||||
|
extract,
|
||||||
|
},
|
||||||
|
];
|
||||||
});
|
});
|
||||||
|
|
||||||
return photoUrls;
|
return photoUrls;
|
||||||
|
@ -90,6 +99,8 @@ async function scrapeScene({ query }, url, channel, baseScene, parameters) {
|
||||||
|
|
||||||
release.stars = Number(((query.number('span[itemprop="average"], span[itemprop="ratingValue"]') || query.number('canvas[data-score]', null, 'data-score')) / 2).toFixed(2));
|
release.stars = Number(((query.number('span[itemprop="average"], span[itemprop="ratingValue"]') || query.number('canvas[data-score]', null, 'data-score')) / 2).toFixed(2));
|
||||||
|
|
||||||
|
console.log(release.photos);
|
||||||
|
|
||||||
return release;
|
return release;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue