Steveorevo / node-red-contrib-nbrowser

Provides a virtual web browser (a.k.a. "headless browser") appearing as a node.
34 stars 13 forks source link

Home Assistant Node Red #36

Open diginfo opened 2 years ago

diginfo commented 2 years ago

I have nodered installed in home assistant, and have installed nbrowser, there did not appear to be any errors.

But I dont seem to be able to get any activity whatsoever, I inject a payload URL into the nbrowser node, and the output of the nbrowser is linked to a debug output.

When I inject absolutely nothing appears to happen ?!

Screenshot 2022-05-07 at 10 37 43 AM

Also, I have enabled the "Show browser window instance?" but when I click on command + shift + I - a new email is created in my email client with the url of the current selected chrome browser tab url.

I cannot seem to get this to work at all ??

Screenshot 2022-05-07 at 10 42 33 AM Screenshot 2022-05-07 at 10 42 14 AM

Ahhh, just spotted this in the logs:

7 May 03:56:54 - [red] Uncaught Exception:
7 May 03:56:54 - [error] Error: spawn /config/node-red/node_modules/electron/dist/electron ENOENT
    at Process.ChildProcess._handle.onexit (node:internal/child_process:283:19)
    at onErrorNT (node:internal/child_process:478:16)
    at processTicksAndRejections (node:internal/process/task_queues:83:21)
[03:56:54] INFO: Starting Node-RED...
> start
> node $NODE_OPTIONS node_modules/node-red/red.js "--settings" "/etc/node-red/config.js"
Steveorevo commented 2 years ago

This may have to do electron incompatibility. Honestly; this project and it’s dependencies appear to be near death. I will put up an archive notice. There are alternatives in node-red repo and other browser automation projects that may be retrofitted to NodeRED.

itsboo07 commented 1 year ago

@Steveorevo this does not work now....is their any alternatives?

diginfo commented 1 year ago

@itsboo07 - yes I have been using Python Selenium with appdaemon, works great.

itsboo07 commented 1 year ago

@diginfo inside home assistant ?

diginfo commented 1 year ago

yes

diginfo commented 1 year ago

https://github.com/hassio-addons/addon-appdaemon/releases

init_commands: []
python_packages:
  - selenium
system_packages:
  - chromium-chromedriver
  - chromium
log_level: info
itsboo07 commented 1 year ago

@diginfo great ...thanks for sharing ....is it possible to pm/dm you in discord?

itsboo07 commented 1 year ago

@diginfo what im trying to do is... do some web scraping from my router webpage ...it would be really useful if you could help me out

diginfo commented 1 year ago

There's lots of examples of using python selenium on google as well as setting up appdaemon in HA.