forked from DebaucheryLibrarian/traxxx
Allowing mobile parameter to be set on Gamma network. Added mobile to 21Naturals and 21Sextreme, moved 21Sextury mobile to network.
This commit is contained in:
@@ -467,11 +467,11 @@ async function fetchUpcoming(site) {
|
||||
return scrapeAll(res.body.toString(), site, null, false);
|
||||
}
|
||||
|
||||
function getDeepUrl(url, site, release, mobile = false) {
|
||||
function getDeepUrl(url, site, release, mobile) {
|
||||
const pathname = release?.path || new URL(url).pathname;
|
||||
|
||||
if (mobile) {
|
||||
return `${site.parameters.mobile}${pathname.replace('/en/video', '')}`;
|
||||
return `${mobile}${pathname.replace('/en/video', '')}`;
|
||||
}
|
||||
|
||||
if (site.parameters?.deep === 'network') {
|
||||
@@ -491,7 +491,7 @@ async function fetchScene(url, site, release) {
|
||||
}
|
||||
|
||||
const deepUrl = getDeepUrl(url, site, release);
|
||||
const mobileUrl = site.parameters?.mobile && getDeepUrl(url, site, release, true);
|
||||
const mobileUrl = getDeepUrl(url, site, release, site.parameters?.mobile || site.network.parameters?.mobile);
|
||||
|
||||
if (deepUrl) {
|
||||
const [res, mobileRes] = await Promise.all([
|
||||
|
||||
Reference in New Issue
Block a user