GithubHelp home page GithubHelp logo

Comments (5)

mnmkng avatar mnmkng commented on May 18, 2024 1

This cannot be reliably done before we have a middleware system for request interception: #204 since it cannot be done on Chromium level (with a flag) and adding request interception prevents adding more request interceptions.

I'm just gonna drop a doc here for referencing it later perhaps:

@param {Boolean|Array} [blockResources=false]
 *   Uses the [`Apify.utils.puppeteer.blockResources()`](../api/puppeteer#puppeteer.blockResources)
 *   function to block downloads of resources such as images, videos or CSS. It accepts either
 *   a boolean `true`, which will enable the default blocking or a `string[]` listing
 *   the resources that should be blocked. See the
 *   [`Apify.utils.puppeteer.blockResources()`](../api/puppeteer#puppeteer.blockResources)
 *   for details.

from crawlee.

jancurn avatar jancurn commented on May 18, 2024

This should go to the new class called PuppeteerEx - see other issue.

from crawlee.

jancurn avatar jancurn commented on May 18, 2024

Now we have new Apify.utils.puppeteer namespace for this!

from crawlee.

jancurn avatar jancurn commented on May 18, 2024

And now we even have Apify.utils.puppeteer.blockResources() that can be used. Perhaps we can only add option blockResourceTypes to launchPuppeteer and that's it.

from crawlee.

mnmkng avatar mnmkng commented on May 18, 2024

Since request interception disables cache, this might not bring the expected benefits. Closing for now.

from crawlee.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.