Yes, i found it is really expensive, how can I block image and video load? thanksYes it's work but it may be expensive, you need block image and video load for save bandwidth
depends what you are using if is a multilogin, automation or just a browserYes, i found it is really expensive, how can I block image and video load? thanks
i use puppteer for automate, here is the code:Yes, i found it is really expensive, how can I block image and video load? thanks
await page.setRequestInterception(true);
page.on("request", (request) => {
const url = request.url().toLowerCase();
const resourceType = request.resourceType();
if (
["media", "image", "png", "font", "manifest"].includes(resourceType) ||
url.endsWith(".mp4") ||
url.endsWith(".avi") ||
url.endsWith(".flv") ||
url.endsWith(".mov") ||
url.endsWith(".wmv") ||
url.endsWith(".ts") ||
url.endsWith(".m3u8") ||
url.endsWith(".aac") ||
url.endsWith(".gif") ||
url.endsWith(".gifv") ||
url.endsWith(".pgn") ||
url.endsWith(".jpg") ||
url.endsWith(".jpeg") ||
url.endsWith(".webp") ||
(resourceType === "stylesheet" &&
(!url.includes("gstatic") || !url.includes("recaptcha")))
) {
debug(`ABORTING reources: `, url);
request.abort();
} else {
request.continue();
}
});
I use adspower and it can be used?depends what you are using if is a multilogin, automation or just a browser
I used adspower, can i use this code for it?i use puppteer for automate, here is the code:
await page.setRequestInterception(true);
page.on("request", (request) => {
const url = request.url().toLowerCase();
const resourceType = request.resourceType();
if (
["media", "image", "png", "font", "manifest"].includes(resourceType) ||
url.endsWith(".mp4") ||
url.endsWith(".avi") ||
url.endsWith(".flv") ||
url.endsWith(".mov") ||
url.endsWith(".wmv") ||
url.endsWith(".ts") ||
url.endsWith(".m3u8") ||
url.endsWith(".aac") ||
url.endsWith(".gif") ||
url.endsWith(".gifv") ||
url.endsWith(".pgn") ||
url.endsWith(".jpg") ||
url.endsWith(".jpeg") ||
url.endsWith(".webp") ||
(resourceType === "stylesheet" &&
(!url.includes("gstatic") || !url.includes("recaptcha")))
) {
debug(`ABORTING reources: `, url);
request.abort();
} else {
request.continue();
}
});
use need use with it puppeteerI use adspower and it can be used?
I used adspower, can i use this code for it?
All automated tools are now detected by Reddit and other sites. I suggest hiring cheap VAs and start from therei use puppteer for automate, here is the code:
await page.setRequestInterception(true);
page.on("request", (request) => {
const url = request.url().toLowerCase();
const resourceType = request.resourceType();
if (
["media", "image", "png", "font", "manifest"].includes(resourceType) ||
url.endsWith(".mp4") ||
url.endsWith(".avi") ||
url.endsWith(".flv") ||
url.endsWith(".mov") ||
url.endsWith(".wmv") ||
url.endsWith(".ts") ||
url.endsWith(".m3u8") ||
url.endsWith(".aac") ||
url.endsWith(".gif") ||
url.endsWith(".gifv") ||
url.endsWith(".pgn") ||
url.endsWith(".jpg") ||
url.endsWith(".jpeg") ||
url.endsWith(".webp") ||
(resourceType === "stylesheet" &&
(!url.includes("gstatic") || !url.includes("recaptcha")))
) {
debug(`ABORTING reources: `, url);
request.abort();
} else {
request.continue();
}
});
Yes they workI want to try Rotating residential proxy, it works for reddit? thanks very much
how to usei use puppteer for automate, here is the code:
await page.setRequestInterception(true);
page.on("request", (request) => {
const url = request.url().toLowerCase();
const resourceType = request.resourceType();
if (
["media", "image", "png", "font", "manifest"].includes(resourceType) ||
url.endsWith(".mp4") ||
url.endsWith(".avi") ||
url.endsWith(".flv") ||
url.endsWith(".mov") ||
url.endsWith(".wmv") ||
url.endsWith(".ts") ||
url.endsWith(".m3u8") ||
url.endsWith(".aac") ||
url.endsWith(".gif") ||
url.endsWith(".gifv") ||
url.endsWith(".pgn") ||
url.endsWith(".jpg") ||
url.endsWith(".jpeg") ||
url.endsWith(".webp") ||
(resourceType === "stylesheet" &&
(!url.includes("gstatic") || !url.includes("recaptcha")))
) {
debug(`ABORTING reources: `, url);
request.abort();
} else {
request.continue();
}
});
yes but 4g are betterI want to try Rotating residential proxy, it works for reddit? thanks very much