forked from DebaucheryLibrarian/traxxx
Updated scene URLs in Vixen scraper.
This commit is contained in:
parent
c5e74c33b7
commit
f8a3bf6a64
|
@ -142,7 +142,7 @@ function scrapeAll(scenes, site, origin) {
|
||||||
release.title = scene.title;
|
release.title = scene.title;
|
||||||
|
|
||||||
release.entryId = String(scene.newId);
|
release.entryId = String(scene.newId);
|
||||||
release.url = `${site?.url || origin}${scene.targetUrl}`;
|
release.url = `${site?.url || origin}/videos${scene.targetUrl}`;
|
||||||
|
|
||||||
release.date = moment.utc(scene.releaseDate).toDate();
|
release.date = moment.utc(scene.releaseDate).toDate();
|
||||||
release.datePrecision = 'minute';
|
release.datePrecision = 'minute';
|
||||||
|
@ -168,7 +168,7 @@ function scrapeUpcoming(scene, site) {
|
||||||
.map(component => `${component.charAt(0).toUpperCase()}${component.slice(1)}`)
|
.map(component => `${component.charAt(0).toUpperCase()}${component.slice(1)}`)
|
||||||
.join(' ');
|
.join(' ');
|
||||||
|
|
||||||
release.url = `${site.url}${scene.targetUrl}`;
|
release.url = `${site.url}/videos${scene.targetUrl}`;
|
||||||
|
|
||||||
release.date = moment.utc(scene.releaseDate).toDate();
|
release.date = moment.utc(scene.releaseDate).toDate();
|
||||||
release.datePrecision = 'minute';
|
release.datePrecision = 'minute';
|
||||||
|
@ -302,7 +302,7 @@ async function fetchUpcoming(site) {
|
||||||
|
|
||||||
async function fetchScene(url, site, baseRelease) {
|
async function fetchScene(url, site, baseRelease) {
|
||||||
const { origin, pathname } = new URL(url);
|
const { origin, pathname } = new URL(url);
|
||||||
const apiUrl = `${origin}/api${pathname}`;
|
const apiUrl = `${origin}/api/${pathname.split('/').slice(-1)[0]}`;
|
||||||
|
|
||||||
const res = await http.get(apiUrl);
|
const res = await http.get(apiUrl);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue