Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Connect to Remote Debugging #275

Open
dodgex opened this issue Dec 31, 2022 · 0 comments
Open

[Feature Request] Connect to Remote Debugging #275

dodgex opened this issue Dec 31, 2022 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@dodgex
Copy link

dodgex commented Dec 31, 2022

After a long time i got back to farming drops.

As claiming drops with this bot is broken, i was using the twitch autoclaim addon for chrome. But that still requires to have a proper stream open.

I just tested to start my already working (logged in + auto claim via extension) chrome and let the watching be controlled by your bot.

Here is how i did it:

  • Start Chrome with argument --remote-debugging-port=9222
  • Open http://127.0.0.1:9222/json/version
  • copy the value from webSocketDebuggerUrl
  • replace the puppeteer.launch with puppeteer.connect (see below)
  • (i also disable auto claim for this bot)
 const wsChromeEndpointurl = 'VALUE_FROM_JSON';
 const browser = await puppeteer.connect({
     browserWSEndpoint: wsChromeEndpointurl,
 });

For now it seems to be working, browser runs the stream and bot detects progress.

While this might not be working headless, it could be a way to keep using the bot with visible/active chrome. In my case it is on a small linux VM.

Maybe this could be implemented as an option to provide the Port (9222 in my case) in the config and the bot getting the ws url from the json endpoint.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants