From 5d468b58fdb4950cdb037dfbf36449128dd68740 Mon Sep 17 00:00:00 2001 From: Niels Simenon Date: Fri, 6 Mar 2020 19:44:20 +0100 Subject: [PATCH] Enabled mobile album fetching for Pure Taboo and Fantasy Massage. --- seeds/01_networks.js | 3 +++ seeds/02_sites.js | 11 ++++------- src/scrapers/gamma.js | 10 +++------- 3 files changed, 10 insertions(+), 14 deletions(-) diff --git a/seeds/01_networks.js b/seeds/01_networks.js index 2af165f1..a1a92c53 100644 --- a/seeds/01_networks.js +++ b/seeds/01_networks.js @@ -145,6 +145,9 @@ const networks = [ slug: 'fantasymassage', name: 'Fantasy Massage', url: 'https://www.fantasymassage.com', + parameters: { + mobile: 'https://m.dpfanatics.com/en/video', + }, parent: 'gamma', }, { diff --git a/seeds/02_sites.js b/seeds/02_sites.js index 81e3df68..06ee0d46 100644 --- a/seeds/02_sites.js +++ b/seeds/02_sites.js @@ -1811,7 +1811,6 @@ const sites = [ parameters: { latest: 'https://www.fantasymassage.com/en/allvideos/allgirlmassage/AllCategories/0/AllPornstars/0/updates/', upcoming: 'https://www.fantasymassage.com/en/allvideos/allgirlmassage/AllCategories/0/Actor/0/upcoming/', - deep: 'network', photos: 'https://www.fantasymassage.com/en/photo', }, }, @@ -1823,7 +1822,6 @@ const sites = [ parameters: { latest: 'https://www.fantasymassage.com/en/allvideos/nurumassage/AllCategories/0/AllPornstars/0/updates/', upcoming: 'https://www.fantasymassage.com/en/allvideos/nurumassage/AllCategories/0/Actor/0/upcoming/', - deep: 'network', photos: 'https://www.fantasymassage.com/en/photo', }, }, @@ -1835,7 +1833,6 @@ const sites = [ parameters: { latest: 'https://www.fantasymassage.com/en/allvideos/trickyspa/AllCategories/0/AllPornstars/0/updates/', upcoming: 'https://www.fantasymassage.com/en/allvideos/trickyspa/AllCategories/0/Actor/0/upcoming/', - deep: 'network', photos: 'https://www.fantasymassage.com/en/photo', }, }, @@ -1847,7 +1844,6 @@ const sites = [ parameters: { latest: 'https://www.fantasymassage.com/en/allvideos/soapymassage/AllCategories/0/AllPornstars/0/updates/', upcoming: 'https://www.fantasymassage.com/en/allvideos/soapymassage/AllCategories/0/Actor/0/upcoming/', - deep: 'network', photos: 'https://www.fantasymassage.com/en/photo', }, }, @@ -1859,7 +1855,6 @@ const sites = [ parameters: { latest: 'https://www.fantasymassage.com/en/allvideos/milkingtable/AllCategories/0/AllPornstars/0/updates/', upcoming: 'https://www.fantasymassage.com/en/allvideos/milkingtable/AllCategories/0/Actor/0/upcoming/', - deep: 'network', photos: 'https://www.fantasymassage.com/en/photo', }, }, @@ -1871,7 +1866,6 @@ const sites = [ parameters: { latest: 'https://www.fantasymassage.com/en/allvideos/massage-parlor/AllCategories/0/AllPornstars/0/updates/', upcoming: 'https://www.fantasymassage.com/en/allvideos/massage-parlor/AllCategories/0/Actor/0/upcoming/', - deep: 'network', photos: 'https://www.fantasymassage.com/en/photo', }, }, @@ -4139,7 +4133,10 @@ const sites = [ description: 'PureTaboo.com is the ultimate site for family taboo porn, featuring submissive teens & virgins in rough sex videos in ultra 4k HD.', network: 'puretaboo', priority: 1, - parameters: { independent: true }, + parameters: { + independent: true, + mobile: 'https://m.dpfanatics.com/en/video', + }, }, { name: 'Pretty Dirty', diff --git a/src/scrapers/gamma.js b/src/scrapers/gamma.js index 08ba675a..4dba805d 100644 --- a/src/scrapers/gamma.js +++ b/src/scrapers/gamma.js @@ -468,18 +468,14 @@ async function fetchUpcoming(site) { } function getDeepUrl(url, site, release, mobile) { - const pathname = release?.path || new URL(url).pathname; + const pathname = release?.path || new URL(url).pathname.replace('/en/video', ''); if (mobile) { - return `${mobile}${pathname.replace('/en/video', '')}`; - } - - if (site.parameters?.deep === 'network') { - return `${site.network.url}${pathname}`; + return `${mobile}${pathname}`; } if (site.parameters?.deep) { - return `${site.parameters.deep}${pathname.replace('/en/video', '')}`; + return `${site.parameters.deep}${pathname}`; } return url;