Scrape sensor - Configuration - Three mobile data use


I’m hoping someone can help,
I’d like to extract my data use from a website.

The html code for that section of the page is:

        <table border="1px" width="100%" class="balance noTopMargin">
            <tbody class="portlet-table-body" id="allowanceRemBody">
                        <td class="leftBorder">
                            <strong>Mobile data MB</strong>
                       <td class="rightBorder alignRight">
                        <tr class="division">
                            <td colspan="2"><div> </div></td>
                        <td class="leftBorder">
                            <strong>Go Binge</strong>
                       <td class="rightBorder alignRight">

My current scrape config way off the mark!

No authentication is needed to see the webpage when on local network, which the HA resides.

Any pointers?

1 Like

I find it odd and unlikely that you don’t need to authenticate. How does the site know who you are and what data to return?
The only way I could think of how this may work is if you access the page without wifi, and the site then uses your IMEI / Phone number to identify you. This method would obviously not be possible for authentication with HA since it’s not running on your phone but some other platform (Ubuntu/Pi/Window/ Mac, whatever)

I navigate to the URL via my mobile (not the on the broadband contract), partners phone or laptops connected to the wifi and the info is there. No login.
That’s all I have observed.

(The iframe wrapper in HA works also to deliver the info, no login)

OK. So what happens when you go to the URL from the machine where HA runs?
I bet it doesn’t work and asks you to log in?

The iframe wrapper in HA works also to deliver the info, no login

ok, I’m surprised but great news then.
You’d need to provide the full HTML code though (make sure there are no password or other identifying info in there before posting)
Scrape need the full path/tree to access to correct tag/element.
The class that hosts the data doesn’t appear to be unique (“rightBorder alignRight”) so it’ll be a bit tricky and will rely on the page structure to not change…
if “portlet-table-body” is unique, that might work as a start point. You’d need something along the lines

select: ".portlet-table-body tr .rightBorder"