Added Snow Valley (Sperm Mania) scraper.
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
'use strict';
|
||||
|
||||
const config = require('config');
|
||||
const unprint = require('unprint');
|
||||
const format = require('template-format');
|
||||
const { HttpsProxyAgent } = require('https-proxy-agent');
|
||||
|
||||
const qu = require('../utils/qu');
|
||||
const slugify = require('../utils/slugify');
|
||||
@@ -137,11 +139,14 @@ function scrapeProfile({ query, el }) {
|
||||
return profile;
|
||||
}
|
||||
|
||||
const agent = new HttpsProxyAgent(`http://${config.proxy.host}:${config.proxy.port}`);
|
||||
|
||||
async function fetchLatest(channel, page) {
|
||||
// const res = await qu.getAll(`${channel.url}/categories/movies_${page}_d.html`, '.thumb-big, .thumb-video, .thumbnail, .thumbnail-popular, .full-thumbnail');
|
||||
|
||||
const res = await unprint.get(`${channel.url}${format(channel.parameters?.latest || '/categories/movies_{page}_d.html', { page })}`, {
|
||||
selectAll: '.thumb-big, .thumb-video, .thumbnail, .thumbnail-popular, .full-thumbnail',
|
||||
httpsAgent: agent,
|
||||
});
|
||||
|
||||
if (res.ok) {
|
||||
|
||||
Reference in New Issue
Block a user