Skip to content

How to block media ? #627

Closed
Closed

Description

@zhk0603

When using Playwright crawler, how to block media, such as stylesheet, font, image, media

Activity

  1. added
    t-toolingIssues with this label are in the ownership of the tooling team.
    on Oct 29, 2024
  2. janbuchar commented on Oct 29, 2024

    @janbuchar
    Collaborator

    Hello, and thank you for your interest in Crawlee! Do I understand it right that you want to prevent images and such from loading? Perhaps to save bandwidth and make scraping faster?

  3. zhk0603 commented on Oct 29, 2024

    @zhk0603
    Author

    yes

  4. janbuchar commented on Oct 29, 2024

    @janbuchar
    Collaborator

    Once pre-navigation hooks are implemented (#427), I would utilize those to call page.route and set up blocking as you like. As of now, I'm not aware of an easy way to do this.

  5. B4nan commented on Oct 29, 2024

    @B4nan
    Member

    Just one note about this, request interception (page.route) means not being able to reuse the resource cache of the browser. You can use this approach to save bandwidth, but it will result in worse overall performance most likely.

  6. locked and limited conversation to collaborators on Oct 29, 2024
  7. converted this issue into a discussion #629 on Oct 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    t-toolingIssues with this label are in the ownership of the tooling team.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions