verbal-limeV
Apify & Crawleeโ€ข3y agoโ€ข
14 replies
verbal-lime

How to access browser instance in Playwright Crawler?

I have been trying to port our scrapers from Selenium/Python to crawlee mainly because of the anti bot protections already built into it. The issue I am facing is I am having a hard time translating our functions 1-to-1 from selenium to Crawlee because a lot of it depends on the selenium
driver
or in Playwright's case
browser
instance, for e.g.

I need to click on an element to get the link because there's a redirect in between and I need to wait for it before grabbing it and I cant use
enqueueLinksByClickingElements
because I need it in the same request for my dataset to be complete.

There are other such issues I am having trouble with and I know we have
Page
exposed but that's just a single tab in a browser's context and I need more control over it for my usecase.

Is this something that's possible with Crawlee? or are there any workarounds that I can use for this same functionality?
Was this page helpful?