crawl4ai icon indicating copy to clipboard operation
crawl4ai copied to clipboard

What hook is needed to trigger browser clicks using Python?

Open HonestQiao opened this issue 1 year ago • 1 comments

How to control a browser to perform clicks through Python instead of injecting JS to trigger click events?

HonestQiao avatar Dec 13 '24 13:12 HonestQiao

Hi, two hooks can be used: after_goto and before_retrieve_html, both of them give you access to page, context, and then you can do whatever you want.

unclecode avatar Dec 14 '24 08:12 unclecode