forked from DebaucheryLibrarian/traxxx
Using more aggressive optional chaining in Vixen scraper to prevent errors.
This commit is contained in:
parent
f8e7ace89f
commit
83e22813f3
|
@ -233,7 +233,7 @@ async function scrapeSceneData(data, channel, options) {
|
|||
|
||||
release.actors = data.models;
|
||||
|
||||
release.directors = data.directors.map((director) => ({
|
||||
release.directors = data.directors?.map((director) => ({
|
||||
entryId: director.directorId,
|
||||
name: director.name,
|
||||
}));
|
||||
|
@ -245,10 +245,10 @@ async function scrapeSceneData(data, channel, options) {
|
|||
release.trailer = await getTrailer(release.entryId, channel, release.url);
|
||||
}
|
||||
|
||||
release.tags = data.categories.map((category) => category.name);
|
||||
release.qualities = data.downloadResolutions.map((quality) => Number(quality.width)).filter(Boolean); // width property is actually the height
|
||||
release.tags = data.categories?.map((category) => category.name);
|
||||
release.qualities = data.downloadResolutions?.map((quality) => Number(quality.width)).filter(Boolean); // width property is actually the height
|
||||
|
||||
release.chapters = data.chapters.video?.map((chapter) => ({
|
||||
release.chapters = data.chapters?.video?.map((chapter) => ({
|
||||
time: chapter.seconds,
|
||||
tags: [chapter.title],
|
||||
}));
|
||||
|
|
Loading…
Reference in New Issue