Compare commits
	
		
			No commits in common. "d37a7ab7cc2636a2b5190371e068f08b7b56308d" and "4fc0053bd98a16d137a7224bbcb14a4482a6bde3" have entirely different histories.
		
	
	
		
			d37a7ab7cc
			...
			4fc0053bd9
		
	
		|  | @ -12,44 +12,9 @@ module.exports = { | ||||||
|     // include: [],
 |     // include: [],
 | ||||||
|     // exclude: [],
 |     // exclude: [],
 | ||||||
|     exclude: [ |     exclude: [ | ||||||
|         ['21sextreme', [ |  | ||||||
|             // no longer updated
 |  | ||||||
|             'mightymistress', |  | ||||||
|             'dominatedgirls', |  | ||||||
|             'homepornreality', |  | ||||||
|             'peeandblow', |  | ||||||
|             'cummingmatures', |  | ||||||
|             'mandyiskinky', |  | ||||||
|             'speculumplays', |  | ||||||
|             'creampiereality', |  | ||||||
|         ]], |  | ||||||
|         ['blowpass', ['sunlustxxx']], |  | ||||||
|         ['ddfnetwork', [ |  | ||||||
|             'fuckinhd', |  | ||||||
|             'bustylover', |  | ||||||
|         ]], |  | ||||||
|         ['famedigital', [ |         ['famedigital', [ | ||||||
|             'daringsex', |  | ||||||
|             'lowartfilms', |             'lowartfilms', | ||||||
|         ]], |         ]], | ||||||
|         ['pornpros', [ |  | ||||||
|             'milfhumiliation', |  | ||||||
|             'humiliated', |  | ||||||
|             'flexiblepositions', |  | ||||||
|             'publicviolations', |  | ||||||
|             'amateurviolations', |  | ||||||
|             'squirtdisgrace', |  | ||||||
|             'cumdisgrace', |  | ||||||
|             'webcamhackers', |  | ||||||
|             'collegeteens', |  | ||||||
|         ]], |  | ||||||
|         ['score', [ |  | ||||||
|             'bigboobbundle', |  | ||||||
|             'milfbundle', |  | ||||||
|             'pornmegaload', |  | ||||||
|             'scorelandtv', |  | ||||||
|             'scoretv', |  | ||||||
|         ]], |  | ||||||
|     ], |     ], | ||||||
|     profiles: [ |     profiles: [ | ||||||
|         [ |         [ | ||||||
|  | @ -139,19 +104,6 @@ module.exports = { | ||||||
|         'freeones', |         'freeones', | ||||||
|         'freeonesLegacy', |         'freeonesLegacy', | ||||||
|     ], |     ], | ||||||
|     proxy: { |  | ||||||
|         enable: false, |  | ||||||
|         host: '', |  | ||||||
|         port: 8888, |  | ||||||
|         hostnames: [ |  | ||||||
|             'www.vixen.com', |  | ||||||
|             'www.blacked.com', |  | ||||||
|             'www.blackedraw.com', |  | ||||||
|             'www.tushy.com', |  | ||||||
|             'www.tushyraw.com', |  | ||||||
|             'www.deeper.com', |  | ||||||
|         ], |  | ||||||
|     }, |  | ||||||
|     fetchAfter: [1, 'week'], |     fetchAfter: [1, 'week'], | ||||||
|     nullDateLimit: 3, |     nullDateLimit: 3, | ||||||
|     media: { |     media: { | ||||||
|  |  | ||||||
|  | @ -1,6 +1,6 @@ | ||||||
| { | { | ||||||
|     "name": "traxxx", |     "name": "traxxx", | ||||||
|     "version": "1.112.0", |     "version": "1.111.3", | ||||||
|     "lockfileVersion": 1, |     "lockfileVersion": 1, | ||||||
|     "requires": true, |     "requires": true, | ||||||
|     "dependencies": { |     "dependencies": { | ||||||
|  |  | ||||||
|  | @ -1,6 +1,6 @@ | ||||||
| { | { | ||||||
|     "name": "traxxx", |     "name": "traxxx", | ||||||
|     "version": "1.112.0", |     "version": "1.111.3", | ||||||
|     "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": { | ||||||
|  |  | ||||||
|  | @ -1,28 +1,10 @@ | ||||||
| 'use strict'; | 'use strict'; | ||||||
| 
 | 
 | ||||||
| const config = require('config'); |  | ||||||
| const tunnel = require('tunnel'); |  | ||||||
| const bhttp = require('bhttp'); | const bhttp = require('bhttp'); | ||||||
| const taskQueue = require('promise-task-queue'); | const taskQueue = require('promise-task-queue'); | ||||||
| 
 | 
 | ||||||
| const logger = require('../logger')(__filename); | const logger = require('../logger')(__filename); | ||||||
| 
 | 
 | ||||||
| const proxyAgent = tunnel.httpsOverHttp({ |  | ||||||
|     proxy: { |  | ||||||
|         host: config.proxy.host, |  | ||||||
|         port: config.proxy.port, |  | ||||||
|     }, |  | ||||||
| }); |  | ||||||
| 
 |  | ||||||
| function useProxy(url) { |  | ||||||
|     if (!config.proxy.enable) { |  | ||||||
|         return false; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     const { hostname } = new URL(url); |  | ||||||
|     return config.proxy.hostnames.includes(hostname); |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| const queue = taskQueue(); | const queue = taskQueue(); | ||||||
| 
 | 
 | ||||||
| queue.on('concurrencyReached:httpGet', () => { | queue.on('concurrencyReached:httpGet', () => { | ||||||
|  | @ -33,42 +15,47 @@ queue.on('concurrencyReached:httpPost', () => { | ||||||
|     logger.silly('Queueing POST requests'); |     logger.silly('Queueing POST requests'); | ||||||
| }); | }); | ||||||
| 
 | 
 | ||||||
| queue.define('http', async ({ | queue.define('httpGet', async ({ | ||||||
|  |     url, | ||||||
|  |     timeout = 30000, | ||||||
|  |     options = {}, | ||||||
|  | }) => { | ||||||
|  |     logger.silly(`GET ${url}`); | ||||||
|  | 
 | ||||||
|  |     const res = await bhttp.get(url, { | ||||||
|  |         responseTimeout: timeout, | ||||||
|  |         ...options, | ||||||
|  |     }); | ||||||
|  | 
 | ||||||
|  |     res.code = res.statusCode; | ||||||
|  | 
 | ||||||
|  |     return res; | ||||||
|  | }, { | ||||||
|  |     concurrency: 20, | ||||||
|  | }); | ||||||
|  | 
 | ||||||
|  | queue.define('httpPost', async ({ | ||||||
|     url, |     url, | ||||||
|     method = 'GET', |  | ||||||
|     body, |     body, | ||||||
|     timeout = 30000, |     timeout = 30000, | ||||||
|     options = {}, |     options = {}, | ||||||
| }) => { | }) => { | ||||||
|     if (body) { |     logger.silly(`POST ${url} with ${body}`); | ||||||
|         logger.silly(`${method.toUpperCase()} ${url} with ${body}`); |  | ||||||
|     } else { |  | ||||||
|         logger.silly(`${method.toUpperCase()} ${url}`); |  | ||||||
|     } |  | ||||||
| 
 | 
 | ||||||
|     const reqOptions = { |     const res = await bhttp.post(url, body, { | ||||||
|         responseTimeout: timeout, |         responseTimeout: timeout, | ||||||
|         ...options, |         ...options, | ||||||
|     }; |     }); | ||||||
| 
 | 
 | ||||||
|     if (useProxy(url)) { |     res.code = res.statusCode; | ||||||
|         reqOptions.agent = proxyAgent; |  | ||||||
|     } |  | ||||||
| 
 | 
 | ||||||
|     const res = ['POST', 'PUT', 'PATCH'].includes(method.toUpperCase()) |     return res; | ||||||
|         ? await bhttp[method.toLowerCase()](url, body, reqOptions) |  | ||||||
|         : await bhttp[method.toLowerCase()](url, reqOptions); |  | ||||||
| 
 |  | ||||||
|     return { |  | ||||||
|         ...res, |  | ||||||
|         code: res.statusCode, |  | ||||||
|     }; |  | ||||||
| }, { | }, { | ||||||
|     concurrency: 20, |     concurrency: 20, | ||||||
| }); | }); | ||||||
| 
 | 
 | ||||||
| async function get(url, options) { | async function get(url, options) { | ||||||
|     return queue.push('http', { |     return queue.push('httpGet', { | ||||||
|         method: 'get', |         method: 'get', | ||||||
|         url, |         url, | ||||||
|         options, |         options, | ||||||
|  | @ -76,7 +63,7 @@ async function get(url, options) { | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| async function post(url, body, options) { | async function post(url, body, options) { | ||||||
|     return queue.push('http', { |     return queue.push('httpPost', { | ||||||
|         url, |         url, | ||||||
|         body, |         body, | ||||||
|         options, |         options, | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue