Skip to content

chore: Ne plus charger les iframe#605

Draft
yann120 wants to merge 1 commit into
mainfrom
chore/block-iframe
Draft

chore: Ne plus charger les iframe#605
yann120 wants to merge 1 commit into
mainfrom
chore/block-iframe

Conversation

@yann120

@yann120 yann120 commented Jun 24, 2026

Copy link
Copy Markdown
Collaborator

Ce changement bloque les iframe
Le resultat est positif sur des sites qui ont des iframe comme : http://fontenelle.fr/
Les iframe sont bien bloqué. Et le scraping prend moins d'une seconde au lieu de 30+ secondes
A tester sur main puis cette branche pour voir la différence

Comment thread app/models/browser.rb
def create_page
browser.create_page.tap do |page|
page.headers.set(request_headers)
page.network.blocklist = BLOCKED_URL_PATTERNS

@yann120 yann120 Jun 24, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On ne peut pas mettre une blocklist en même temps qu'un page.network.intercept
Blocklist intercepte deja et accepte les requetes...
J'ai donc du re-ecrire ça sinon intercept fonctionnait pas

@yann120 yann120 self-assigned this Jun 24, 2026
@yann120 yann120 added the chore Technical task label Jun 24, 2026
Comment thread app/models/browser.rb
end

def block_unwanted_requests(page)
page.network.intercept(handle_auth_requests: false)

@yann120 yann120 Jun 24, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Technical task

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant