#Multiscrape: how should I use variables from form-submit?

1 messages · Page 1 of 1 (latest)

pulsar mortar
#

The Multiscrape docs (https://github.com/danieldotnl/ha-multiscrape?tab=readme-ov-file#form-submit) describe how you can use variables from form-submit responses. However, the documentation is limited and I'm not sure if I can really use response data from the form submit as a header for the main query.

My goal is to get parcel information from DHL. For this I need to login and then I can access the API. Works in Chrome but Multiscrape keeps complaining about "Invalid value for: cookie X-AUTH-TOKEN (missing)". This header is apperently being set in Chrome (when not logged in I get the same result, otheriwse valid JSON).

So I want to fetch the X-AUTH-TOKEN, which I see in the debugging data. But I'm not sure how to use it. The debugging data gives me to following files:
form_page_request_headers.txt
form_page_response_cookies.txt
form_page_soup.txt
page_response_body.txt
page_response_cookies.txt
page_response_headers.txt
form_page_response_body.txt
form_page_response_headers.txt page_request_headers.txt
age_response_body_error.txt
page_response_cookies_error.txt
page_response_headers_error.txt

The token is only available in the files form_page_response_cookies and form_page_response_headers but not in the body.

Any ideas to help?

GitHub

Home Assistant custom component for scraping (html, xml or json) multiple values (from a single HTTP request) with a separate sensor/attribute for each value. Support for (login) form-submit functi...