@
@
@estluced2021-10-10 13:36:57
Parsing
@estluced, 2021-10-10 13:36:57

Parsing with authorization on nodejs?

Hello!
There was a problem, you need to parse data with authorization (get access to closed pages).
There is a Python code:

sess = requests.Session()
sess.post(".../login/submit", {
  "login": login,
  "password": password,
  "time_zone": "Europe/Moscow"
})
response = sess.get("url")

Here authorization occurs, and after that a GET request occurs with an already authorized user.
How or is it possible to implement this mechanics on nodejs, I tried request lib, the result is zero.
Selenium cannot be used in my case. Many thanks in advance for your help!!!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
W
writer_2159, 2021-10-12
_

implemented something similar.
in short:
you make a request for authorization, you receive cookies, you remember them and further through the pages with the transfer of these cookies

fetchQueryAuth = await fetch(
    _url, 
    {
        "method": "GET",
    });

const cookie = fetchQueryAuth.headers.raw()['set-cookie']

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question