Compare commits

..

No commits in common. "433498eaeda79a3a1c83f6d5546c80abe396e728" and "09a48ed064a45110638a4b4bfaa0533abd568add" have entirely different histories.

7 changed files with 173 additions and 1068 deletions

View File

@ -303,7 +303,6 @@ module.exports = {
enable: false, enable: false,
hostnames: [ // these can run in the same browser session hostnames: [ // these can run in the same browser session
'www.kink.com', 'www.kink.com',
'store2.psmcdn.net', // Team Skeet API
], ],
}, },
cloudflare: { cloudflare: {

1198
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
{ {
"name": "traxxx", "name": "traxxx",
"version": "1.227.7", "version": "1.227.6",
"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": {
@ -125,9 +125,9 @@
"postgraphile-plugin-connection-filter": "^2.2.2", "postgraphile-plugin-connection-filter": "^2.2.2",
"promise-task-queue": "^1.2.0", "promise-task-queue": "^1.2.0",
"prop-types": "^15.7.2", "prop-types": "^15.7.2",
"puppeteer": "^20.5.0", "puppeteer": "^18.2.0",
"puppeteer-extra": "^3.3.6", "puppeteer-extra": "^3.3.4",
"puppeteer-extra-plugin-stealth": "^2.11.2", "puppeteer-extra-plugin-stealth": "^2.11.1",
"sharp": "^0.29.2", "sharp": "^0.29.2",
"showdown": "^1.9.1", "showdown": "^1.9.1",
"source-map-support": "^0.5.16", "source-map-support": "^0.5.16",

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 446 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

View File

@ -143,9 +143,9 @@ function getLimiter(options = {}, url) {
return limiters[interval][concurrency]; return limiters[interval][concurrency];
} }
function extractJson(body, headers) { function extractJson(solution) {
if (headers['content-type'].includes('application/json')) { if (solution.headers['content-type'].includes('application/json')) {
const { document } = new JSDOM(body, { virtualConsole }).window; const { document } = new JSDOM(solution.response, { virtualConsole }).window;
const dataString = document.querySelector('body > pre')?.textContent; const dataString = document.querySelector('body > pre')?.textContent;
if (dataString) { if (dataString) {
@ -155,14 +155,14 @@ function extractJson(body, headers) {
} }
} }
return body; return solution.response;
} }
async function getBrowserSession(identifier, options = {}) { async function getBrowserSession(identifier, options = {}) {
return limiters.bypass.schedule(async () => { return limiters.bypass.schedule(async () => {
if (!browser) { if (!browser) {
browser = await puppeteer.launch({ browser = await puppeteer.launch({
headless: typeof options.headless === 'undefined' ? 'new' : options.headless, headless: typeof options.headless === 'undefined' ? true : options.headless,
// headless: false, // headless: false,
}); });
@ -178,24 +178,20 @@ async function getBrowserSession(identifier, options = {}) {
} }
async function bypassBrowserRequest(url, _options) { async function bypassBrowserRequest(url, _options) {
const { tab } = await getBrowserSession(new URL(url).hostname); const page = await getBrowserSession(new URL(url).hostname);
const res = await tab.goto(url); const res = await page.goto(url);
const rawBody = await tab.content(); const body = await page.content();
const headers = res.headers(); console.log(res);
const body = extractJson(rawBody, headers); console.log(res.status());
const statusCode = res.status();
if (!statusCode === 200) {
throw new Error(`Puppeteer bypass failed for ${url} (${statusCode}): ${body?.message}`);
}
return { return {
body, body,
statusCode, /*
headers, statusCode: res.body.solution.status,
headers: res.body.solution.headers,
*/
}; };
} }
@ -291,7 +287,7 @@ async function bypassCloudflareRequest(url, method, body, cloudflareBypass, opti
throw new Error(`CloudFlare bypass failed for ${url} (${res.statusCode}): ${res.body?.message}`); throw new Error(`CloudFlare bypass failed for ${url} (${res.statusCode}): ${res.body?.message}`);
} }
const resBody = extractJson(res.body.solution.response, res.body.solution.headers); const resBody = extractJson(res.body.solution);
return { return {
body: resBody, body: resBody,