forked from DebaucheryLibrarian/traxxx
Added execute method to qu, removed runScripts from Gamma's fetchMovie to observe effect on memory usage.
This commit is contained in:
@@ -463,7 +463,9 @@ async function fetchMovieTrailer(release) {
|
||||
|
||||
async function scrapeMovie({ query, el }, window, url, entity, options) {
|
||||
const release = {};
|
||||
const rawData = window.dataLayer[0]?.dvdDetails;
|
||||
|
||||
const { dataLayer } = query.exec('//script[contains(text(), "dataLayer")]', ['dataLayer']);
|
||||
const rawData = dataLayer?.[0]?.dvdDetails;
|
||||
const data = rawData.dvdId && rawData; // dvdDetails is mostly empty in some cache states
|
||||
|
||||
release.entryId = new URL(url).pathname.match(/\/(\d+)(\/|$)/)?.[1];
|
||||
@@ -750,11 +752,7 @@ async function fetchScene(url, site, baseRelease, options) {
|
||||
}
|
||||
|
||||
async function fetchMovie(url, channel, baseRelease, options) {
|
||||
const res = await qu.get(url, null, null, {
|
||||
extract: {
|
||||
runScripts: 'dangerously',
|
||||
},
|
||||
});
|
||||
const res = await qu.get(url, null, null);
|
||||
|
||||
if (res.ok) {
|
||||
return scrapeMovie(res.item, res.window, url, channel, options);
|
||||
|
||||
Reference in New Issue
Block a user