Handling missing trailers in Kink scraper.
This commit is contained in:
parent
d194d7107d
commit
c94e1aaea9
|
@ -50,24 +50,26 @@ async function scrapeScene({ query }, url) {
|
|||
|
||||
const trailer = query.q('.player span[data-type="trailer-src"]', 'data-url');
|
||||
|
||||
release.trailer = [
|
||||
{
|
||||
src: trailer.replace('480p', '1080p'),
|
||||
quality: 1080,
|
||||
},
|
||||
{
|
||||
src: trailer.replace('480p', '720p'),
|
||||
quality: 720,
|
||||
},
|
||||
{
|
||||
src: trailer,
|
||||
quality: 480,
|
||||
},
|
||||
{
|
||||
src: trailer.replace('480p', '360p'),
|
||||
quality: 360,
|
||||
},
|
||||
];
|
||||
if (trailer) {
|
||||
release.trailer = [
|
||||
{
|
||||
src: trailer.replace('480p', '1080p'),
|
||||
quality: 1080,
|
||||
},
|
||||
{
|
||||
src: trailer.replace('480p', '720p'),
|
||||
quality: 720,
|
||||
},
|
||||
{
|
||||
src: trailer,
|
||||
quality: 480,
|
||||
},
|
||||
{
|
||||
src: trailer.replace('480p', '360p'),
|
||||
quality: 360,
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
release.channel = query.url('.shoot-logo a').split('/').slice(-1)[0];
|
||||
|
||||
|
|
Loading…
Reference in New Issue