I would like to scrape my power/hydro bill amount and bill due date from my local provider’s website. I would like to use Node-Red if possible. I can easily scrape a site that isn’t behind login using the www-request node however I haven’t found a way to scrape a site that requires you to log in first. As an alternative, I’ve installed the nbrowser node which looks like it will work however when I call the node, I see absolutely nothing (no errors, no results etc). There is an option from the node to show a browser window instance but I can’t seem to get it to work. Has anyone else had any success in running this node in node-red (from Frenck) on Hassos?
@Schocker did you manage to get anywhere with this? - I’m facing exactly the same issue for my LPG tank data.
I thought I’d hit the jackpot when I stumbled on nbrowser but it doesn’t appear to work in the hassio node red addon by @frenck - I did a little bit of investigation and it seems to require xvfb in the container
LOL fair enough. Programming isn’t everyone’s forte… I totally get that, BUT, with that said, sometimes things are just easier by writing a few lines of code. (Hence how we even have projects like NodeRed and HA).
Thanks, I wouldn’t have initally gone down the NR route but my when looking at the website I’m trying to scrape (https://my.flogas.co.uk) the site seems to use some kind of Ajax login form which is beyond me
Once I’m past that I can simply scrape the data I need from the page, but the issue is logging in.
Unfortunately after checking with frenck it seems the NR add-on doesn’t (and won’t) contain xvfb so nbrowser is a no go…
@swifty Unfortunately I couldn’t get it to work so I created a python script and used Selenium to scrape the data I was after. It works pretty well. By going this route, you will have more options and control. Having said that, if nbrowser did work inside of Node-Red my use case would have been much easier to implement.