From 31abbb9ffeef75b0f41162420d7cbd0e7862fb57 Mon Sep 17 00:00:00 2001 From: DebaucheryLibrarian Date: Thu, 21 Aug 2025 02:23:13 +0200 Subject: [PATCH] Fixed tags and photos in Bang scraper, added to default proxy list. --- config/default.js | 4 ++++ package-lock.json | 8 ++++---- package.json | 2 +- src/scrapers/bang.js | 4 ++-- src/tags.js | 4 ++-- 5 files changed, 13 insertions(+), 9 deletions(-) diff --git a/config/default.js b/config/default.js index 2f4682e5..d8dc7ad0 100755 --- a/config/default.js +++ b/config/default.js @@ -425,6 +425,10 @@ module.exports = { 'dpdiva.com', 'www.oraloverdose.com', 'upherasshole.com', + // BANG + 'www.bang.com', + 'i.bang.com', + 'photos.bngcdn.com', ], }, bypass: { diff --git a/package-lock.json b/package-lock.json index bbb59aed..47c85df6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -89,7 +89,7 @@ "tunnel": "0.0.6", "ua-parser-js": "^1.0.37", "undici": "^5.28.1", - "unprint": "^0.15.6", + "unprint": "^0.15.7", "url-pattern": "^1.0.3", "v-tooltip": "^2.1.3", "video.js": "^8.6.1", @@ -18359,9 +18359,9 @@ } }, "node_modules/unprint": { - "version": "0.15.6", - "resolved": "https://registry.npmjs.org/unprint/-/unprint-0.15.6.tgz", - "integrity": "sha512-ky79GyBuOJNAmreb73ryEDmPJzM+d8jOp9Sx3KxsW3iNDNJFCYKAf9BmK4j32aXNpWeNtiHFuwxJlsaUeDP2wA==", + "version": "0.15.7", + "resolved": "https://registry.npmjs.org/unprint/-/unprint-0.15.7.tgz", + "integrity": "sha512-sR4HhdJbPxkcQlQem/Hl3N67Nhn47wiK71qvl+yCT1N31tknA+mhtD+aWW5MG5F9fnJpCTlr/s4mCLxalj6XEA==", "dependencies": { "axios": "^0.27.2", "bottleneck": "^2.19.5", diff --git a/package.json b/package.json index 8fbc8f25..3318b093 100755 --- a/package.json +++ b/package.json @@ -148,7 +148,7 @@ "tunnel": "0.0.6", "ua-parser-js": "^1.0.37", "undici": "^5.28.1", - "unprint": "^0.15.6", + "unprint": "^0.15.7", "url-pattern": "^1.0.3", "v-tooltip": "^2.1.3", "video.js": "^8.6.1", diff --git a/src/scrapers/bang.js b/src/scrapers/bang.js index b2e189b5..4d1bc404 100755 --- a/src/scrapers/bang.js +++ b/src/scrapers/bang.js @@ -116,7 +116,7 @@ async function scrapeScene({ query }, { url, entity }) { })); } - release.tags = query.contents('.actions .genres'); + release.tags = query.contents('div[data-controller] .genres'); const sourcesData = query.json('.video-container [data-videopreview-sources-value]', { attribute: 'data-videopreview-sources-value' }); @@ -131,7 +131,7 @@ async function scrapeScene({ query }, { url, entity }) { || query.attribute('meta[property="og:video"]') || query.video('video[data-videocontainer-target] source'); - release.photos = query.sourceSets('.photo-set img'); + release.photos = query.sourceSets('div[data-controller] a[href^="/photos"] img'); release.photoCount = query.number('//h2[contains(text(), "Photos")]/following-sibling::span'); const channelName = query.content('.video-container + div a[href*="?in="]')?.trim(); diff --git a/src/tags.js b/src/tags.js index 73e285b7..779adaf4 100755 --- a/src/tags.js +++ b/src/tags.js @@ -80,8 +80,8 @@ async function matchReleaseTags(releases) { const casedTags = [...new Set( rawTags - .concat(rawTags.map((tag) => tag.toLowerCase())) - .concat(rawTags.map((tag) => tag.toUpperCase())), + .concat(rawTags.map((tag) => tag.trim().toLowerCase())) + .concat(rawTags.map((tag) => tag.trim().toUpperCase())), )]; const tagEntries = await knex('tags')