Added generic Gamma photo and actor scraper for XEmpire, 21Sextury, Blowpass and Evil Angel.
This commit is contained in:
@@ -60,7 +60,7 @@ function destructConfigNetworks(networks) {
|
||||
}
|
||||
|
||||
async function findSiteByUrl(url) {
|
||||
const { hostname, origin } = new URL(url);
|
||||
const { hostname } = new URL(url);
|
||||
const domain = hostname.replace(/www.|tour./, '');
|
||||
|
||||
const sites = await knex('sites')
|
||||
@@ -69,8 +69,8 @@ async function findSiteByUrl(url) {
|
||||
'sites.*',
|
||||
'networks.name as network_name', 'networks.slug as network_slug', 'networks.url as network_url', 'networks.description as network_description', 'networks.parameters as network_parameters',
|
||||
)
|
||||
.where('sites.url', 'like', `${domain}`)
|
||||
.orWhere('sites.url', 'like', `${origin}`)
|
||||
.where('sites.url', 'like', `%${domain}`)
|
||||
.orWhere('sites.url', 'like', url)
|
||||
.orWhere('sites.url', url);
|
||||
|
||||
if (sites.length > 0) {
|
||||
|
||||
Reference in New Issue
Block a user