agentic
agentic copied to clipboard
How to use Puppeteer `Page` class?
Describe the feature
After executing initSession
, Puppeteer will be launched and a page will be created.
If I want to implement some custom events to solve the captcha problem, how can I get the Page
class?
This isn't supported by the library at the moment, though you're welcome to edit the source and expose the browser / page directly.
Thanks for the reply
I just reviewed the 'initSession' function in chatgpt-api-browser.ts
, this function has some built-in CAPTCHA processing, if need to keep it, I may need to add some optional parameters for initSession
, like:
initSession({ afterPageCreated: (page) => { /* do something */ }})
What do u think?
You're welcome to edit the source for this type of use case or access the _page
property directly.