Fixed Porn Doe's poster query. Checking style attribute existence in qu before attempting to use it.
This commit is contained in:
parent
718abdfdba
commit
0190ee9531
|
@ -10,12 +10,14 @@ function scrapeAll(scenes) {
|
||||||
release.url = query.url('a');
|
release.url = query.url('a');
|
||||||
release.entryId = release.url.match(/\/watch\/(\d+)/)[1];
|
release.entryId = release.url.match(/\/watch\/(\d+)/)[1];
|
||||||
|
|
||||||
release.title = query.q('.bottom h4', true);
|
release.title = query.cnt('.bottom .h4') || query.q('.bottom .link', 'title');
|
||||||
release.date = query.date('.extra-info:not(.actors)', 'DD MMMM YYYY');
|
release.date = query.date('.extra-info:not(.actors)', 'DD MMMM YYYY');
|
||||||
|
|
||||||
release.actors = query.all('.actors a strong', true);
|
release.actors = query.all('.actors a strong', true);
|
||||||
|
|
||||||
const poster = query.img('.thumb img');
|
// const poster = query.img('.thumb img');
|
||||||
|
const poster = query.img('.thumb', 'data-bg');
|
||||||
|
|
||||||
release.poster = [
|
release.poster = [
|
||||||
poster.replace('512x288', '1472x828'),
|
poster.replace('512x288', '1472x828'),
|
||||||
poster,
|
poster,
|
||||||
|
|
|
@ -141,7 +141,7 @@ function removeStyleFunctionSpaces(el) {
|
||||||
function style(context, selector, styleAttr) {
|
function style(context, selector, styleAttr) {
|
||||||
const el = q(context, selector);
|
const el = q(context, selector);
|
||||||
|
|
||||||
if (el) {
|
if (el?.hasAttribute('style')) {
|
||||||
removeStyleFunctionSpaces(el);
|
removeStyleFunctionSpaces(el);
|
||||||
|
|
||||||
return styleAttr ? el.style[styleAttr] : el.style;
|
return styleAttr ? el.style[styleAttr] : el.style;
|
||||||
|
|
Loading…
Reference in New Issue