forked from DebaucheryLibrarian/traxxx
Fixed Score scraper breaking on scene with homepage URL. Updated Say Uncle Team Skeet endpoint.
This commit is contained in:
@@ -27,6 +27,7 @@ function scrapeAll(scenes, channel, parameters) {
|
||||
const poster = query.img('.item-img img');
|
||||
|
||||
const url = stripQuery(query.url('a.i-title, .item-img a'));
|
||||
const { pathname, hostname } = new URL(url);
|
||||
|
||||
release.title = query.content('a.i-title, h2.i-title');
|
||||
release.duration = query.duration('.time-ol');
|
||||
@@ -44,7 +45,7 @@ function scrapeAll(scenes, channel, parameters) {
|
||||
|
||||
release.actors = query.content('.i-model').split(',').map((actor) => actor.trim());
|
||||
|
||||
if (url.includes('join.') || url.includes('/join')) {
|
||||
if (hostname.includes('join.') || pathname.includes('/join') || pathname.length <= 1) {
|
||||
// no link available, attempt to reconstruct from poster URL
|
||||
const entryId = poster?.match(/posting_(\d+)/)?.[1];
|
||||
|
||||
@@ -58,7 +59,7 @@ function scrapeAll(scenes, channel, parameters) {
|
||||
}
|
||||
} else {
|
||||
release.url = url;
|
||||
release.entryId = new URL(release.url).pathname.match(/\/(\d+)\/?$/)[1];
|
||||
release.entryId = pathname.match(/\/(\d+)\/?$/)[1];
|
||||
}
|
||||
|
||||
if (poster) {
|
||||
|
||||
Reference in New Issue
Block a user