Help needed to read data from the web with login

I tried to use scrape sensor and restful sensor as well but without any success.
Problem is apparently with login - user/password does not work.
Data “behind” login should be easy to read as they are in pure json format.
Beatiful soup etc. are a bit over my skills so far :cry:

Do you know how to get the data using curl? If so, you can use curl in a Command Line Sensor.

Thanks for advice. I will try …
Firstly I need to pass login

Have a look too at beautifulsoup.

Command line sensor:

  - platform: command_line
    name: Pool - data
    command: "curl --user [email protected]:password http://vistapool.es/en/pool/getmainvalues?id=2025"
    .
    .

Does not work

Command failed: curl --user [email protected]:password http://vistapool.es/en/pool/getmainvalues?id=2025
8:48 components/sensor/command_line.py (ERROR)

Started to read beautifulsoup. Hmm, it´s all Greek to me (so far) :frowning:

Any advice to accelerate my study?

Is that the whole error message? Seems like something got cut out.

Also, I’m assuming you tried the command directly from an OS shell and it worked there, yes?

Maybe try:

command: curl "--user [email protected]:password 'http://vistapool.es/en/pool/getmainvalues?id=2025'"

Although if the command worked from the shell, I’m not sure this will help.

As indicated in the other topic it seems you can not login to this website using username/password in the url. It looks like vistapool does not want you to do what you’re trying to do…

@sjee
Do you think that their web is so secure that do not allow any alternative login? :frowning:

They just do not offer a simple way to access the data. It’s choise which might have nothing to do with security. Anyway @Tinkerer pointed you to a possible sollution.

Hm, even if I do not like soup, going to study beautifulsoup