Accomodating unprint proxy options.
This commit is contained in:
@@ -36,11 +36,11 @@ unprint.options({
|
||||
'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36',
|
||||
},
|
||||
limits: config.limits,
|
||||
proxyAddress: `http://${config.proxy.host}:${config.proxy.port}`,
|
||||
proxy: config.proxy,
|
||||
});
|
||||
|
||||
unprint.on('requestInit', (event) => logger.debug(`Unprint ${event.method} (${event.interval}ms/${event.concurrency}p${event.proxy ? '' : ' proxied'}) ${event.url}`));
|
||||
unprint.on('requestError', (event) => logger.error(`Unprint failed ${event.proxied ? ' proxied' : ''}${event.method} ${event.url} (${event.status}): ${event.statusText}`));
|
||||
unprint.on('requestInit', (event) => logger.debug(`Unprint ${event.method} (${event.interval}ms/${event.concurrency}p${event.isProxied ? ' proxied' : ''}) ${event.url}`));
|
||||
unprint.on('requestError', (event) => logger.error(`Unprint failed ${event.isProxied ? ' proxied' : ''}${event.method} ${event.url} (${event.status}): ${event.statusText}`));
|
||||
|
||||
function logActive() {
|
||||
setTimeout(() => {
|
||||
|
||||
@@ -91,9 +91,7 @@ function scrapeProfile({ query }, url, channel) {
|
||||
|
||||
async function fetchLatest(channel, page) {
|
||||
// const res = await unprint.get(`https://www.analvids.com/new-videos/${page}`, { selectAll: '.card-scene' }); // analvids as channel
|
||||
const res = await unprint.get(`${channel.url}/latest/${page}`, {
|
||||
selectAll: '.card-scene', // studios as channels
|
||||
});
|
||||
const res = await unprint.get(`${channel.url}/latest/${page}`, { selectAll: '.card-scene' }); // studios as channels
|
||||
|
||||
if (res.ok) {
|
||||
return scrapeAll(res.context, channel);
|
||||
|
||||
Reference in New Issue
Block a user