Merged DDF Network with Porn World. Fixed and updated DDF/PW scraper.

This commit is contained in:
2020-07-12 22:36:53 +02:00
parent 70c60e93ac
commit a7707b7b28
66 changed files with 94 additions and 73 deletions

View File

@@ -127,16 +127,16 @@ function date(context, selector, format, match, attr = 'textContent') {
function image(context, selector = 'img', attr, origin, protocol = 'https') {
const imageEl = (attr && q(context, selector, attr))
|| q(context, selector, 'src')
|| q(context, selector, 'data-src');
|| q(context, selector, 'data-src')
|| q(context, selector, 'src');
return prefixUrl(imageEl, origin, protocol);
}
function images(context, selector = 'img', attr, origin, protocol = 'https') {
const attribute = attr
|| (q(context, selector, 'src') && 'src')
|| (q(context, selector, 'data-src') && 'data-src');
|| (q(context, selector, 'data-src') && 'data-src')
|| (q(context, selector, 'src') && 'src');
const imageEls = all(context, selector, attribute);